diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/crud/CrudApplication.java | 7 | ||||
-rw-r--r-- | src/main/resources/application.properties | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/onap/crud/CrudApplication.java b/src/main/java/org/onap/crud/CrudApplication.java index 05160d8..3c8e5f7 100644 --- a/src/main/java/org/onap/crud/CrudApplication.java +++ b/src/main/java/org/onap/crud/CrudApplication.java @@ -68,7 +68,12 @@ public class CrudApplication extends SpringBootServletInitializer{// NOSONAR props.put("schema.service.ssl.key-store-password", deobfuscatedKeyStorePassword); props.put("schema.service.ssl.trust-store-password", deobfuscatedKeyStorePassword); - + 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 CrudApplication() .configure(new SpringApplicationBuilder(CrudApplication.class).properties(props)) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 2b1f302..68c2aec 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -6,7 +6,6 @@ SERVICE_BEANS=dynamic/conf server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore server.ssl.enabled=true -server.ssl.client-auth=need server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 schema.ingest.file=${CONFIG_HOME}/schema-ingest.properties |