Hi
I am testing LDAP with a JNDI realm connecting to my sample SunOne directory server. Basicly I have this in my context <Realm className="org.apache.catalina.realm.JNDIRealm" connectionURL="ldap://dev21.korem.local:59004" userPattern="uid={0},dc=korem,dc=local" userRoleName="nsroledn" roleName="cn"/> The binding is ok, I retrieve correctly the user via getUserPrincipal after login if success. But I have a problem with roles. I created 2 roles (KnownUser and Author) in the directory server, then assigned the 2 roles to my test user. But when I extract roles from the user (getUserPrincipal() then cast to GenericPrincipal to do a getRoles() for debug purpose), I get 2 roles, so far, this is right, but the names of the roles are role :cn=Author,dc=korem,dc=local role :cn=KnownUser,dc=korem,dc=local I want the role names coming from the "cn" sub-attribute (Author and KnownUser) as specified by the "roleName" attribute of the realm tag Any ideas?