camunda-community-hub / micronaut-camunda-platform-7

Integration between Micronaut and Camunda (Workflow Engine). We configure Camunda with sensible defaults, so that you can get started with minimum configuration: simply add a dependency in your Micronaut project to embed the workflow engine!
https://camunda.com/blog/2021/07/automate-any-process-on-micronaut/
Apache License 2.0
75 stars 31 forks source link

Make authentication provider a configuration option #439

Closed datakurre closed 2 years ago

datakurre commented 2 years ago

I wanted to customize authentication to support custom JWT authentication, and had to make a volt for something that could be a configurable string.

Authentication provider is configured at https://github.com/camunda-community-hub/micronaut-camunda-platform-7/blob/94e1b4085fbee783af91c1aa8931f8e43189fe3c/micronaut-camunda-bpm-feature/src/main/java/info/novatec/micronaut/camunda/bpm/feature/rest/JettyServerCustomizerRuntimeRest.java#L86

Overriding that was possible https://github.com/datakurre/collective.bpmproxy/blob/dd97b4f733fdf2b84c668e40187817002eb8b2c6/camunda/src/main/java/com/example/camunda/JettyServerCustomizerRuntimeAuth.java#L44

But as a configurable option, it would have been :cake:

tobiasschaefer commented 2 years ago

Hi @datakurre ,

That sounds like a sensible feature request.

Do you want to try to create pull request? To me that would have simpler than your replace logic 😀

Todo

datakurre commented 2 years ago

@tobiasschaefer Thanks for those pointers! I’ll see later if I can do this 💪 Probably would have been faster to do the option in the first place 😅

tobiasschaefer commented 2 years ago

Hey @datakurre ,

please try release 2.11.0 which has the option to configure the authentication-provider.

see configuration option camunda.rest.authentication-provider

datakurre commented 2 years ago

@tobiasschaefer Wow! Thanks. So good I used my time to debug long poll issue instead. Will update that issue with more details soon...

tobiasschaefer commented 2 years ago

Thanks. That's team work 😀

datakurre commented 2 years ago

Confirm that this works. Although, one must both enable basic auth and define custom provider, but it is probably safer that way.

tobiasschaefer commented 2 years ago

Hi @datakurre ,

good point!

IMHO if someone (you 😀) configures a custom authentication provider he should know what he is doing. I don't see a reason why basic auth should be required since it would be used anyway. Correct?

Does this PR look good to you? https://github.com/camunda-community-hub/micronaut-camunda-platform-7/pull/448