cancel
Showing results for 
Search instead for 
Did you mean: 

Issues while integrating activiti explorer 5.20 with LDAP

jaiparkashyadav
Champ in-the-making
Champ in-the-making

Hi Experts,

I am using activiti-explorer 5.20. I was trying to integrate it with LDAP (Active Directory). So i have put the activiti-ldap-5.20.0.jar jar inside \activiti-explorer\WEB-INF\lib and changed the activiti-custom-context.xml, please see:


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

<bean id="dbProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:db.properties" />
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="defaultAutoCommit" value="false" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
<property name="enableDatabaseEventLogging" value="true" />
<property name="customFormTypes">
<list>
<bean class="org.activiti.explorer.form.UserFormType"/>
<bean class="org.activiti.explorer.form.ProcessDefinitionFormType"/>
<bean class="org.activiti.explorer.form.MonthFormType"/>
<bean class="org.activiti.explorer.form.SbuFormType"/>
</list>
</property>
<property name="configurators">
<list>
<bean class="org.activiti.ldap.LDAPConfigurator">

<!-- Server connection params -->
<property name="server" value="ldap://LDAP url" />
<property name="port" value="389" />
<property name="user" value="test" />
<property name="password" value="password" />

<!-- Query params -->
<property name="baseDn" value="DC=domain,DC=net" />
<property name="queryUserByUserId" value="(&amp;(objectClass=person)(cn={0}))" />
<!--<property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
<property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />-->

<!-- Attribute config -->
<property name="userIdAttribute" value="cn" />
<property name="userFirstNameAttribute" value="givenName" />
<property name="userLastNameAttribute" value="sn" />

<property name="groupIdAttribute" value="cn" />
<property name="groupNameAttribute" value="cn" />

</bean>
</list>
</property>
</bean>

<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean" destroy-method="destroy">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>

<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="formService" factory-bean="processEngine" factory-method="getFormService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
<bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />

</beans>

Now i am getting below error:

2018-01-23 04:41:08,586 org.activiti.ldap.LDAPConnectionUtil createDirectoryContext - Could not create InitialDirContext for LDAP connection : [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580

Any help or pointer will be highly appreciated.

Regards,
Jai

2 REPLIES 2

jaiparkashyadav
Champ in-the-making
Champ in-the-making

Hi Experts,

I am able to fix the issue of LDAP integration. The problem was incorrect baseDn.

Now facing another challenge, I want user authentication from LDAP but group management from activiti data base .

Is that possible in activti explorer.

Please suggest.

Regards,

Jai

daisuke-yoshimo
Star Collaborator
Star Collaborator

> Now facing another challenge, I want user authentication from LDAP but group management from activiti data base .

Is that possible in activti explorer.

I think that it can not be done just by setting because it is a different usage from the assumption.

If you want to do so, please customize or extend org.activiti.ldap.LDAPGroupManager.class.

This class is related to group resolution.

Activiti/LDAPGroupManager.java at 5.x · Activiti/Activiti · GitHub 

・Reference

Activiti User Guide