feat: revoke Kafka Topic grants - #517
Merged
Merged
Conversation
christeredvartsen
force-pushed
the
revoke-kafka-grant-access
branch
from
September 9, 2026 11:56
9291205 to
29a5635
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The update logic can incorrectly skip re-adding a grant when the same grant appears in both revokeGrants and addGrants in a single request.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds support for revoking Kafka Topic grants via the existing updateKafkaTopic mutation by introducing a revokeGrants input field and translating it into JSON Patch remove operations against the Topic ACL list.
Changes:
- Extend
UpdateKafkaTopicInput(Go + GraphQL) withrevokeGrants. - Implement revoke behavior by generating JSON Patch remove ops for matching ACL entries.
- Add integration tests covering authorization and revoke + combined add/revoke flows.
File summaries
| File | Description |
|---|---|
| internal/persistence/kafkatopic/queries.go | Build JSON Patch remove operations to revoke ACL grants during topic update. |
| internal/persistence/kafkatopic/models.go | Add RevokeGrants to the update input model. |
| internal/graph/schema/kafka.graphqls | Expose revokeGrants in the public GraphQL schema with a description. |
| internal/graph/gengql/root_.generated.go | Regenerated schema output reflecting revokeGrants. |
| internal/graph/gengql/kafka.generated.go | Regenerated unmarshalling to populate RevokeGrants. |
| integration_tests/update_kafka_topic.lua | Add integration coverage for revoke authorization and behavior. |
Review details
Files not reviewed (1)
- internal/graph/gengql/kafka.generated.go: Generated file
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+155
to
158
| seen = make(map[string]struct{}) | ||
| for _, grant := range input.AddGrants { | ||
| key := grant.Access.AivenAccess() + "|" + grant.TeamName + "|" + grant.Subject | ||
| if _, ok := seen[key]; ok { |
christeredvartsen
force-pushed
the
revoke-kafka-grant-access
branch
from
September 9, 2026 12:08
29a5635 to
10b8b10
Compare
christeredvartsen
enabled auto-merge (squash)
September 9, 2026 12:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.