aXe
aXe

Reputation: 101

How is possible to do topic authorization in Kafka?

My system will have multiple customers, topics will be the customers, named with special codes.

Where is a way to implement Kafka topic authorization and to set them from code?

For example, from AdminClient is possible to create a topic, with some settings?

Upvotes: 0

Views: 701

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191884

Yes, using confluent-dotnet-kafka's AdminClient, you can create topics. Topic configs can be passed to TopicSpecification objects, but this does not include authentication details, as that is managed elsewhere, not exactly on a at-creation or per-topic basis. Refer Github example

No, you cannot use AdminClient to specify ACLs, as this largely depends on the authorizer.class.name setup in the broker's server.properties. By default, the Zookeeper Authorizer uses special kafka-acls script.

This does not preclude writing/finding your own Authorizer that can be managed over some HTTP interface from .NET, however, or even using shell calls in .NET that wrap the kafka-acls script

Upvotes: 0

Related Questions