hello everybody,
I'm trying to integrate OKM with our AD and I have to say that almost works pretty good.
The only real issue I have is with nested groups on Active Directory.
Let me explain.
Our AD structure is almost like this:
In the authorizations I've created two groups one for OKM admins and another for OKM Users, and changed web.xml in OpenKM.war accordingly.
at repository level department based access roles.
The issue here is that it seems that the login module of OKM doesn't allow users part dept1 and dept2 (thus OKM Users) to enter the application.
Opposite to this, if I give some users explicit memebership to OKM Users, they get to the app safe and sound (but don't respect my auth rules).
What I'm doing wrong here?
Thanks a lot for your support!
I'm trying to integrate OKM with our AD and I have to say that almost works pretty good.
The only real issue I have is with nested groups on Active Directory.
Let me explain.
Our AD structure is almost like this:
Code: Select all
keep in mind that users are grouped by dept.dc=it
dc=mycompany
ou=authorizations
ou=users
ou=deparments
In the authorizations I've created two groups one for OKM admins and another for OKM Users, and changed web.xml in OpenKM.war accordingly.
Code: Select all
Now, since I don't want to put each user under this groups, but I want to move by deparments I did something like this:dc=it
dc=mycompany
ou=authorizations
cn=OKM Admins
cn=OKM Users
ou=users
ou=deparments
cn=dept1
cn=dept2
cn=dept3
Code: Select all
I've tried to write both login-config.xml and preferences accordingly. So:dc=it
dc=mycompany
ou=authorizations
cn=OKM Admins
cn=OKM Users
cn=dept1
cn=dept2
ou=users
ou=deparments
Code: Select all
while preferences are: <application-policy name = "OpenKM">
<authentication>
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag = "required">
<module-option name="java.naming.provider.url">ldap://myldapserver:389</module-option>
<module-option name="java.naming.security.authentication">simple</module-option>
<module-option name="bindDN">CN=ldapuser, OU=users, DC=mycompany, DC=it</module-option>
<module-option name="bindCredential">ldappwd</module-option>
<module-option name="baseCtxDN">ou=users,dc=mycompany,dc=it</module-option>
<module-option name="baseFilter">(sAMAccountName={0})</module-option>
<module-option name="rolesCtxDN">ou=authorizations,dc=mycompany,dc=it</module-option>
<module-option name="roleFilter">(member={1})</module-option>
<module-option name="roleAttributeID">cn</module-option>
<module-option name="roleAttributeIsDN">false</module-option>
<module-option name="roleRecursion">4</module-option>
<module-option name="roleNameAttributeID">cn</module-option>
<module-option name="searchScope">ONELEVEL_SCOPE</module-option>
<module-option name="allowEmptyPasswords">false</module-option>
</login-module>
</authentication>
</application-policy>
Code: Select all
The explanation for this kind of setup is that I want just some departments to be OKM Users and then I want to createprincipal.adapter = com.openkm.principal.LdapPrincipalAdapter
principal.database.filter.inactive.users =
principal.ldap.mail.attribute = mail
principal.ldap.mail.search.base = ou=users,dc=mycompany,dc=it
principal.ldap.mail.search.filte r= (&(objectClass=person)(sAMAccountName={0}))
principal.ldap.referral = follow
principal.ldap.role.attribute = cn
principal.ldap.role.search.base = ou=departments,dc=mycompany,dc=it
principal.ldap.role.search.filter = (objectClass=group)
principal.ldap.roles.by.user.attribute = memberOf
principal.ldap.roles.by.user.search.base = dc=mycompany,dc=it
principal.ldap.roles.by.user.search.filter = (&(objectClass=person)(sAMAccountName={0}))
principal.ldap.security.credentials = ldappwd
principal.ldap.security.principal = cn=ldapuse,ou=users,dc=mycompany,dc=it
principal.ldap.server = ldap://myldapserver:389
principal.ldap.user.attribute = sAMAccountName
principal.ldap.user.search.base = ou=users,dc=mycompany,dc=it
principal.ldap.user.search.filter = (objectClass=person)
principal.ldap.username.attribute = cn
principal.ldap.username.search.base = OU=users, DC=mycompany, DC=it
principal.ldap.username.search.filter = (&(objectClass=person)(sAMAccountName={0}))
principal.ldap.users.by.role.attribute = member
principal.ldap.users.by.role.search.base = dc=mycompany,dc=it
principal.ldap.users.by.role.search.filter = (&(objectclass=group)(sAMAccountName={0}))
at repository level department based access roles.
The issue here is that it seems that the login module of OKM doesn't allow users part dept1 and dept2 (thus OKM Users) to enter the application.
Opposite to this, if I give some users explicit memebership to OKM Users, they get to the app safe and sound (but don't respect my auth rules).
What I'm doing wrong here?
Thanks a lot for your support!
Last edited by fabpicca on Tue Jun 12, 2012 3:59 pm, edited 1 time in total.
