diff options
author | Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com> | 2019-01-24 16:55:10 -0500 |
---|---|---|
committer | Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com> | 2019-01-24 16:56:42 -0500 |
commit | 01e05b877d2c18cdd63561d359350a35ecdd0a10 (patch) | |
tree | d91bca7c4ea12808861006dd010fbe5ab54b5790 /champ-service/src | |
parent | 5b2cfce94077e6677da370a7480189f290b466d5 (diff) |
optionally disable client auth
optionally disable client auth
Change-Id: Ic81a1cbc4c7140696662388e120d6dcaadc2588a
Issue-ID: AAI-2116
Signed-off-by: Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com>
Diffstat (limited to 'champ-service/src')
-rw-r--r-- | champ-service/src/main/java/org/onap/champ/ChampApplication.java | 8 | ||||
-rw-r--r-- | champ-service/src/main/resources/application.properties | 1 |
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 |