• OpenKM 5: OpenLDAP + Mails

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #7846  by flekschas
 
Hi,
at first we're happy about the new version of OpenKM. Nearly everything works fine. There is just one old problem I'm unable to solve.
We're using OpenLDAP for authentication. In order to organize our users and their roles we have different groups in our directory. When trying to get the mail addresses of all users for notification we're unable to read out more than one group.

Our user directory looks like this:
Code: Select all
dc=de
   dc=charite
      ou=users
         ou=groupA
            uid=user1
            uid=user2
         ou=groupB
            uid=user3
      ou=roles
And our config
Code: Select all
principal.adapter=com.openkm.principal.LdapPrincipalAdapter
principal.ldap.server=ldap://localhost:389
principal.ldap.security.principal=cn=admin,dc=charite,dc=de
principal.ldap.security.credentials=***

principal.ldap.user.search.base=ou=users,dc=charite,dc=de
principal.ldap.user.search.filter=(objectclass=inetOrgPerson)
principal.ldap.user.attribute=uid
principal.ldap.users.by.role.search.filter=(&(objectClass=inetOrgPerson)(uid={0}))
principal.ldap.role.search.base=ou=roles,dc=charite,dc=de
principal.ldap.role.search.filter=(objectclass=groupOfNames)
principal.ldap.role.attribute=cn
principal.ldap.roles.by.user.search.filter=(&(objectClass=groupOfNames)(cn={0}))
principal.ldap.mail.search.base=uid={0},ou=groupA,ou=users,dc=charite,dc=de
principal.ldap.mail.search.filter=(objectclass=inetOrgPerson)
principal.ldap.mail.attribute=mail
In general I though about changing the mail setting to:
principal.ldap.mail.search.base=uid={0},ou=groupA,ou=users,dc=charite,dc=de (deleted)
principal.ldap.mail.search.filter=(&(objectclass=inetOrgPerson)(uid={0})) (added)
OpenKM should look for any user below the base and filter out the user's mail of the current uid. But unfortunately this does not work.

Any ideas how I could solve this problem?
Thanks
 #7855  by jllort
 
The problem is that's needed more complex query for getting more than one branch, and openkm by default not makes it. The solution to special ldap structure and other is creating a minimal class inspired in LdapPrincipalAdapter you can found here http://openkm.svn.sourceforge.net/viewv ... principal/

You need to compile it class, and build openkm, really it's not complicated ( it's easy ), but need some extra job ( install developer environment basically )
 #7901  by flekschas
 
Okay thanks! So now I know what to do.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.