Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin.describeAcls failes with "Cluster authorization failed" #1736

Open
anupam0303 opened this issue Feb 7, 2025 · 0 comments
Open

admin.describeAcls failes with "Cluster authorization failed" #1736

anupam0303 opened this issue Feb 7, 2025 · 0 comments

Comments

@anupam0303
Copy link

Describe the bug
I have created an admin client for Kafka. I am able to use this for listTopics, listGroups & describeGroups without any problem. But as soon as I try describeAcls, it ends up in below error:

{
"level": "ERROR",
"timestamp": "2025-02-07T08:27:32.998Z",
"logger": "kafkajs",
"message": "[Connection] Response DescribeAcls(key: 29, version: 1)",
"broker": "b-1.i--------------------:9096",
"clientId": "portal-app",
"error": "Cluster authorization failed",
"correlationId": 5,
"size": 260
}

To Reproduce
Here is the piece of code that fails:
const kafka = new Kafka({
clientId: "portal-app",
brokers,
ssl: true, // Enable SSL
sasl: {
mechanism: "scram-sha-512",
username,
password,
},
});

const admin = kafka.admin();
console.log("Connecting to Kafka broker...");
await admin.connect();

// get ACLS for a topic
const topic = "my.topic";
const acl = await admin.describeAcls({
  resourceType: AclResourceTypes.TOPIC,
  resourceName: topic,
  resourcePatternType: ResourcePatternTypes.LITERAL,
  operation: AclOperationTypes.ALL,
  permissionType: AclPermissionTypes.ALLOW,
});
  1. failing test in a KafkaJS fork
  2. repository with an example project reproducing the issue

Expected behavior
It should be able to describe the acls

Environment:

  • AWS MSK
  • KafkaJS version [2.2.4]
  • Kafka version [2.7.2]
  • NodeJS version [18]

Additional context
There is zookeeper used to define ACLs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant