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

Kafka Authenticaion Mechanism for AWS differs from IBM Cloud #46

Closed
rtclauss opened this issue Dec 9, 2021 · 3 comments
Closed

Kafka Authenticaion Mechanism for AWS differs from IBM Cloud #46

rtclauss opened this issue Dec 9, 2021 · 3 comments

Comments

@rtclauss
Copy link
Contributor

rtclauss commented Dec 9, 2021

When using IBM EventStreams/Kafka the authentication mechanism is via username/password using the PLAIN SASL Mechanism. This can be partially seen in EventStreamsProducer.java:

...
        properties.put(SaslConfigs.SASL_MECHANISM, "PLAIN");
        properties.put(SaslConfigs.SASL_JAAS_CONFIG, "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"" + USERNAME + "\" password=\"" + API_KEY + "\";");
 ...       

However, Amazon MSK uses a different set of SASL mechanisms as outlined below:

...
        properties.put(SaslConfigs.SASL_MECHANISM, "SCRAM-SHA-512");
        properties.put(SaslConfigs.SASL_JAAS_CONFIG, "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"" + USERNAME + "\" password=\"" + API_KEY + "\";");
...

Azure Event Hubs can make use of the same, PLAIN, configuration or it can use OAUTHBEARER tokens with callback.

We need a generic mechanism to specify the SASL configuration for Kafka.

@rtclauss
Copy link
Contributor Author

rtclauss commented Dec 9, 2021

Related issue in trade-history

@rtclauss
Copy link
Contributor Author

Maybe make the SASL_MECHANISM and JAAS class environment variables/secrets?

@jwalcorn
Copy link
Member

jwalcorn commented May 2, 2024

Fixed this several months ago

@jwalcorn jwalcorn closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants