Thank you very much. I tested it and found out that no other than UserRole is being assigned. The issue is probably (as you foretold) in login-config.xml. I had:
<module-option name="defaultRole">UserRole</module-option>
so UserRole was asigned by default (forced - thus the confusion)
I commented it out and I am no longer able to log in so the role assignment does not work correctly.
Could you help me with what could be wrong here?
from login-config.xml
Code: Select all <application-policy name="OpenKM">
<authentication>
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" >
<module-option name="java.naming.provider.url">ldap://ldap.example.org</module-option>
<module-option name="bindDN">cn=admin,dc=example,dc=org</module-option>
<module-option name="java.naming.security.authentication">simple</module-option>
<module-option name="bindCredential">password</module-option>
<module-option name="baseCtxDN">ou=example,ou=People,dc=example,dc=org</module-option>
<module-option name="baseFilter">(uid={0})</module-option>
<module-option name="rolesCtxDN">ou=example,ou=Groups,dc=example,dc=org</module-option>
<module-option name="roleFilter">(member={1})</module-option>
<module-option name="roleAttributeID">cn</module-option>
<module-option name="roleAttributeIsDN">true</module-option>
<module-option name="roleRecursion">1</module-option>
<module-option name="searchScope">ONELEVEL_SCOPE</module-option>
<!--module-option name="defaultRole">UserRole</module-option-->
</login-module>
</authentication>
</application-policy>
I tryied to change scope to subtree (even it should not matter because there is no deeper level) and I also tried to change roleRecursion to 0,1,2 (not sure what does this one do) and no effect so far.