Alan D. Salewski on 30 Dec 2008 13:19:07 -0800 |
On Tue, Dec 30, 2008 at 02:37:17PM -0500, Michael Leone spake thus: > On Tue, Dec 30, 2008 at 2:07 PM, Mag Gam <magawake@gmail.com> wrote: > > To be on topic, I too have a very similar question > > > > Presently, at my company we use AD for all authentication and as an > > application developer my biggest challenge is to integrate > > authentication into our apps. The authentication team simply does not > > answer or understand my question. Of course, there is a possibility I > > am asking it wrong :-) > > > > As an alternative, we created a database with usernames and passwords > > and all of our applications use this db. We are in our own > > island...which is not good IMO > > > > I am no expert in AD whatsoever, but if I know my username, password, > > and domain is there a library (C/C++/Java/Perl) I can use to test my > > authentication? *snip* The Perl Net::LDAP library works well: http://search.cpan.org/dist/perl-ldap/ I've used it to create a handful of cli tools to work with my company's AD installation -- a passwd(1) work-alike, crontab-invoked progs to warn me a week or two before my LDAP password is about to expire, that sort of thing. For the scenario you mention above, you could collect user credentials and then have your program attempt to log into the LDAP server using the provided credentials. If it works, then they're good. You could also take it a step further and test for particular group memberships, etc. I'll see in the coming days if I can't share the code from those tools. There are some wonky aspects to LDAP programming, such as the need for clients to be prepared to chase referrals, so it can take a bit of work to come up with code that works in general scenarios. -Al -- a l a n d. s a l e w s k i salewski@worldnet.att.net -------------------------------------------------------------------- when summer rain falls the smell of sweet temptation tantalizing kiss -------------------------------------------------------------------- Generated from Haiku-O-Matic: www.smalltime.com/haiku.html ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|