Menu

#22 VERSION OF AUTHENTICATE.CS THAT WORKS WITH AD POSTED HERE

open
nobody
None
5
2009-11-05
2008-03-26
No

I'm posting this on behalf of its author Antonio Nunez. The following is from an email Antonio sent to me:

I've finished my function to integrate bugtracker to an active directory server
NOT OpenLDAP. It seems my problems were indeed a config issue since w2000 allows
anonymous queries to the AD and w2003 does not (by default).
So I created a user that has permissions to connect to the AD and list the
objects and this may be configured in web.config. If someone does not wish to
use this user, all it needs to be done is to set and empty string to these
variables and the authentication method to allow anonymous logins.

Secondly, I developed on my function for the only reason that the methods seemed
to integrate better to AD and also because it was the same ones you used in
import_users_from_ldap_sample.cs.

Finally I've added some logic on what to do when a user exists in the AD but not
in bugtracker (there is an option to automatically add the user - based in
import_users_from_ldap_sample.cs) or when a user does exist in both AD and BT
and in this case there is also an option to update 4 fields in bugtracker (first
name, last name, email and active)

This is tested in my w2003, I do not believe it'll work in openldap since most
of the object property names are different. I will install a windows version an
test it to try and see what kind of problems arise.

If you want to integrate any of this, be my guest (and of course, any
suggestions are welcome)

web.config's keys for ldap usage:
<add key="AuthenticateUsingLdap" value="1"/>
<add key="LdapAuthType" value="Secure"/>
<add key="LdapServer" value="vrt-w2003srv"/>
<add key="LdapUserDistinguishedName" value="dc=teste,dc=home"/>
<add key="LdapSearchUserName" value="ldap_search"/>
<add key="LdapSearchPassword" value="123abc###"/>
<add key="LdapAutoAddUser" value="true"/>
<add key="LdapAutoSyncUser" value="true"/>

Discussion

  • Corey Trager

    Corey Trager - 2008-03-26
     
  • Corey Trager

    Corey Trager - 2008-10-25
    • priority: 5 --> 2
     
  • Corey Trager

    Corey Trager - 2009-11-05
    • assigned_to: ctrager --> nobody
     
  • Corey Trager

    Corey Trager - 2009-11-05
    • priority: 2 --> 5