aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap
diff options
context:
space:
mode:
authorSerban Popescu <serban.popescu@amdocs.com>2019-02-05 09:12:03 -0500
committerTian Lee <TianL@amdocs.com>2019-02-06 10:14:17 +0000
commit3b49121e2e86b3d22704ff52d468f85fcd74d9b2 (patch)
tree4f5c8b2e7aa030c489305eb0e37b85b94108d07e /src/main/java/org/onap
parent10c04810902a100fbeba93dda5b13329ada39117 (diff)
Optionally disable client authentication
based on an env. variable, client authentication can be disabled Change-Id: Ib1a45adee8bf889705a3f8a5db45945caeb6ea94 Issue-ID: AAI-2132 Signed-off-by: Serban Popescu <serban.popescu@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r--src/main/java/org/onap/aai/datarouter/Application.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/onap/aai/datarouter/Application.java b/src/main/java/org/onap/aai/datarouter/Application.java
index 1a2a5e7..d217a2f 100644
--- a/src/main/java/org/onap/aai/datarouter/Application.java
+++ b/src/main/java/org/onap/aai/datarouter/Application.java
@@ -67,8 +67,11 @@ public class Application extends SpringBootServletInitializer{
trustStorePassword = trustStorePassword.startsWith(JETTY_OBFUSCATION_PATTERN)?Password.deobfuscate(trustStorePassword):trustStorePassword;
props.put("server.ssl.trust-store", trustStoreLocation);
props.put("server.ssl.trust-store-password", trustStorePassword);
- }
-
+ }
+
+ String requireClientAuth = System.getenv("REQUIRE_CLIENT_AUTH");
+ props.put("server.ssl.client-auth",
+ Boolean.FALSE.toString().equalsIgnoreCase(requireClientAuth) ? "want" : "need");
new Application().configure(new SpringApplicationBuilder(Application.class).properties(props)).run(args);
}