From 5882678eebcbaa5d640dbc04a56cbd6f8678719e Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 6 Sep 2018 06:47:30 -0500 Subject: Add timing CadiFilter Issue-ID: AAF-468 Change-Id: I335a1106609ac99e12eeb0640a06c9eb969e9bbb Signed-off-by: Instrumental --- .../auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java | 4 +++- .../src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java | 9 ++++----- .../src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java | 2 -- .../main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java | 6 ++++-- 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'auth') diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java index 469284a2..acfb3390 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java @@ -106,7 +106,9 @@ public class Perm implements Comparable { try { while(iter.hasNext()) { row = iter.next(); - Perm pk = new Perm(row.getString(0),row.getString(1),row.getString(2),row.getString(3), row.getString(4), row.getSet(5,String.class)); + Perm pk = new Perm( + row.getString(0),row.getString(1),row.getString(2), + row.getString(3), row.getString(4), row.getSet(5,String.class)); keys.put(pk.encode(), pk); data.put(pk,pk.roles); } diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java index bc563f39..96349aed 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java @@ -37,7 +37,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; -import java.util.Date; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -553,10 +552,10 @@ public class CachingFileAccess extends HttpCode entry = scont.get(i).entry; - //System.out.println("remaining Cache Item " + entry.getKey() + "/" + new Date(entry.getValue().access).toString()); - } +// for(int i=end;i entry = scont.get(i).entry; +// //System.out.println("remaining Cache Item " + entry.getKey() + "/" + new Date(entry.getValue().access).toString()); +// } } } } diff --git a/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java b/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java index 27f771c1..3c68f61d 100644 --- a/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java +++ b/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java @@ -48,8 +48,6 @@ import java.io.File; import java.io.IOException; import java.io.PrintStream; -import org.junit.Test; - public class JU_AAF_FS { AuthzEnv aEnv; AAF_FS aafFs; diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java index 23d87e3e..6adb4641 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java @@ -32,19 +32,20 @@ import org.onap.aaf.cadi.taf.AbsTafResp; import org.onap.aaf.cadi.taf.TafResp; public class OAuth2FormHttpTafResp extends AbsTafResp implements TafResp { + private static final String tafName = DirectOAuthTAF.class.getSimpleName(); private HttpServletResponse httpResp; private RESP status; private final boolean wasFailed; public OAuth2FormHttpTafResp(Access access, OAuth2FormPrincipal principal, String desc, RESP status, HttpServletResponse resp, boolean wasFailed) { - super(access,principal, desc); + super(access,tafName,principal, desc); httpResp = resp; this.status = status; this.wasFailed = wasFailed; } public OAuth2FormHttpTafResp(Access access, TrustPrincipal principal, String desc, RESP status,HttpServletResponse resp) { - super(access,principal, desc); + super(access,tafName,principal, desc); httpResp = resp; this.status = status; wasFailed = true; // if Trust Principal added, must be good @@ -62,4 +63,5 @@ public class OAuth2FormHttpTafResp extends AbsTafResp implements TafResp { public boolean isFailedAttempt() { return wasFailed; } + } -- cgit 1.2.3-korg