dn:cn=Matthias,dc=localhostobjectclass:personobjectClass:inetOrgPersonsn:Mustermanncn:Matthiasmail:nob...@nobody.deuserpassword:manuuid:manu
ldapadd -x -D cn=admin,dc=localhost -W -f camunda.ldif
ldapsearch -H ldapi:/// -x -D "cn=Matthias,dc=localhost" -b "dc=localhost" -W
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <dc=localhost> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# localhost
dn: dc=localhost
objectClass: dcObject
objectClass: organization
o: localhost
dc: localhost
description: Tree root
# Matthias, localhost
dn: cn=Matthias,dc=localhost
objectClass: person
objectClass: inetOrgPerson
sn: Gnerlich
cn: Matthias
mail: nob...@nobody.de
userPassword:: bWFudQ==
uid: manu
mail:...@nobody.deuserpassword:manuuid:manu
If you use the LDAP plugin all users and groups are stored only in LDAP. The authorization is saved for a group/user in the engine database.
I hope this helps you a little to understand the authorization mechanism in camundaBPM.
For testing LDAP we use the following simple LDAP Structure:
-- first our test ldap tree:
o=camunda,c=com
|
|-- ou=qa-test,o=camunda,c=com
|
|-- ou=roles,ou=qa-test,o=camunda,c=com
| |
| |-- cn=accounting,ou=roles,ou=qa-test,o=camunda,c=com
|
|-- ou=users,ou=qa-test,o=camunda,com
| |
| |-- cn=ozzy,ou=users,ou=qa-test,o=camunda,c=com
This tree is only a snippet of the full testing tree.
I used the eclipse apache studio to export the following LDIF for the groups and users:
groups:
-------------------
version: 1
dn: cn=accounting,ou=roles,ou=qa-test,o=camunda,c=com
objectClass: groupOfNames
cn: accounting
member: uid=ozzy,ou=users,ou=qa-test,o=camunda,c=com
description: Kundenangebote, Standard Kundenablage, Marketing, usw.
user:
-------------------
version: 1
dn: uid=ozzy,ou=users,ou=qa-test,o=camunda,c=com
objectClass: posixAccount
objectClass: inetOrgPerson
objectClass: person
objectClass: top
cn: Ozzy
gidNumber: 1000
homeDirectory: /home/ozzy
sn: Ozzy
uid: ozzy
uidNumber: 1000
description: Ozzy Ozzy
givenName: Ozzy
mail: oz...@camunda.com
userPassword:: e1NIQX1yVVlPSmxXdnQwUTVjbFA1UzdjZTZYYk05Ync9
And we test it with the following ldap plugin configuration:
<plugin>
<class>
org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin
</class>
<properties>
<property name="serverUrl">
ldap://ldap.camunda.com:636/
</property>
<property name="acceptUntrustedCertificates">
true
</property>
<property name="managerDn">
<ADMIN CN>
</property>
<property name="managerPassword">
<ADMIN PASSWORD>
</property>
<property name="useSsl">
true
</property>
<property name="baseDn">
o=camunda,c=com
</property>
<property name="userSearchBase">
ou,users,ou=qa-test
</property>
<property name="userSearchFilter">
(objectclass=person)
</property>
<property name="userIdAttribute">
uid
</property>
<property name="userFirstnameAttribute">
cn
</property>
<property name="userLastnameAttribute">
sn
</property>
<property name="userEmailAttribute">
mail
</property>
<property name="userPasswordAttribute">
userPassword
</property>
<property name="groupSearchBase">
ou=roles,ou=qa-test
</property>
<property name="groupSearchFilter">
(objectclass=groupOfNames)
</property>
<property name="groupIdAttribute">
cn
</property>
<property name="groupNameAttribute">
cn
</property>
<property name="groupMemberAttribute">
member
</property>
</properties>
</plugin>
<plugin>
<class>
org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin
</class>
<properties>
<property name="administratorUserName">
<ADMIN USERNAME>
</property>
</properties>
</plugin>
Only for information purpose:
I used the following guide to create the test-ldap: http://wiki.ubuntuusers.de/OpenLDAP
I hopt this will help you to advance in this topic :-)
Cheers,
Stefan