You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "FrankYang0529 (via GitHub)" <gi...@apache.org> on 2025/01/08 10:05:33 UTC

[PR] KAFKA-18434: enrich the authorization error message of connecting to controller [kafka]

FrankYang0529 opened a new pull request, #18436:
URL: https://github.com/apache/kafka/pull/18436

   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 (https://github.com/apache/kafka/pull/14306#discussion_r1312367762) 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)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18434: enrich the authorization error message of connecting to controller [kafka]

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18436:
URL: https://github.com/apache/kafka/pull/18436#discussion_r1907079248


##########
core/src/main/scala/kafka/server/ControllerApis.scala:
##########
@@ -1065,7 +1065,8 @@ class ControllerApis(
     }
     // Unlike on the broker, DESCRIBE_CLUSTER on the controller requires a high level of
     // permissions (ALTER on CLUSTER).
-    authHelper.authorizeClusterOperation(request, ALTER)

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18434: enrich the authorization error message of connecting to controller [kafka]

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya merged PR #18436:
URL: https://github.com/apache/kafka/pull/18436


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18434: enrich the authorization error message of connecting to controller [kafka]

Posted by "FrankYang0529 (via GitHub)" <gi...@apache.org>.
FrankYang0529 commented on code in PR #18436:
URL: https://github.com/apache/kafka/pull/18436#discussion_r1907173940


##########
core/src/main/scala/kafka/server/ControllerApis.scala:
##########
@@ -1065,7 +1065,8 @@ class ControllerApis(
     }
     // Unlike on the broker, DESCRIBE_CLUSTER on the controller requires a high level of
     // permissions (ALTER on CLUSTER).
-    authHelper.authorizeClusterOperation(request, ALTER)

Review Comment:
   Thanks for review 😄.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org