tchiotludo / akhq

Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
https://akhq.io/
Apache License 2.0
3.28k stars 637 forks source link

reload security configuration at runtime #502

Open jorgheymans opened 3 years ago

jorgheymans commented 3 years ago

I noticed that Micronaut has a @Refreshable scope, would it be trivial to use this to reload the security configuration part of AKHQ ? We regularly onboard new teams on the tool, with their own ldap groups etc and right now they have to wait until the next day (nightly restart) to get access.

tchiotludo commented 3 years ago

I see that @Refreshable scope but never have the time to look at to understand how it works ! Maybe this issue will be the good reason ? :smile:

jorgheymans commented 3 years ago

If it works anything like the Spring refresh scope, basically the container will reload the bean, run it through its lifecycle and then wire the new instance into all beans using it. It should be pretty straight forward. What bean is responsible for storing the security configuration ? I can give it a try.

tchiotludo commented 3 years ago

All the bean for configurations are here : https://github.com/tchiotludo/akhq/tree/dev/src/main/java/org/akhq/configs.

Maybe just add @Refreshable on all of these will do the trick ?

jorgheymans commented 3 years ago

@Refreshable only works on managed beans, i.e. the services loading the configuration in this case.