From c060284812fbbc18fcf22eb628c47c251505fe50 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Mon, 2 Jul 2018 09:40:49 -0500 Subject: Update CM to us Local Intermediate Certs Issue-ID: AAF-384 Change-Id: Iefd36c5b9ab8011ac696cb85e74c54edb63cb40a Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java | 3 ++- .../src/main/java/org/onap/aaf/auth/rserv/TransFilter.java | 3 ++- .../main/java/org/onap/aaf/auth/server/JettyServiceStarter.java | 9 +++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'auth/auth-core') diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java index cbc0737c..531e40ab 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java @@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest; import org.onap.aaf.auth.rserv.TransFilter; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.Connector; +import org.onap.aaf.cadi.LocatorException; import org.onap.aaf.cadi.TrustChecker; import org.onap.aaf.cadi.principal.TaggedPrincipal; import org.onap.aaf.cadi.principal.TrustPrincipal; @@ -48,7 +49,7 @@ public class AuthzTransFilter extends TransFilter { public static final int BUCKETSIZE = 2; - public AuthzTransFilter(AuthzEnv env, Connector con, TrustChecker tc, Object ... additionalTafLurs) throws CadiException { + public AuthzTransFilter(AuthzEnv env, Connector con, TrustChecker tc, Object ... additionalTafLurs) throws CadiException, LocatorException { super(env.access(),con, tc, additionalTafLurs); this.env = env; serviceMetric = new Metric(); diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java index 400c539c..c286e507 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java @@ -37,6 +37,7 @@ import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.CadiWrap; import org.onap.aaf.cadi.Connector; +import org.onap.aaf.cadi.LocatorException; import org.onap.aaf.cadi.Lur; import org.onap.aaf.cadi.TrustChecker; import org.onap.aaf.cadi.config.Config; @@ -66,7 +67,7 @@ public abstract class TransFilter implements Filter { private final String[] no_authn; - public TransFilter(Access access, Connector con, TrustChecker tc, Object ... additionalTafLurs) throws CadiException { + public TransFilter(Access access, Connector con, TrustChecker tc, Object ... additionalTafLurs) throws CadiException, LocatorException { cadi = new CadiHTTPManip(access, con, tc, additionalTafLurs); String no = access.getProperty(Config.CADI_NOAUTHN, null); if(no!=null) { diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java index 4b2ca32c..cefc7a23 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java @@ -231,11 +231,16 @@ public class JettyServiceStarter ex try { register(service.registrants(port)); access().printf(Level.INIT, "Starting Jetty Service for %s, version %s, on %s://%s:%d", service.app_name,service.app_version,protocol,hostname,port); + server.join(); } catch(Exception e) { access().log(e,"Error registering " + service.app_name); - // Question: Should Registered Services terminate? + String doExit = access().getProperty("cadi_exitOnFailure", "true"); + if (doExit == "true") { + System.exit(1); + } else { + throw e; + } } - server.join(); } private FilterChain buildFilterChain(final AbsService as, final FilterChain doLast) throws CadiException, LocatorException { -- cgit 1.2.3-korg