summaryrefslogtreecommitdiffstats
path: root/auth/auth-service/src/main
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-06-23 11:01:25 -0500
committerInstrumental <jonathan.gathman@att.com>2018-06-23 11:13:11 -0500
commit732344f175150fed87e0140ad75152d325364c8b (patch)
tree472d8fd03ed111a22863f1b0387c60bb51c80825 /auth/auth-service/src/main
parent68f3e5a2875f74863b6cbe8eb6dc7138b89668a5 (diff)
JettyStartups to improve new Filters
Issue-ID: AAF-361 Change-Id: I74cac231ebac81466778c1c3ebca16c63ae6f78a Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-service/src/main')
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java30
1 files changed, 20 insertions, 10 deletions
diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java
index bdabc39e..3ae2fbfb 100644
--- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java
+++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java
@@ -54,6 +54,7 @@ import org.onap.aaf.auth.service.facade.AuthzFacadeFactory;
import org.onap.aaf.auth.service.facade.AuthzFacade_2_0;
import org.onap.aaf.auth.service.mapper.Mapper.API;
import org.onap.aaf.cadi.CadiException;
+import org.onap.aaf.cadi.LocatorException;
import org.onap.aaf.cadi.PropAccess;
import org.onap.aaf.cadi.aaf.v2_0.AAFTrustChecker;
import org.onap.aaf.cadi.aaf.v2_0.AbsAAFLocator;
@@ -157,22 +158,31 @@ public class AAF_Service extends AbsService<AuthzEnv,AuthzTrans> {
}
@Override
- public Filter[] filters() throws CadiException {
- final String domain = FQI.reverseDomain(access.getProperty("aaf_root_ns","org.osaaf.aaf"));
+ public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException {
+ final String domain = FQI.reverseDomain(access.getProperty(Config.AAF_ROOT_NS,Config.AAF_ROOT_NS_DEF));
try {
- return new Filter[] {new AuthzTransFilter(env, null /* no connection to AAF... it is AAF */,
- new AAFTrustChecker((Env)env),
- new DirectAAFLur(env,question), // Note, this will be assigned by AuthzTransFilter to TrustChecker
- //new DirectOAuthTAF(env,question,OAFacadeFactory.directV1_0(oauthService)),
- new BasicHttpTaf(env, directAAFUserPass,
- domain,Long.parseLong(env.getProperty(Config.AAF_CLEAN_INTERVAL, Config.AAF_CLEAN_INTERVAL_DEF)),
- false)
- )};
+ Object[] atl=new Object[additionalTafLurs.length+2];
+ atl[0]=new DirectAAFLur(env,question); // Note, this will be assigned by AuthzTransFilter to TrustChecker
+ atl[1]=new BasicHttpTaf(env, directAAFUserPass,
+ domain,Long.parseLong(env.getProperty(Config.AAF_CLEAN_INTERVAL, Config.AAF_CLEAN_INTERVAL_DEF)),
+ false);
+
+ if(additionalTafLurs.length>0) {
+ System.arraycopy(additionalTafLurs, 0, atl, 2, additionalTafLurs.length);
+ }
+
+ return new Filter[] {
+ new AuthzTransFilter(env,aafCon(),
+ new AAFTrustChecker((Env)env),
+ atl
+ )};
} catch (NumberFormatException e) {
throw new CadiException("Invalid Property information", e);
}
}
+
+
@SuppressWarnings("unchecked")
@Override
public Registrant<AuthzEnv>[] registrants(final int port) throws CadiException {