X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fbatch%2Freports%2FAnalyze.java;h=ff2c72a5ece07420b5887f78e6330ccb52eecdb8;hb=refs%2Fchanges%2F71%2F99871%2F1;hp=227717b74a80547009c9d8c5de8e192cbdf67e54;hpb=439d8cd4ad19585fb93d721041e21ec8b46e4f0e;p=aaf%2Fauthz.git diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Analyze.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Analyze.java index 227717b7..ff2c72a5 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Analyze.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/Analyze.java @@ -219,11 +219,13 @@ public class Analyze extends Batch { // for users and approvers still valid String user = appr.getUser(); - if(org.isRevoked(noAvg, appr.getApprover())) { - deleteCW.comment("Approver ID is revoked"); + Date revokedAppr = org.isRevoked(noAvg, appr.getApprover()); + Date revokedUser = org.isRevoked(noAvg, user); + if(revokedAppr!=null) { + deleteCW.comment("Approver ID is revoked on " + revokedAppr); Approval.row(deleteCW, appr); - } else if(user!=null && !user.isEmpty() && org.isRevoked(noAvg, user)) { - deleteCW.comment("USER ID is revoked"); + } else if(user!=null && !user.isEmpty() && revokedUser!=null) { + deleteCW.comment("USER ID is revoked on " + revokedUser); Approval.row(deleteCW, appr); } else { ticket.approvals.add(appr); // add to found Ticket @@ -393,14 +395,15 @@ public class Analyze extends Batch { } return; } - if(org.isRevoked(trans, ur.user())) { + Date revoked = org.isRevoked(trans, ur.user()); + if(revoked!=null) { GregorianCalendar gc = new GregorianCalendar(); - gc.setTime(ur.expires()); + gc.setTime(revoked); GregorianCalendar gracePeriodEnds = org.expiration(gc, Expiration.RevokedGracePeriodEnds, ur.user()); if(now.after(gracePeriodEnds.getTime())) { ur.row(deleteCW, UserRole.UR,"Revoked ID, no grace period left"); } else { - ur.row(notCompliantCW, UserRole.UR, "Revoked ID: WARNING! GracePeriod Ends " + gracePeriodEnds.toString()); + ur.row(notCompliantCW, UserRole.UR, "Revoked ID: WARNING! GracePeriod Ends " + Chrono.dateOnlyStamp(gracePeriodEnds)); } return; }