risdenk commented on a change in pull request #69: KNOX-1812 - The Knox Gateway
truststore should be configurable
URL: https://github.com/apache/knox/pull/69#discussion_r264269183
##########
File path:
gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/JettySSLServiceTest.java
##########
@@ -281,13 +286,14 @@ public void
TestBuildSslContextFactoryExplicitTrustStore() throws Exception {
Path truststorePath = Paths.get(basedir, "target", "test-classes",
"keystores", "server-truststore.jks");
String truststoreType = "jks";
char[] truststorePassword = "horton".toCharArray();
+ String truststorePasswordAlias = "trust_store_password";
- GatewayConfig config = createGatewayConfig(true, true,
identityKeystorePath, identityKeystoreType, identityKeyAlias, truststorePath,
truststoreType);
+ GatewayConfig config = createGatewayConfig(true, true,
identityKeystorePath, identityKeystoreType, identityKeyAlias, truststorePath,
truststoreType, truststorePasswordAlias);
AliasService aliasService = createMock(AliasService.class);
expect(aliasService.getGatewayIdentityKeystorePassword()).andReturn(identityKeystorePassword).atLeastOnce();
expect(aliasService.getGatewayIdentityPassphrase()).andReturn(identityKeyPassphrase).atLeastOnce();
-
expect(aliasService.getPasswordFromAliasForGateway(eq("gateway-truststore-password"))).andReturn(truststorePassword).atLeastOnce();
+
expect(aliasService.getPasswordFromAliasForGateway(eq("trust_store_password"))).andReturn(truststorePassword).atLeastOnce();
Review comment:
I think this can be truststorePasswordAlias instead of the string?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services