diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-03-26 08:08:25 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-03-26 08:08:31 -0500 |
commit | 62ed4c99b099ae4fd9492e80fb2975bf328e48f4 (patch) | |
tree | bb9774a486f7e1f6615601b714d41482b72f9d71 | |
parent | 6e665cbd18279bc2636a25d98c129ad17ccddf31 (diff) |
Mod some logging
Issue-ID: AAF-798
Change-Id: I1b97d309b0a2b86e49dd79d6b712f1c4506647cd
Signed-off-by: Instrumental <jonathan.gathman@att.com>
4 files changed, 15 insertions, 11 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java index 7b98a2f0..51cfed01 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java @@ -76,7 +76,7 @@ public class Remove extends Batch { } finally { tt2.done(); } - cqlBatch = new CQLBatch(noAvg.debug(),session); + cqlBatch = new CQLBatch(noAvg.info(),session); } finally { diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFTrustChecker.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFTrustChecker.java index 43e71e56..e3c1c9a3 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFTrustChecker.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFTrustChecker.java @@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest ; import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.Lur; import org.onap.aaf.cadi.TrustChecker; +import org.onap.aaf.cadi.Access.Level; import org.onap.aaf.cadi.aaf.AAFPermission; import org.onap.aaf.cadi.config.Config; import org.onap.aaf.cadi.principal.TrustPrincipal; @@ -100,6 +101,8 @@ public class AAFTrustChecker implements TrustChecker { if (user_info == null) { return tresp; } + + tresp.getAccess().log(Level.DEBUG, user_info); String[] info = Split.split(',', user_info); String[] flds = Split.splitTrim(':', info[0]); diff --git a/cadi/aaf/src/test/java/org/onap/aaf/cadi/aaf/v2_0/test/JU_AAFTrustChecker.java b/cadi/aaf/src/test/java/org/onap/aaf/cadi/aaf/v2_0/test/JU_AAFTrustChecker.java index 64f4c997..f21aad6f 100644 --- a/cadi/aaf/src/test/java/org/onap/aaf/cadi/aaf/v2_0/test/JU_AAFTrustChecker.java +++ b/cadi/aaf/src/test/java/org/onap/aaf/cadi/aaf/v2_0/test/JU_AAFTrustChecker.java @@ -35,6 +35,7 @@ import java.io.PrintStream; import javax.servlet.http.HttpServletRequest; +import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.Lur; import org.onap.aaf.cadi.PropAccess; import org.onap.aaf.cadi.aaf.v2_0.AAFTrustChecker; @@ -92,6 +93,7 @@ public class JU_AAFTrustChecker { assertThat(trustChecker.mayTrust(trespMock, reqMock), is(trespMock)); when(reqMock.getHeader(null)).thenReturn("comma,comma,comma"); + when(trespMock.getAccess()).thenReturn(Access.NULL); assertThat(trustChecker.mayTrust(trespMock, reqMock), is(trespMock)); when(reqMock.getHeader(null)).thenReturn("colon:colon:colon:colon,comma,comma"); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java index 08602cb0..ed4591d4 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java @@ -22,22 +22,21 @@ package org.onap.aaf.cadi.taf.test; -import static org.junit.Assert.*; -import static org.hamcrest.CoreMatchers.*; -import org.junit.*; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; import java.io.IOException; +import org.junit.Test; import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.Taf; -import org.onap.aaf.cadi.taf.TafResp; -import org.onap.aaf.cadi.taf.TafResp.RESP; - -import org.onap.aaf.cadi.taf.EpiTaf; -import org.onap.aaf.cadi.taf.NullTaf; import org.onap.aaf.cadi.Taf.LifeForm; import org.onap.aaf.cadi.principal.TaggedPrincipal; +import org.onap.aaf.cadi.taf.EpiTaf; +import org.onap.aaf.cadi.taf.NullTaf; +import org.onap.aaf.cadi.taf.TafResp; +import org.onap.aaf.cadi.taf.TafResp.RESP; public class JU_EpiTaf { @@ -76,7 +75,7 @@ public class JU_EpiTaf { @Override public RESP isAuthenticated() { return RESP.TRY_ANOTHER_TAF; } @Override public RESP authenticate() throws IOException { return null; } @Override public TaggedPrincipal getPrincipal() { return null; } - @Override public Access getAccess() { return null; } + @Override public Access getAccess() { return Access.NULL; } @Override public boolean isFailedAttempt() { return false; } @Override public float timing() { return 0; } @Override public void timing(long start) {} @@ -93,7 +92,7 @@ public class JU_EpiTaf { @Override public RESP isAuthenticated() { return RESP.TRY_AUTHENTICATING; } @Override public RESP authenticate() throws IOException { return null; } @Override public TaggedPrincipal getPrincipal() { return null; } - @Override public Access getAccess() { return null; } + @Override public Access getAccess() { return Access.NULL; } @Override public boolean isFailedAttempt() { return false; } @Override public float timing() { return 0; } @Override public void timing(long start) {} |