Open nimarezainia opened 5 months ago
The first step here will be getting a test environment with both Kafka and Kerberos using Active Directory.
We can then test if we can fix this by upgrading our fork of https://github.com/elastic/sarama which implements our Kafka client. This is quite far (~700 commits) behind upstream now. There is an upstream Kerberos test we could use as a starting point https://github.com/IBM/sarama/blob/main/kerberos_client_test.go. This appears to have been added in https://github.com/IBM/sarama/pull/2457.
We can simulataneously evaluate if it is worth continuing to maintain our own fork of Sarama, or even evaluate alternative client packages, although that will present challenges with configuration backwards compatibility. https://github.com/twmb/franz-go is one alternative that claims Kerberos support.
Moving this to the beats repo as the majority of the work is over there.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)
The first step here will be getting a test environment with both Kafka and Kerberos using Active Directory.
We can then test if we can fix this by upgrading our fork of https://github.com/elastic/sarama which implements our Kafka client. This is quite far (~700 commits) behind upstream now. There is an upstream Kerberos test we could use as a starting point https://github.com/IBM/sarama/blob/main/kerberos_client_test.go. This appears to have been added in IBM/sarama#2457.
We can simulataneously evaluate if it is worth continuing to maintain our own fork of Sarama, or even evaluate alternative client packages, although that will present challenges with configuration backwards compatibility. https://github.com/twmb/franz-go is one alternative that claims Kerberos support.
kafka exporter in otel seems to have support for kerberos although there's no way of telling whether it works with AD. How would one tell which implementation of the kafka client is being used there?
Thinking ahead, if we were to utilise otel for this feature I see the following priorities:
Which ever way we choose to go, building a testing environment for this first is a must.
It is the same as ours, github.com/IBM/sarama
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/5427c934ebcad5dfb77bca48e44b063349b6e4f4/internal/kafka/authentication.go#L12
It is the same as ours,
github.com/IBM/sarama
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/5427c934ebcad5dfb77bca48e44b063349b6e4f4/internal/kafka/authentication.go#L12
trying to make a decision on whether this can wait until otel shipper is available and we switch over. Even if we assume that the otel kafka exporter has an updated fork of the client and that there are no issues with it working with AD, we won't be able to use this for the filebeat Kafka input. Perhaps that will be the caveat we live with.
Currently there are gaps in agent/beats support for kerberos in various kafka implementations. This meta issue is to gather all the specific development efforts that need to be implemented in order to provide a cohesive offering
Related issus:
cc: @cmacknz