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

Allow resource pattern type to be set when managing ACLs #38

Closed
dmazhar-cogniance opened this issue Dec 12, 2018 · 3 comments · Fixed by #50
Closed

Allow resource pattern type to be set when managing ACLs #38

dmazhar-cogniance opened this issue Dec 12, 2018 · 3 comments · Fixed by #50

Comments

@dmazhar-cogniance
Copy link

Hi! Thanks for the awesome provider!
One thing that I'm missing in the ACL resource is an option ot set the resource-pattern-type. This allows to define ACLs with topic prefixes for example. So instead of creating the ACL with topic name I can set the topic prefix only. This is described in Kafka documentation: https://kafka.apache.org/documentation/#security_authz_cli (see --resource-pattern-type option).

It looks like implementing this would be tricky as sarama does not support this yet, am I right?

@Mongey
Copy link
Owner

Mongey commented Dec 12, 2018

Hi! Thanks for the awesome provider!

You're welcome!

It looks like implementing this would be tricky as sarama does not support this yet, am I right?

You're correct, resource-pattern-type was added in v1 of CreateACLRequest, and sarama only supports v0.

It's a pretty small change to the protocol -- I should be able to implement it in sarama and support it in this provider. The only tricky part will be optionally supporting this based on the version of Kafka that's targeted -- as resource-pattern-type only has an effect on Kafka 2.0 and above.

@dmazhar-cogniance
Copy link
Author

Failing if kafka 1.x is used is an option too! :) Another option will be to pass kafka version in the provider 🤔

@Mongey
Copy link
Owner

Mongey commented Dec 12, 2018

Another option will be to pass kafka version in the provider 🤔

👍 I'll probably go with this

📝 I've started on the sarama changes over @ IBM/sarama#1236. It's a bit more work than expected, as it requires updating Describe & Delete alongside Create.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants