0
votes

I'm trying to authenticate users from an Ldap server.

Here is my Ldap users :

LDAP

My admin's path is cn=admin,dc=ldap,dc=agem,dc=com

And here is my liferay authentication settings :

enter image description here

enter image description here

enter image description here

I can connect to my ldap server and i can get users from ldap with test operations.Also restarting liferay several times,users in ldap is copied to liferay that i can see these under users. But i can not login liferay with this users.I am getting an error like :

08:32:56,457 ERROR [http-bio-8180-exec-3][LDAPAuth:341] Problem accessing LDAP server com.liferay.portal.kernel.ldap.LDAPFilterException: Invalid filter cn=agem,cn=admin,dc=ldap,dc=agem,dc=com at com.liferay.portal.kernel.ldap.LDAPUtil.validateFilter(LDAPUtil.java:285)

What am i missing?

2

2 Answers

1
votes

Checking Liferay code that is giving you the exception ( LDAPUtil.validateFilter) you can see the following code :

                if (!filter.startsWith(StringPool.OPEN_PARENTHESIS) ||
                       !filter.endsWith(StringPool.CLOSE_PARENTHESIS)) {

                        return false;
                }

So, is the issue you are having, authentication filter needs to start and end with parenthesis , your filter starts with cn=... . Also, Liferay starts the user search form the base DN, so you should only put in authentication filter the following : (cn=@screen_name@) , and not the full DN

0
votes

Your authentication filter should be somewhat like this

(&(objectCategory=inetOrgPerson)(cn=@screen_name@))

HTH