Skip to content

KAFKA-18434: enrich the authorization error message of connecting to controller#18436

Merged
divijvaidya merged 1 commit intoapache:trunkfrom
FrankYang0529:KAFKA-18434
Jan 8, 2025
Merged

KAFKA-18434: enrich the authorization error message of connecting to controller#18436
divijvaidya merged 1 commit intoapache:trunkfrom
FrankYang0529:KAFKA-18434

Conversation

@FrankYang0529
Copy link
Copy Markdown
Member

DESCRIBE_CLUSTER request needs ALTER permission when connecting to controller. However, the error message does not include the reason. There is a good explanation in the origin PR (#14306 (comment)) and we should add it to the exception message.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions Bot added core Kafka Broker small Small PRs labels Jan 8, 2025
}
// Unlike on the broker, DESCRIBE_CLUSTER on the controller requires a high level of
// permissions (ALTER on CLUSTER).
authHelper.authorizeClusterOperation(request, ALTER)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unrelated to this PR but probably good to have. Could we update authorizeClusterOperation to log the missing permission as well in the exception.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for review 😄.

…controller

Signed-off-by: PoAn Yang <payang@apache.org>
@divijvaidya divijvaidya merged commit 4b1b67e into apache:trunk Jan 8, 2025
@FrankYang0529 FrankYang0529 deleted the KAFKA-18434 branch January 9, 2025 11:42
pranavt84 pushed a commit to pranavt84/kafka that referenced this pull request Jan 27, 2025
…controller (apache#18436)

Reviewers: Divij Vaidya <diviv@amazon.com>
manoj-mathivanan pushed a commit to manoj-mathivanan/kafka that referenced this pull request Feb 19, 2025
…controller (apache#18436)

Reviewers: Divij Vaidya <diviv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants