omkreddy commented on code in PR #10738:
URL: https://github.com/apache/kafka/pull/10738#discussion_r867519629
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -3285,7 +3285,7 @@ class KafkaApisTest {
assertEquals(metadataCache.getControllerId.get,
describeClusterResponse.data.controllerId)
assertEquals(clusterId, describeClusterResponse.data.clusterId)
- assertEquals(8096,
describeClusterResponse.data.clusterAuthorizedOperations)
+ assertEquals(32672,
describeClusterResponse.data.clusterAuthorizedOperations)
Review Comment:
this change is not required now
##########
core/src/test/scala/unit/kafka/security/token/delegation/DelegationTokenManagerTest.scala:
##########
@@ -315,13 +314,20 @@ class DelegationTokenManagerTest extends
QuorumTestHarness {
List()
}
else {
- def authorizeToken(tokenId: String) = {
+ def authorizeToken(tokenId: String): Boolean = {
val requestContext =
AuthorizerUtils.sessionToRequestContext(hostSession)
val action = new Action(AclOperation.DESCRIBE,
new ResourcePattern(DELEGATION_TOKEN, tokenId, LITERAL), 1, true,
true)
aclAuthorizer.authorize(requestContext,
List(action).asJava).asScala.head == AuthorizationResult.ALLOWED
}
- def eligible(token: TokenInformation) =
DelegationTokenManager.filterToken(requestPrincipal, Option(requestedOwners),
token, authorizeToken)
+ def authorizeRequester(owner: KafkaPrincipal): Boolean = {
+ val requestContext =
AuthorizerUtils.sessionToRequestContext(hostSession)
+ val action = new Action(AclOperation.DESCRIBE,
Review Comment:
This is still using `DESCRIBE` operation
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]