Table of Contents |
---|
Status
Current state: Draft Discarded
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
JIRA:
Jira | ||||||
---|---|---|---|---|---|---|
|
Jira server ASF JIRA serverId 5aa69414-a9e9-3523-82ec-879b028fb15b key KAFKA-3302
Motivation
Currently the Kafka java client does not support different login contexts from within the same JVM.
IBM MessageHub has encountered many users asking for this functionality, e.g. having multiple consumers and producers in a single JVM that consumer/produce to different Kafka clusters, each requiring specific credentials.
Public Interfaces
A new LoginModule class will be added, which reads the client.id property from the consumer.properties/producer.properties file, and will look for username and password corresponding to that clientid by querying a supplied implementation of a (new) CredentialProvider interface
Proposed Changes
...
This KIP becomes trivial after KIP-85: Dynamic JAAS configuration for Kafka clients
KIP-85 not only makes multi login easy to implement, but also removes the need for a pluggable interface to retrieve credentials not stored in jaas.conf
Proposed Changes
LoginManager should no longer be a singleton.
On the client side, LoginManager caching will be keyed on the jaas configuration object.
Compatibility, Deprecation, and Migration Plan
- The old SimpleLoginModule
PlainLoginModule
and its expectedjaas.conf
may format can remain unchanged for backward compatibility for users that don't require the new functionality
This KIP is based on previous work by Rajini Sivaram. Thanks Rajini!