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

kadm: add func to decode AuthorizedOperations #870

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

weeco
Copy link
Contributor

@weeco weeco commented Dec 5, 2024

The authorized operations is an int32 bitfield
that represents ACL operations. This commit adds
a func that allows to decode the bitfield into
a slice of kmsg.ACLOperation values. This bitfield
is used in the metadata, describe clusters and
describe groups API responses.

Fixes #869

The authorized operations is an int32 bitfield
that represents ACL operations. This commit adds
a func that allows to decode the bitfield into
a slice of kmsg.ACLOperation values. This bitfield
is used in the metadata, describe clusters and
describe groups API responses.
@twmb twmb added the kadm Anything related to kadm specifically label Jan 8, 2025
pkg/kadm/acls.go Outdated
// - Cluster Operations: Retrieved via the DescribeCluster API or older Metadata API versions (v8–v10).
// - Topic Operations: Retrieved via the Metadata API when `IncludeTopicAuthorizedOperations` is set.
// - Group Operations: Retrieved in the DescribeGroups API response.
func DecodeACLOperations(bitfield int32) []kmsg.ACLOperation {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this return an ACLOperation, from this package? It's a type alias, so I think only this line needs to change.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to have a follow up PR that adds authorized operations fields to this package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@twmb twmb added the waiting label Jan 8, 2025
@twmb twmb removed the waiting label Jan 15, 2025
@twmb twmb mentioned this pull request Jan 15, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kadm Anything related to kadm specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decoding AuthorizedOperations bitfield
2 participants