plainblack.com
Username Password
search
Bookmark and Share

    

LDAP - finally works, but...

User martien
Date 1/13/2010 8:29 am
Views 923
Rating 0    Rate [
|
]
Previous · Next
User Message
martien

 

there doesn't seem to be a description how it has to work
(and I'm not rellay sure, if there is  someone who knows how it should work).

Searching on this website doesn't help very much.

After setting up a LDAP-Server with a inetOrgPerson scheme, it wasn't a big problem
to initiate WebGUI users from LDAP. However, logging in wasn't possible.

To change this, I changed Auth::LDAP:

  • in _isValidLDAPUser:
    (because there is no password-field)

                #Try to bind to the directory using the users dn and password
                #  $auth = $ldap->bind(dn=>$connectDN, password=>$password);
                $auth = $ldap->bind(dn=>$connectDN);

  • in createAccountSave:
    (because there was no connectDN in the new account)

                my $properties;
                # $properties->{connectDN} = $connectDN
                $properties->{connectDN} = $connectDN   || "cn=".$username.",".$connection->{ldapUserRDN};

 

My question to all, who know:

Was this a bug or, if not, what did I wrong in the process to get it running?

--- (Edited on 13.01.2010 15:29 [GMT+0100] by martien) ---



Back to Top
Rate [
|
]
 
 
perlDreamer

There are several users, from different companies, who use WebGUI's LDAP without any problem.  One example setup, which is only used for testing, can be found in the wiki.

--- (Edited on 1/13/2010 7:58 am [GMT-0800] by perlDreamer) ---



Back to Top
Rate [
|
]
 
 
martien

There are several users, from different companies, who use WebGUI's LDAP without any problem.  One example setup, which is only used for testing, can be found in the wiki.

 

I did the setup as explained in this wiki, but it doesn't work without the changes I made, i.e:

  1. preventing to use a user password to search for a user at creation time
  2. the dn isn't written to the account profile

Without the first change, at creation time, the password was sent in clear text to Net::LDAP.

A login afterwards checks against the userPassword (SHA) field.

This explains, that under 1. a user is found if I don't send a password.

So there must be some other, not mentioned, prerequisites on the server installation/WebGUI settings, but which exactly?

 

--- (Edited on 13.01.2010 19:30 [GMT+0100] by martien) ---



Back to Top
Rate [
|
]
 
 
martien

I did the setup as explained in this wiki, but it doesn't work without the changes I made, i.e:

  1. preventing to use a user password to search for a user at creation time
  2. the dn isn't written to the account profile

Without the first change, at creation time, the password was sent in clear text to Net::LDAP.

A login afterwards checks against the userPassword (SHA) field.

This explains, that under 1. a user is found if I don't send a password.

So there must be some other, not mentioned, prerequisites on the server installation/WebGUI settings, but which exactly?

 

I got the solution:

  1. One prerequisite is, that the password (userPassword) in LDAP has to be plain text.
    I think this is not really ok. The possibility I found under 1. could be an alternative, since it works also with a crypted password and it won't be a security issue.
  2. The second problem originated at the translation of text 9-description in i18n/Auth. It explained to insert a (complete) DN, meant was the attribute name "dn".( I changed it now in i18n.webgui.org)

 

--- (Edited on 14.01.2010 09:39 [GMT+0100] by martien) ---



Back to Top
Rate [
|
]
 
 
perlDreamer

No, we use that setup exactly for the regression tests.  They get run almost daily with no problems.

Could this be due to other changes you've made to the WebGUI core code?

Which LDAP server are you using?

--- (Edited on 1/13/2010 11:37 am [GMT-0800] by perlDreamer) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved