diff options
author | Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com> | 2019-01-23 14:35:24 -0500 |
---|---|---|
committer | Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com> | 2019-01-23 14:36:41 -0500 |
commit | df7904cca9c67ed7ce99e1d1d1c3a2c961a61445 (patch) | |
tree | bd847f03d5d98832f9b2649345a65aee24d9151a /src/main/java/org/onap | |
parent | 6aa19e259dddf790e341948bbd160a498d58815b (diff) |
optionally disable client auth in gizmo
optionally disable client auth in gizmo
Change-Id: I62ba93ce8ec29c08ee311ce585dae2b16bf405ac
Issue-ID: AAI-2116
Signed-off-by: Bansal, Nitin (nb121v) <nitin.bansal@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r-- | src/main/java/org/onap/crud/CrudApplication.java | 7 |
1 files changed, 6 insertions, 1 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)) |