Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Reload of topic policies and KMS definitions #10

Open
robobario opened this issue Jul 10, 2023 · 1 comment
Open

Dynamic Reload of topic policies and KMS definitions #10

robobario opened this issue Jul 10, 2023 · 1 comment
Assignees

Comments

@robobario
Copy link

We could implement dynamic updating of policies and KMS definitions in Kroxylicious without it being implemented upstream.

We could set up watches on the files for changes, or naively reload the configuration periodically. Then on update we load it in and swap out the old set of policies.

Upstream offers the PolicyRepository so we could build it using this and PR it back.

Maybe there's some way to establish it as a pattern that could be used with other implementations, like if the TopicPolicies are stored externally in something like vault.

We could make this in-memory reloading implementation that can ask whether/when a delegate PolicyRepository has been modified and therefore that it's cache is invalid and it should reload. Maybe it's a two way thing since a modification is more like an event that should be pushed out of the delegate and reacted to in the caching reloader.

@robobario
Copy link
Author

There's a bit more to it. io.strimzi.kafka.topicenc.EncryptionModule caches a map from topic -> EncrypterDecrypter with no expiry, so it's this class that would change. Maybe this method EncrypterDecrypter getTopicEncrypter(String topicName) is the bit that should be extracted into an interface.

@robobario robobario self-assigned this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant