X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=champ-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fchamp%2FChampApplication.java;h=da4f634c8b9918ea4b2ad54954da6e9133da1c08;hb=refs%2Fchanges%2F19%2F76319%2F1;hp=4477006d6c3f909b73f73b10b112fe58725264a3;hpb=5b2cfce94077e6677da370a7480189f290b466d5;p=aai%2Fchamp.git 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); }