diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-04-12 04:13:14 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-04-12 16:23:52 +0200 |
commit | 0afe49b7b758d46f8bc0ca87cf2124e90084ebce (patch) | |
tree | a9a9cdbfbbde728106ac232806cf7969a78f4091 /base/server/cms/src/org | |
parent | e770f3a4ff34c27bc698d47aedc518a7ae6b31f9 (diff) | |
download | pki-0afe49b7b758d46f8bc0ca87cf2124e90084ebce.tar.gz pki-0afe49b7b758d46f8bc0ca87cf2124e90084ebce.tar.xz pki-0afe49b7b758d46f8bc0ca87cf2124e90084ebce.zip |
Reorganized audit event constants for authentication.
Change-Id: Iade8cb7fdf3c3f93afb13ff814da0f72dc8f8049
Diffstat (limited to 'base/server/cms/src/org')
-rw-r--r-- | base/server/cms/src/org/dogtagpki/server/rest/ACLInterceptor.java | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/ACLInterceptor.java b/base/server/cms/src/org/dogtagpki/server/rest/ACLInterceptor.java index 8e02ec21c..86996d5b2 100644 --- a/base/server/cms/src/org/dogtagpki/server/rest/ACLInterceptor.java +++ b/base/server/cms/src/org/dogtagpki/server/rest/ACLInterceptor.java @@ -45,6 +45,7 @@ import com.netscape.certsrv.authorization.EAuthzUnknownRealm; import com.netscape.certsrv.authorization.IAuthzSubsystem; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.ForbiddenException; +import com.netscape.certsrv.logging.AuditEvent; import com.netscape.certsrv.logging.ILogger; import com.netscape.cms.realm.PKIPrincipal; @@ -54,11 +55,6 @@ import com.netscape.cms.realm.PKIPrincipal; @Provider public class ACLInterceptor implements ContainerRequestFilter { protected ILogger signedAuditLogger = CMS.getSignedAuditLogger(); - private final static String LOGGING_SIGNED_AUDIT_AUTHZ_FAIL = - "LOGGING_SIGNED_AUDIT_AUTHZ_FAIL_5"; - private final static String LOGGING_SIGNED_AUDIT_AUTHZ_SUCCESS = - "LOGGING_SIGNED_AUDIT_AUTHZ_SUCCESS_5"; - private final static String LOGGING_ACL_PARSING_ERROR = "internal error: ACL parsing error"; private final static String LOGGING_NO_ACL_ACCESS_ALLOWED = "no ACL configured; OK"; private final static String LOGGING_MISSING_AUTH_TOKEN = "auth token not found"; @@ -178,7 +174,7 @@ public class ACLInterceptor implements ContainerRequestFilter { // store a message in the signed audit log file // although if it didn't pass authentication, it should not have gotten here auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_FAIL, + AuditEvent.AUTHZ_FAIL_INFO, auditSubjectID, ILogger.FAILURE, null, // resource @@ -195,7 +191,7 @@ public class ACLInterceptor implements ContainerRequestFilter { CMS.debug("ACLInterceptor: No ACL mapping; authz not required."); // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_SUCCESS, + AuditEvent.AUTHZ_SUCCESS_INFO, auditSubjectID, ILogger.SUCCESS, null, //resource @@ -219,7 +215,7 @@ public class ACLInterceptor implements ContainerRequestFilter { } catch (IOException e) { // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_FAIL, + AuditEvent.AUTHZ_FAIL_INFO, auditSubjectID, ILogger.FAILURE, null, //resource @@ -236,7 +232,7 @@ public class ACLInterceptor implements ContainerRequestFilter { CMS.debug("ACLInterceptor: No ACL configuration."); // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_SUCCESS, + AuditEvent.AUTHZ_SUCCESS_INFO, auditSubjectID, ILogger.SUCCESS, null, //resource @@ -252,7 +248,7 @@ public class ACLInterceptor implements ContainerRequestFilter { CMS.debug("ACLInterceptor: Invalid ACL mapping."); // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_FAIL, + AuditEvent.AUTHZ_FAIL_INFO, auditSubjectID, ILogger.FAILURE, null, //resource @@ -279,7 +275,7 @@ public class ACLInterceptor implements ContainerRequestFilter { CMS.debug("ACLInterceptor: " + info); // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_FAIL, + AuditEvent.AUTHZ_FAIL_INFO, auditSubjectID, ILogger.FAILURE, values[0], // resource @@ -296,7 +292,7 @@ public class ACLInterceptor implements ContainerRequestFilter { CMS.debug("ACLInterceptor: " + info); // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_FAIL, + AuditEvent.AUTHZ_FAIL_INFO, auditSubjectID, ILogger.FAILURE, values[0], // resource @@ -309,7 +305,7 @@ public class ACLInterceptor implements ContainerRequestFilter { String info = e.getMessage(); // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_FAIL, + AuditEvent.AUTHZ_FAIL_INFO, auditSubjectID, ILogger.FAILURE, values[0], // resource @@ -323,7 +319,7 @@ public class ACLInterceptor implements ContainerRequestFilter { // Allow request. // store a message in the signed audit log file auditMessage = CMS.getLogMessage( - LOGGING_SIGNED_AUDIT_AUTHZ_SUCCESS, + AuditEvent.AUTHZ_SUCCESS_INFO, auditSubjectID, ILogger.SUCCESS, values[0], // resource |