I have configured the MSK cluster and allowed public access through SASL/SCRAM authentication method. Now I am facing the issue where I do not have the necessary permissions when using these credentials (specified in the Secrets Manager created with a custom key). The connecting client can perform certain operations (e.g. retrieve metadata) but fails to fetch or create topics or publish a new message to the existing topic. I am using Confluent as the library and here is a simplified example of the configuration that I am using (this is probably not relevant at all but is here to support an explanation of the issue).
BootstrapServers = Config.KafkaBootstrapServers,
SaslMechanism = SaslMechanism.ScramSha512, // only supported option by AWS
SecurityProtocol = SecurityProtocol.SaslSsl,
SaslUsername = Config.Username, // username from secrets manager
SaslPassword = Config.Password, // password from secrets manager
ClientId = Config.Client,
Acks = Acks.All
The error I get is Confluent.Kafka.Admin.CreateTopicsException: An error occurred creating topics: [topic]: [Authorization failed.]
How can I assign higher permissions? Since it is a managed Kafka service, there is no option to modify this on broker level directly. And since there is no user behind these credentials (since I am not using IAM auth method), I cannot assign a specific policy to it allowing certain operations like topic creation. What are the options here?
This page explains how ACLs are generally configured on Kafka but not on MSK. Am I missing something here?