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-2847; Remove principal builder class from client configs #542
KAFKA-2847; Remove principal builder class from client configs #542
Conversation
I think it would be good to use it for SASL too and that may require the interface to be changed.
… for `SecurityProtocol.SSL`
./gradlew test passed locally |
@@ -57,8 +55,7 @@ public void configure(Map<String, ?> configs) throws KafkaException { | |||
try { | |||
this.configs = configs; | |||
this.loginManager = LoginManager.acquireLoginManager(loginType, configs); | |||
this.principalBuilder = (PrincipalBuilder) Utils.newInstance((Class<?>) configs.get(SslConfigs.PRINCIPAL_BUILDER_CLASS_CONFIG)); | |||
this.principalBuilder.configure(configs); | |||
this.principalBuilder = ChannelBuilders.createPrincipalBuilder(configs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that we don't need to maintain principalBuilder in SaslChannelBuilder since both SaslServerAuthenticator and SaslClientAuthenticator ignore principalBuilder in configure().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, passing null to configure
as requested.
…t use it As suggested by Jun.
Also mark `PrincipalBuilder` as `Unstable` and tweak docs. Author: Ismael Juma <ismael@juma.me.uk> Reviewers: Jun Rao <junrao@gmail.com> Closes #542 from ijuma/kafka-2847-remove-principal-builder-class-from-client-configs (cherry picked from commit 52d5e88) Signed-off-by: Jun Rao <junrao@gmail.com>
Also mark `PrincipalBuilder` as `Unstable` and tweak docs. Author: Ismael Juma <ismael@juma.me.uk> Reviewers: Jun Rao <junrao@gmail.com> Closes #542 from ijuma/kafka-2847-remove-principal-builder-class-from-client-configs
Also mark
PrincipalBuilder
asUnstable
and tweak docs.