Start process with rest api with specific group

Hello, I have a process, called Kprocess, and just allow members of a specific group to start it. The group is called myGroup. I tried to use Rest API to start this process. I don’t know what I can attach the member user name and password to authorize it.
I used “POST http://localhost:8080/engine-rest/process-definition/key/Kprocess/start” without parameters. It returned bellow:

"type": "NullPointerException",
"message": "Cannot invoke \"org.camunda.bpm.engine.impl.identity.Authentication.getUserId()\" because the return value of \"org.camunda.bpm.engine.IdentityService.getCurrentAuthentication()\" is null"

Anyone can help me? Thank you.

Hello @alexlam ,

by default, the authentication of the REST API is not enabled, so sending a request there is anonymous.

So, if members of a specific group inside your RBAC inside the engine are allowed to start a process, they should authenticate first. This can be done, depending on the platform you are using, by adding a filter in front of the /engine-rest/*

Hope this helps


1 Like