List Info

Thread: An LDAP patch




An LDAP patch
country flaguser name
United States
2007-09-26 12:18:33
Hi there,

I've made a simple modification to the LDAP auth code to
make it behave
more like other ldap auth implementations.

There are some limitations caused the current implementation
in that a
dn must be  assembled by plugging in the username.

For example, uid=%s,dc=company,dc=com becomes
uid=barberd,dc=company,dc=com

LDAP Auth should instead by done with a two-step process:
first connect
to ldap and search for the user's object using a base dn and
a search
filter.  Then take that result and attempt to bind as that
object with
the supplied password.
For example:
Search 'dc=company,dc=com" for
"(&(objectClass=person)(uid=%s))"
will return the dn of 'uid=barberd,dc=company,dc=com". 
Then take this
dn and try to log in with the supplied password.

This gives several advantages:
1) The uid does not have to be in the dn
There can be an ldap object such as "cn=Don Barber,
dc=company, dc=com"
with an attribute of 'uid: barberdg'.
2) The user accounts no longer have to be children of the
same node.
For example, one can have two users:
uid=user1, ou=Human Resources, ou=People, dc=company,
dc=com
and
uid=user2, ou=Admins, ou=Information Technology, ou=People,
dc=company,
dc=com

With a search base of 'ou=People, dc=company, dc=iip' the
auth module
will still find the correct dn with a search for 'uid=user1'
or
'uid=user2', no matter how the company decides to structure
its user
accounts.

The modifications were pretty minor really.

For configuration changes, it gets rid of LDAP_USER_TEMPLATE
and renames
LDAP_USER_FILTER to LDAP_USER_SEARCH.

I've attached the new file to this email.  Thanks for
considering it.


Don


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
swamp-devel mailing list
swamp-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel

http://swamp.sf.net 
  
Re: An LDAP patch
country flaguser name
Germany
2007-09-27 08:26:48
Don Barber schrieb:
> Hi there,
> 
> I've made a simple modification to the LDAP auth code
to make it behave
> more like other ldap auth implementations.


Thanks, I applied a slightly modified version of you patch
in svn.
It will be included in the next release.

Greetings

-- 
Thomas Schmidt (tschmidt [at] suse.de)
SUSE Linux Products GmbH :: Research & Development ::
Internal Tools
"Don't Panic", Douglas Adams (1952 - 11.05.2001)

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
swamp-devel mailing list
swamp-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel

http://swamp.sf.net 

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )