feat(groups): clear 403 + allowed-prefix hint for create-group ACL denials#14
Merged
Merged
Conversation
…ed group prefixes Detect Kafka authorization failures in CreateGroup (top-level topic lookup and per-partition offset commit) and return ErrNotAuthorized -> 403 with a clear message instead of a generic 502. The modal surfaces the error instead of closing as success, and shows the allowed GROUP name patterns from the cluster ACLs when the key can read them. Signed-off-by: FinkeFlo <florian.kube@gmail.com>
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.
Summary
Makes a failed create consumer group understandable when the cluster's
ACLs don't permit the group name (previously a generic 502, so it looked like
a credentials problem).
Backend
CreateGroupdetects Kafka authorization failures(
GROUP_/TOPIC_/CLUSTER_AUTHORIZATION_FAILED) on both the top-level path(topic offset lookup) and the per-partition path (a denied offset commit,
where
GROUP_AUTHORIZATION_FAILEDactually surfaces). It returns a newErrNotAuthorized, mapped to 403 with a clear message instead of ageneric 502. A denied commit no longer reports success.
Frontend (create-group modal)
the cluster ACLs (ALLOW on the
GROUPresource; PREFIXED shown with*).Reading ACLs needs cluster
DESCRIBE; when the key can't, the hint is simplyomitted (graceful) and the clear 403 still explains the failure.
on a denied or partially-errored commit.
Gates
Backend:
go build✓go vet✓go test ./internal/server/... ./pkg/kafka/...✓ (newisAuthorizationFailuretest).Frontend:
npm run lint✓npm run build✓npm run check:palette✓ · Vitest 269 passed.