Login to camunda web app using JWT token


I have developed Auth service as a separate service that connects to IDP provider does the authentication and provides JWT token.

Then I pass on this JWT token to Camunda service ( Spring Boot embedded) in the request header and added filter validate JWT token and parse the JWT and create UsernamePasswordAuthenticationToken and set into SecurityContextHolder .

Then I registered these two filter one for Camunda Web App (ContainerBasedAuthenticationFilter) and another one for REST api (ProcessEngineAuthenticationFilter) .

I then implemented a class that implements the org.camunda.bpm.engine.rest.security.auth.AuthenticationProvider interface.

With this approach, I was able to call Camunda REST api with JWT token. But I was unable to login to Camunda web app ( as I was unable to pass token in header ) .

I would like know is there any way we will be able to login to Camunda UI using JWT ?

@pradeep.poojari web apps is a different application, so you need to configure the filters for the web app.

Thanks @StephenOTT , I was successfully able to implement login to webapp using JWT.

I am storing JWT token in browser cookies and reading the cookies in Filter and passing it on an authenticated user to ContainerBasedAuthenticationFilter.

Can you post u r code snippet here?

1 Like