# Using Spring Security for user management in Flowable

**URL:** <https://forum.flowable.org/t/using-spring-security-for-user-management-in-flowable/2477>\
**Category:** Flowable Engine\
**Created:** [August 30, 2018, 11:11am UTC](https://forum.flowable.org/t/using-spring-security-for-user-management-in-flowable/2477 "2018-08-30T11:11:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelvin.johnson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kelvin.johnson/32/785_2.png) [@kelvin.johnson](https://forum.flowable.org/u/kelvin.johnson)\
**Post date:** [August 30, 2018, 11:11am UTC](https://forum.flowable.org/t/using-spring-security-for-user-management-in-flowable/2477/1 "2018-08-30T11:11:08Z")

</div>

Hello,

I would like to use my own user database and existing Spring Security setup. I have explored various ways of doing this.

1. I’ve seen posts that say to implement a custom IdentityServiceUserDetailsService.

2. I’ve seen posts that advocate implementing a custom UserEntityManagerImpl and GroupEntityManagerImpl and injecting a jdbcUserDetailsManager bound to a custom authentication database.

Which is the “correct” way of doing this? I assume the answer may start with something like “it depends…”. If so, then what are the pros and cons of doing this one way over another.

Also, I do not want to lose any Flowable functionality. I need a solution that will still allow me to query tasks for candidate groups and users and such.

Additionally, I am using Spring Boot. What is the proper way of modifying Flowable’s auto configuration with my custom authentication?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![tijs](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tijs](https://forum.flowable.org/u/tijs)\
**Post date:** [August 31, 2018, 6:28am UTC](https://forum.flowable.org/t/using-spring-security-for-user-management-in-flowable/2477/2 "2018-08-31T06:28:18Z")

</div>

Hi,

The best approach is to implement similar logic like was done in the Flowable LDAP module:

> **[flowable/flowable-engine](https://github.com/flowable/flowable-engine/tree/master/modules/flowable-ldap)**
>
> A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users. - flowable/flowable-engine

This means implementing a custom version of the IdmIdentityService:

> <https://github.com/flowable/flowable-engine/blob/master/modules/flowable-ldap/src/main/java/org/flowable/ldap/LDAPIdentityServiceImpl.java>

Then you can inject this instance of the identity service in the process engine configuration and you should be good to go. You can also implement an IdmEngineConfigurator and then add the configurator the the process engine configuration:

> <https://github.com/flowable/flowable-engine/blob/master/modules/flowable-ldap-configurator/src/main/java/org/flowable/ldap/LDAPConfigurator.java>

Best regards,

Tijs

---

<div class="post-metadata">

**Author:** ![kelvin.johnson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kelvin.johnson/32/785_2.png) [@kelvin.johnson](https://forum.flowable.org/u/kelvin.johnson)\
**Post date:** [September 4, 2018, 6:54pm UTC](https://forum.flowable.org/t/using-spring-security-for-user-management-in-flowable/2477/3 "2018-09-04T18:54:30Z")

</div>

Thanks Tijs!  
Now that I am back from vacation, I will implement this.

Any plans for a new workflow\process engine book to follow up the Manning Press one?

---

<div class="post-metadata">

**Author:** ![tijs](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tijs](https://forum.flowable.org/u/tijs)\
**Post date:** [September 4, 2018, 7:33pm UTC](https://forum.flowable.org/t/using-spring-security-for-user-management-in-flowable/2477/4 "2018-09-04T19:33:58Z")

</div>

Ok great. We are currently having some initial conversations with Manning, so maybe we can share some news about that in a few weeks time 😉

Best regards,

Tijs
