I am experiementing with integrating Active Directory into an intranet web application. I have read a bunch of tutorials on how to do this. Just wanted to ask if my logic is correct or if their is a better way to skin this cat.
My platform is:
MS Server 2003 Standard
Apache 1.3.31
Php 4.3.9
Mysql 4.0.21
I have set up php as a module and have installed and tested the PHP LDAP package (including the two dll required libeay32.dll & ssleay32.dll)
I am also going to use the LDAP module for apache.
My intent is to restrict the web application directory to a group of users via an .htaccess file using LDAP restriction.
I also want to populate the username and Display name from the authenticated user into the web page using environment variables to strip out the logged in username. I.E. the person visiting the intranet site will have logged into the active directory domain. I am a bit confused about how to retrieve this person's user name and then look it up in the active directory. I understand the look up process using LDAP to access the active directory and then performing a search based on the username to grab the Display Name etc from the ad directory entry, but I am not sure how to grab the logged in username of the person accessing the site. I know I can use the .htaccess to restrict the access based on their domain credentials but how to grab the actual username is confusing to me.
The other piece is I will then populate a list with users of a group based on active directory using a bound connection to the ad server with domain admin credentials. This is so the user can be switched. I will be restricting this to certain groups of persons.
My confusion lies in the explanation of the LDAP settings for the search and the original connection.
the base_dn string baffles me a bit as well as the use of things like ou (organizational unit?) and some of the other search qualifiers. I would also like a idiot definition of the DN string used for the initial connection. Anyway I have the groups i question set up in Active Directory.
Any pointers or suggestions would be appreciated. I will post code that works here once I muddle my way through.
I am looking at this point for a logical analysis of steps in the process or validation of my intended method as well as some explanation of the use of ldap functions.
Thanks Ahead,
Geoffrey