cancel
Showing results for 
Search instead for 
Did you mean: 

Ldap Autentication - Bind succeeded, authentication ok but Login failed for... Nuxeo-dm 5.4.2

Jaime_
Champ on-the-rise
Champ on-the-rise

I have been trying to get OpenLdap Authentication set up in Nuxeo DM 5.4.2 in debian 6 but dosen't work....

The Bind to Ldap is succeeded but the Nuxeo login is Failed...

I using "Users in LDAP, groups in SQL" configuration (http://community.nuxeo.com/5.3/books/nuxeo-book/html/admin-ldap-configuration.html)


--> default-ldap-users-directory-bundle.xml

org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory

org.nuxeo.ecm.platform.usermanager.UserManagerImpl org.nuxeo.ecm.directory.multi.MultiDirectoryFactory

<server name="default">

  <ldapUrl>ldap://xxxxxxxxxxxx:389</ldapUrl>
  <bindDn>uid=zimbra,cn=admins,cn=zimbra</bindDn>
  <bindPassword>xxxxxxxx</bindPassword>
<directory name="userDirectory">

    <server>default</server>
    <schema>user</schema>
    <idField>uid</idField>
    <passwordField>password</passwordField>

    <searchBaseDn>ou=people,dc=allware,dc=cl</searchBaseDn>
    <searchClass>person</searchClass>
    <searchScope>onelevel</searchScope>

    <substringMatchType>subany</substringMatchType>
    <readOnly>false</readOnly>
    <cacheTimeout>3600</cacheTimeout>
    <cacheMaxSize>1000</cacheMaxSize>
    <missingIdFieldCase>lower</missingIdFieldCase>
    <querySizeLimit>200</querySizeLimit>
    <queryTimeLimit>0</queryTimeLimit>

    <creationBaseDn>ou=people,dc=allware,dc=cl</creationBaseDn>
    <creationClass>person</creationClass>


    <rdnAttribute>uid</rdnAttribute>
    <fieldMapping name="username">uid</fieldMapping>
    <fieldMapping name="password">userPassword</fieldMapping>
    <fieldMapping name="firstName">givenName</fieldMapping>
    <fieldMapping name="lastName">sn</fieldMapping>
    <fieldMapping name="company">o</fieldMapping>
    <fieldMapping name="email">mail</fieldMapping>


    <references>
    <inverseReference field="groups" directory="groupDirectory" dualReferenceField="members"    />
    </references>

</directory>

The Server.log :::

2011-11-14 13:57:48,299 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] Entering Nuxeo Authentication Filter

2011-11-14 13:57:48,302 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] Principal not found inside Request via getUserPrincipal

2011-11-14 13:57:48,302 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] Try getting authentication from cache

2011-11-14 13:57:48,302 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] Trying to retrieve userIndetification using plugin BASIC_AUTH

2011-11-14 13:57:48,302 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] Trying to retrieve userIndetification using plugin FORM_AUTH

2011-11-14 13:57:48,303 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator] Looking for user/password in the request

2011-11-14 13:57:48,303 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] User/Password found as parameter of the request

2011-11-14 13:57:48,304 DEBUG [org.nuxeo.ecm.directory.ldap.LDAPSession] LDAPSession.getLdapEntry(Administrator, false): LDAP search base='ou=people,dc=allware,dc=cl' filter='(&(uid={0})(&(objectClass=person)(uid=*)))' args='Administrator' scope='1' [LDAPSession '-6700401796419944398' for directory userDirectory]

2011-11-14 13:57:48,308 DEBUG [org.nuxeo.ecm.directory.ldap.LDAPSession] LDAPSession.getLdapEntry(Administrator, false): LDAP search base='ou=people,dc=allware,dc=cl' filter='(&(uid={0})(&(objectClass=person)(uid=*)))' args='Administrator' scope='1' => found: uid=administrator,ou=people,dc=allware,dc=cl [LDAPSession '-6700401796419944398' for directory userDirectory] 2011-11-14 13:57:48,308 DEBUG [org.nuxeo.ecm.directory.ldap.LDAPSession] LDAP bind dn='uid=administrator,ou=people,dc=allware,dc=cl' 2011-11-14 13:57:48,309 DEBUG [org.nuxeo.ecm.directory.ldap.LDAPSession] Bind succeeded, authentication ok

2011-11-14 13:57:48,310 DEBUG [org.nuxeo.ecm.directory.ldap.LDAPSession] LDAPSession.getLdapEntry(Administrator, false): LDAP search base='ou=people,dc=allware,dc=cl' filter='(&(uid={0})(&(objectClass=person)(uid=*)))' args='Administrator' scope='1' [LDAPSession '-6700401770650140620' for directory userDirectory]

2011-11-14 13:57:48,313 DEBUG [org.nuxeo.ecm.directory.ldap.LDAPSession] LDAPSession.getLdapEntry(Administrator, false): LDAP search base='ou=people,dc=allware,dc=cl' filter='(&(uid={0})(&(objectClass=person)(uid=*)))' args='Administrator' scope='1' => found: uid=administrator,ou=people,dc=allware,dc=cl [LDAPSession '-6700401770650140620' for directory userDirectory]

2011-11-14 13:57:48,316 INFO [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] Login failed for Administrator

2011-11-14 13:57:48,328 DEBUG [org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator] Forward to Login Screen

Thanks in advance for your helps!!! Jaime-

1 ACCEPTED ANSWER

Thierry_Martins
Star Collaborator
Star Collaborator

Replace uid by username and you'll solve the error:

org.nuxeo.ecm.core.api.model.PropertyNotFoundException: Property not found: uid. at org.nuxeo.ecm.platform.usermanager.NuxeoPrincipalImpl.toString(NuxeoPrincipalImpl.java:257)

The idField should reference one of the attributes from the mapping section, as you did for the passwordField (ok, it's easier to see that, now I got the error)

View answer in original post

9 REPLIES 9

Julien_Carsique
Elite Collaborator
Elite Collaborator

Hello,

Up-to-date documentation is there: Using a LDAP directory.

Especially look at the "Recommended method to define LDAP contributions" (or "Known issues") part about issue NXP-6574.

thanks I will review the suggested configuration

Thank you very much for your help.

can you drop this jar https

Hello Mr, Thierry

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

I'm not sure that will answer to your question, but be careful you are looking for old documentation (for 5.3 as you can see into the URL).

Thierry_Martins
Star Collaborator
Star Collaborator

Replace uid by username and you'll solve the error:

org.nuxeo.ecm.core.api.model.PropertyNotFoundException: Property not found: uid. at org.nuxeo.ecm.platform.usermanager.NuxeoPrincipalImpl.toString(NuxeoPrincipalImpl.java:257)

The idField should reference one of the attributes from the mapping section, as you did for the passwordField (ok, it's easier to see that, now I got the error)

Thanks for your help

Jaime_
Champ on-the-rise
Champ on-the-rise

Thanks all, for the help.

the problem is fixed!!

final configuration:


org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory org.nuxeo.ecm.directory.sql.storage
<server name="default">

  <ldapUrl>ldap://xxxxxxxxxxxxxx:389</ldapUrl>
  <bindDn>uid=zimbra,cn=admins,cn=zimbra</bindDn>
  <bindPassword>xxxxxxxxxxxxx</bindPassword>
<directory name="userDirectory">

    <server>default</server>
    <schema>user</schema>
    <idField>username</idField>
    <passwordField>password</passwordField>

    <searchBaseDn>ou=people,dc=allware,dc=cl</searchBaseDn>
    <searchClass>person</searchClass>
    <searchScope>onelevel</searchScope>

    <substringMatchType>subany</substringMatchType>
    <readOnly>false</readOnly>
    <cacheTimeout>3600</cacheTimeout>
    <cacheMaxSize>1000</cacheMaxSize>
    <missingIdFieldCase>lower</missingIdFieldCase>
    <querySizeLimit>200</querySizeLimit>
    <queryTimeLimit>0</queryTimeLimit>

    <creationBaseDn>ou=people,dc=xxxxxxxx,dc=cl</creationBaseDn>
    <creationClass>person</creationClass>


    <rdnAttribute>uid</rdnAttribute>
    <fieldMapping name="username">uid</fieldMapping>
    <fieldMapping name="password">userPassword</fieldMapping>
    <fieldMapping name="firstName">givenName</fieldMapping>
    <fieldMapping name="lastName">sn</fieldMapping>
    <fieldMapping name="company">o</fieldMapping>
    <fieldMapping name="email">mail</fieldMapping>


    <references>
    <inverseReference field="groups" directory="groupDirectory" dualReferenceField="members"    />
    </references>

</directory>
<userManager>
  <defaultAdministratorId>jcampos</defaultAdministratorId>
  <defaultGroup>members</defaultGroup>
</userManager>

Best Regards Jaime

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.