aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTian Lee <TianL@amdocs.com>2019-02-06 15:20:04 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-06 15:20:04 +0000
commit979d62dc51a6e25ebab8d1d3751b8cac6d062893 (patch)
treeb7e0f4643b6b71ced723a3f60a5cfe4fde75e842 /src
parent1954294aed95c2db4eb2659dcef91248535de079 (diff)
parent132d44fe0ab811cde1a1f2ce0f594f1d8ffdacbf (diff)
Merge "Optionally disable client authentication"
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/aai/babel/BabelApplication.java5
-rw-r--r--src/main/resources/application.properties1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/babel/BabelApplication.java b/src/main/java/org/onap/aai/babel/BabelApplication.java
index 9cf1078..0b0285b 100644
--- a/src/main/java/org/onap/aai/babel/BabelApplication.java
+++ b/src/main/java/org/onap/aai/babel/BabelApplication.java
@@ -46,6 +46,11 @@ public class BabelApplication extends SpringBootServletInitializer {
HashMap<String, Object> props = new HashMap<>();
String decryptedValue = keyStorePassword.startsWith(OBFS_PATTERN)? Password.deobfuscate(keyStorePassword) : keyStorePassword;
props.put("server.ssl.key-store-password", decryptedValue);
+
+ String requireClientAuth = System.getenv("REQUIRE_CLIENT_AUTH");
+ props.put("server.ssl.client-auth",
+ Boolean.FALSE.toString().equalsIgnoreCase(requireClientAuth) ? "want" : "need");
+
new BabelApplication().configure(new SpringApplicationBuilder(BabelApplication.class).properties(props))
.run(args);
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index c9982d6..1f5d420 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,6 +1,5 @@
server.port=9516
server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore
-server.ssl.client-auth=need
server.contextPath=/services/babel-service