8000 Support keystore with multiple alias entries by arvi18 · Pull Request #18 · coderabbit-test/kafka · GitHub
[go: up one dir, main page]

Skip to content

Support keystore with multiple alias entries #18

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

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated constant and usage details
  • Loading branch information
rahulnirgude committed Jul 15, 2024
commit e94c54d09320c0b8d22f8b759f2a9d7b3fa6e5fd
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public class SslConfigs {
+ "This is optional for client and can be used for two-way authentication for client.";

public static final String SSL_KEYSTORE_ALIAS_CONFIG = "ssl.keystore.alias";
public static final String SSL_KEYSTORE_ALIAS_DOC = "The Alias of key in the key store file. "
+ "This is optional for client and can be used for two-way authentication for client.";
public static final String SSL_KEYSTORE_ALIAS_DOC = "This is config is used to pick named alias from the keystore to build the SSL engine and authenticate the client with broker. " +
"This is an optional config and used only when you have multiple keys in the keystore and you need to control which key needs to be presented to server.";


public static final String SSL_KEYSTORE_PASSWORD_CONFIG = "ssl.keystore.password";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ private SSLContext createSSLContext(SecurityStore keystore, SecurityStore trusts
String tmfAlgorithm = this.tmfAlgorithm != null ? this.tmfAlgorithm : TrustManagerFactory.getDefaultAlgorithm();
TrustManager[] trustManagers = getTrustManagers(truststore, tmfAlgorithm);

sslContext.init(applyAliasToKM(keyManagers, (String)configs.get("ssl.keystore.alias")), trustManagers, this.secureRandomImplementation);
sslContext.init(applyAliasToKM(keyManagers, (String)configs.get(SslConfigs.SSL_KEYSTORE_ALIAS_CONFIG)), trustManagers, this.secureRandomImplementation);
log.debug("Created SSL context with keystore {}, truststore {}, provider {}.",
keystore, truststore, sslContext.getProvider().getName());
return sslContext;
Expand Down
0