I've got a Kerberos SASL_SSL enabled Kafka authentication and the default kafka.security.authorizer.AclAuthorizer authorization setup in place. All the necessary ACLs (which i believe) is there in place however when i try to produce a message it results with the following error [2021-07-30 09:19:33,397] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 3 : {camtmodified.v1=TOPIC_AUTHORIZATION_FAILED} (org.apache.kafka.clients.NetworkClient) [2021-07-30 09:19:33,399] ERROR [Producer clientId=console-producer] Topic authorization failed for topics [camtmodified.v1] (org.apache.kafka.clients.Metadata) [2021-07-30 09:19:33,400] ERROR Error when sending message to topic camtmodified.v1 with key: null, value: 8 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.TopicAuthorizationException: Not authorized to access topics: [camtmodified.v1]
Following is the ACL list i have in place which i believe is what is sufficient, as this is the same list of ACLs i have enabled for few other principals which seem to be work fine but not just this one "user:credusr"
Current ACLs for resource ResourcePattern(resourceType=TOPIC, name=camtmodified.v1, patternType=LITERAL)
:
(principal=cluster:kafka-cluster, host=, operation=WRITE, permissionType=ALLOW)
(principal=Group:, host=, operation=DESCRIBE, permissionType=ALLOW)
(principal=cluster:kafka-cluster, host=, operation=READ, permissionType=ALLOW)
(principal=user:credusr, host=, operation=DESCRIBE, permissionType=ALLOW)
(principal=user:credusr, host=, operation=READ, permissionType=ALLOW)
(principal=Group:, host=, operation=READ, permissionType=ALLOW)
(principal=cluster:kafka-cluster, host=, operation=DESCRIBE, permissionType=ALLOW)
(principal=user:credusr, host=, operation=CREATE, permissionType=ALLOW)
(principal=cluster:kafka-cluster, host=, operation=CREATE, permissionType=ALLOW)
(principal=user:credusr, host=, operation=WRITE, permissionType=ALLOW)
Current ACLs for resource ResourcePattern(resourceType=CLUSTER, name=kafka-cluster, patternType=LITERAL)
:
(principal=user:credusr, host=, operation=ALL, permissionType=ALLOW)
(principal=cluster:kafka-cluster, host=, operation=ALL, permissionType=ALLOW)
(principal=Cluster:kafka-cluster, host=*, operation=IDEMPOTENT_WRITE, permissionType=ALLOW)
Current ACLs for resource ResourcePattern(resourceType=GROUP, name=*, patternType=LITERAL)
:
(principal=User:credusr, host=, operation=DESCRIBE, permissionType=ALLOW)
(principal=Group:, host=, operation=DESCRIBE, permissionType=ALLOW)
(principal=cluster:kafka-cluster, host=, operation=READ, permissionType=ALLOW)
(principal=user:credusr, host=, operation=READ, permissionType=ALLOW)
(principal=User:credusr, host=, operation=DESCRIBE, permissionType=ALLOW)
(principal=Group:, host=, operation=READ, permissionType=ALLOW)
(principal=group:, host=, operation=READ, permissionType=ALLOW)
I did enable the DEBUG mode for kafka authorization logs and see the following entries. As the DESCRIBE operation is explicity allowed as shown in the ACL list - i'm not sure why it's complaining the DESCRIBE operation as denied, unless the log message is quite misleading!
[2021-07-29 13:40:49,750] INFO Principal = User:credusr is Denied Operation = Describe from host = 10.X.X.X on resource = Topic:LITERAL:camtmodified.v1 for request = Metadata with resourceRefCount = 1 (kafka.authorizer.logger)
[2021-07-29 13:40:49,751] INFO Principal = User:credusr is Denied Operation = IdempotentWrite from host = 10.X.X.X on resource = Cluster:LITERAL:kafka-cluster for request = InitProducerId with resourceRefCount = 1 (kafka.authorizer.logger)
[2021-07-29 13:40:50,678] INFO Principal = User:credusr is Denied Operation = Describe from host = 10.X.X.X on resource = Topic:LITERAL:camtmodified.v1 for request = Metadata with resourceRefCount = 1 (kafka.authorizer.logger)
Any suggestions will be much appreciated.
Thanks