aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/aai/sa/Application.java7
-rw-r--r--src/main/resources/application.properties1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/sa/Application.java b/src/main/java/org/onap/aai/sa/Application.java
index f2b8db1..059ca22 100644
--- a/src/main/java/org/onap/aai/sa/Application.java
+++ b/src/main/java/org/onap/aai/sa/Application.java
@@ -46,6 +46,13 @@ public class Application extends SpringBootServletInitializer {
props.put("server.ssl.trust-store-password", trustStorePassword);
}
+ String requireClientAuth = System.getenv("REQUIRE_CLIENT_AUTH");
+ if (requireClientAuth == null || requireClientAuth.isEmpty()) {
+ props.put("server.ssl.client-auth", "need");
+ }else {
+ props.put("server.ssl.client-auth", Boolean.valueOf(requireClientAuth)? "need" : "want");
+ }
+
new Application().configure(new SpringApplicationBuilder(Application.class).properties(props)).run(args);
}
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 20dc028..7d169a7 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,5 +1,4 @@
server.ssl.key-store=/opt/app/search-data-service/config/auth/tomcat_keystore
server.ssl.enabled=true
server.port=9509
-server.ssl.client-auth=need
server.ssl.enabled-protocols=TLSv1.1,TLSv1.2