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

Producer tries to Describe topics it has no access to #722

Closed
daft-panda opened this issue Aug 8, 2016 · 0 comments
Closed

Producer tries to Describe topics it has no access to #722

daft-panda opened this issue Aug 8, 2016 · 0 comments
Labels

Comments

@daft-panda
Copy link

Versions

Sarama Version: 9bb4a68
Kafka Version: 0.10
Go Version: 1.6

Configuration

Kafka configured with ACLs (kafka.security.auth.SimpleAclAuthorizer) based on X.509 cert subject names.

Sarama config:

pcfg := sarama.NewConfig()
pcfg.Net.TLS.Enable = true
pcfg.Net.TLS.Config = config.TLSConfig()
pcfg.Producer.RequiredAcks = sarama.WaitForAll
pcfg.ClientID = "clientID"
pcfg.Version = sarama.V0_10_0_0

Logs

(Sarama) log output:

INFO[0000] Initializing new client
INFO[0000] client/metadata fetching metadata for all topics from broker localhost:9092
FATA[0000] Failed to create producer for server [localhost:9092]: kafka server: The client is not authorized to access this topic.

Kafka Authorizer DEBUG log output:

[2016-08-08 20:22:33,436] DEBUG Principal = User:CN=client,... is Allowed Operation = Describe from host = 127.0.0.1 on resource = Topic:A (kafka.authorizer.logger)
[2016-08-08 20:22:33,436] DEBUG Principal = User:CN=client,... is Denied Operation = Describe from host = 127.0.0.1 on resource = Topic:B (kafka.authorizer.logger)

Problem Description

Sarama seems to try to describe all topics when a producer is created, but if there is one or more topics that it has no access to, the producer creation fails.

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

No branches or pull requests

2 participants