Configure a Spring Boot Project - Customize Configuration

Hello,

if I use camunda with Spring Boot, a user can be preconfigured in the preferences using application.yml. This example can be found in the “Get Started” under “Get started with Camunda and the Spring Boot”:

camunda.bpm:
admin-user:
id: kermit
password: superSecret
firstName: Kermit
filter:
create: All tasks

With the help of these settings, I get an admin user with the rights of an admin.

Is it also possible to define other roles like a normal-user in the preferences (in the yml-file) or is it also possible to define groups in this preferences?

Thanks

This is not supported. I started implementing this feature, but then noticed that the config becomes very complicated if you use all possible user fields and consider authorizations.

But you can easily create it for your concrete use case: Just implement a ProcessEnginePlugin bean and use the postProcessEngineBuild() hook to get the Identity Service and create users/groups. You could read custom yaml or use spring configuration properties to describe your users and groups.

2 Likes

Thank you for the information.
Do you know an example, for example on GitHub, that shows this case?

Hi @fit_user,

have a look at this class: https://github.com/camunda/camunda-bpm-platform/blob/master/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/DemoDataGenerator.java

Just call it in the postProcessEngineBuild().

Hope this helps, Ingo

2 Likes