FrankYang0529 commented on code in PR #19364:
URL: https://github.com/apache/kafka/pull/19364#discussion_r2030671804
##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -1520,6 +1520,10 @@ class KafkaApis(val requestChannel: RequestChannel,
requestHelper.sendErrorResponseMaybeThrottle(request,
Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED.exception)
return
}
+ if (initProducerIdRequest.enable2Pc() &&
!authHelper.authorize(request.context, TWO_PHASE_COMMIT, TRANSACTIONAL_ID,
transactionalId)) {
+ requestHelper.sendErrorResponseMaybeThrottle(request,
Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED.exception)
Review Comment:
The `TRANSACTIONAL_ID_AUTHORIZATION_FAILED` is returned when client lacks
either `WRITE` or `TWO_PHASE_COMMIT` permissions. Should we include information
about which specific permission needs to be granted to the user in order to
complete the 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]