rlevas commented on a change in pull request #56: KNOX-1756 - Knox Gateway TLS
Keystore and Alias Should be Configurable
URL: https://github.com/apache/knox/pull/56#discussion_r259082496
##########
File path:
gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
##########
@@ -652,34 +653,49 @@ public void execute() throws Exception {
if
(!ks.isCredentialStoreForClusterAvailable(GATEWAY_CREDENTIAL_STORE_NAME)) {
// log.creatingCredentialStoreForGateway();
ks.createCredentialStoreForCluster(GATEWAY_CREDENTIAL_STORE_NAME);
- }
- else {
+ } else {
// log.credentialStoreForGatewayFoundNotCreating();
}
// LET'S NOT GENERATE A DIFFERENT KEY PASSPHRASE BY DEFAULT ANYMORE
// IF A DEPLOYMENT WANTS TO CHANGE THE KEY PASSPHRASE TO MAKE IT MORE
SECURE THEN
// THEY CAN ADD THE ALIAS EXPLICITLY WITH THE CLI
//as.generateAliasForCluster(GATEWAY_CREDENTIAL_STORE_NAME,
GATEWAY_IDENTITY_PASSPHRASE);
} catch (KeystoreServiceException e) {
- throw new ServiceLifecycleException("Keystore was not loaded properly
- the provided (or persisted) master secret may not match the password for the
keystore.", e);
+ throw new ServiceLifecycleException("Keystore was not loaded properly
- the stored password may not match the password for the keystore.", e);
}
try {
if (!ks.isKeystoreForGatewayAvailable()) {
// log.creatingKeyStoreForGateway();
ks.createKeystoreForGateway();
- }
- else {
+ } else {
// log.keyStoreForGatewayFoundNotCreating();
}
- char[] passphrase =
as.getPasswordFromAliasForCluster(GATEWAY_CREDENTIAL_STORE_NAME,
GATEWAY_IDENTITY_PASSPHRASE);
- if (passphrase == null) {
- MasterService ms = services.getService("MasterService");
- passphrase = ms.getMasterSecret();
+ boolean isSelfSigned;
Review comment:
fixing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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