cancel
Showing results for 
Search instead for 
Did you mean: 

What userid format to use: LDAP Error 34 - Invalid DN syntax

maxbaba
Champ in-the-making
Champ in-the-making
Hi - I have the following configuration in my activiti-custom-context.xml. I'm not sure what format to use for my userid to login into Activiti-Explorer:

<property name="configurators">
            <list>
                <bean class="org.activiti.ldap.LDAPConfigurator">
                  <property name="server" value="ldap://<myhost>" />
                  <property name="port" value="<my port number>" />
                  <property name="user" value="DN: uid=<myprocessid>,ou=Directory,ou=Users,o=mfc" />
                  <property name="password" value="<mypwd>" />
                  <property name="baseDn" value="cn=People,ou=Internal,o=mfc" />
                  <property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(cn={0}))" />
        <property name="queryUserByFullNameLike"  value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
        <property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />
                  <property name="userIdAttribute" value="cn" />
                  <property name="userFirstNameAttribute" value="firstName" />
                  <property name="userLastNameAttribute" value="lastName" />
                  <property name="groupIdAttribute" value="cn" />
                  <property name="groupNameAttribute" value="cn" />
               </bean>
            </list>
          </property>

The only line I changed was this: <property name="queryGroupsForUser" value="(&amp;(objectClass=<GROUP NAME>)(memberURL={0}))" /> because I did not know what <GROUP NAME> to specify. I hope that this has nothing to do with why I'm unable to login into Activiti-Explorer.

Here is some info on google, as to the cause and fix for LDAP Error 34. I tried the combinations but with little success.

Cause/Fix: This error occurs when you use the LDAP User Name Option, and the User Name has been entered with an invalid Syntax. The correct Name syntax is: ?cn=userid,ou=group,ou=division,o=organization". Refer to the POA startup file for more details on this specific error

Any help is much appreciated.
4 REPLIES 4

maxbaba
Champ in-the-making
Champ in-the-making
I did not upload the code fragments earlier properly. So I uploaded them in a file now. Thanks

maxbaba
Champ in-the-making
Champ in-the-making
NA

jbarrez
Star Contributor
Star Contributor
With that config, a bind will be done by replacing your login id in the 'cn={0}', ie in this query:  (&amp;(objectClass=inetOrgPerson)(cn={0}))

What kind of LDAP system are you using? How does a user object look like there?

maxbaba
Champ in-the-making
Champ in-the-making
Thank you. That worked