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-2847; Remove principal builder class from client configs #542

Conversation

ijuma
Copy link
Contributor

@ijuma ijuma commented Nov 17, 2015

Also mark PrincipalBuilder as Unstable and tweak docs.

I think it would be good to use it for SASL too and that may
require the interface to be changed.
@ijuma
Copy link
Contributor Author

ijuma commented Nov 17, 2015

./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);
Copy link
Contributor

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().

Copy link
Contributor Author

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.

@asfgit asfgit closed this in 52d5e88 Nov 17, 2015
asfgit pushed a commit that referenced this pull request Nov 17, 2015
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>
ijuma referenced this pull request in confluentinc/kafka Nov 18, 2015
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
@ijuma ijuma deleted the kafka-2847-remove-principal-builder-class-from-client-configs branch March 1, 2016 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants