aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--champ-service/src/main/java/org/onap/champ/ChampApplication.java8
-rw-r--r--champ-service/src/main/resources/application.properties1
2 files changed, 8 insertions, 1 deletions
diff --git a/champ-service/src/main/java/org/onap/champ/ChampApplication.java b/champ-service/src/main/java/org/onap/champ/ChampApplication.java
index 4477006..da4f634 100644
--- a/champ-service/src/main/java/org/onap/champ/ChampApplication.java
+++ b/champ-service/src/main/java/org/onap/champ/ChampApplication.java
@@ -56,6 +56,14 @@ public class ChampApplication 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",requireClientAuth.equals("true")?"need":"want");
+ }
+
+
new ChampApplication().configure(new SpringApplicationBuilder(ChampApplication.class).properties(props))
.run(args);
}
diff --git a/champ-service/src/main/resources/application.properties b/champ-service/src/main/resources/application.properties
index e08e249..8f152e9 100644
--- a/champ-service/src/main/resources/application.properties
+++ b/champ-service/src/main/resources/application.properties
@@ -5,6 +5,5 @@ SERVICE_BEANS=dynamic/conf
server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore
server.ssl.key-store-type=JKS
server.ssl.enabled=true
-server.ssl.client-auth=need
logging.config=classpath:logback.xml