summaryrefslogtreecommitdiffstats
path: root/base/common/src
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2017-05-17 14:10:37 -0400
committerAde Lee <alee@redhat.com>2017-05-23 14:32:48 -0400
commit58927bc0573769480dd35b564b9791eb086b267e (patch)
tree6c3b9d2d86b624b894ebf94e424d33f1873ed445 /base/common/src
parent90f6d8ece46d70a3566b97b549efb1053895f407 (diff)
downloadpki-58927bc0573769480dd35b564b9791eb086b267e.tar.gz
pki-58927bc0573769480dd35b564b9791eb086b267e.tar.xz
pki-58927bc0573769480dd35b564b9791eb086b267e.zip
Encapsulate recovery processed audit events
This creates audit events for KEY_RECOVERY_PROCESSED and SECURITY_DATA_RECOVERY_PROCESSED audit logs. We simplify by reducing the logs to the SECURITY_DATA ones. Change-Id: I75968799dec48d1f056ba15f8125d3bd031f31bb
Diffstat (limited to 'base/common/src')
-rw-r--r--base/common/src/com/netscape/certsrv/logging/AuditEvent.java4
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryProcessedEvent.java50
2 files changed, 50 insertions, 4 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
index da571fe88..c9c8f9669 100644
--- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
+++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
@@ -86,8 +86,6 @@ public class AuditEvent implements IBundleLogEvent {
"LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_ASYNC_4";
public final static String KEY_RECOVERY_AGENT_LOGIN =
"LOGGING_SIGNED_AUDIT_KEY_RECOVERY_AGENT_LOGIN_4";
- public final static String KEY_RECOVERY_REQUEST_PROCESSED =
- "LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_PROCESSED_4";
public final static String KEY_RECOVERY_REQUEST_PROCESSED_ASYNC =
"LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_PROCESSED_ASYNC_4";
public final static String KEY_GEN_ASYMMETRIC =
@@ -174,8 +172,6 @@ public class AuditEvent implements IBundleLogEvent {
public final static String CONFIG_SERIAL_NUMBER =
"LOGGING_SIGNED_AUDIT_CONFIG_SERIAL_NUMBER_1";
- public final static String SECURITY_DATA_RECOVERY_REQUEST_PROCESSED =
- "LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST_PROCESSED_5";
public static final String SECURITY_DATA_RECOVERY_REQUEST_STATE_CHANGE =
"LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST_STATE_CHANGE_4";
public final static String SECURITY_DATA_RETRIEVE_KEY =
diff --git a/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryProcessedEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryProcessedEvent.java
new file mode 100644
index 000000000..8e5ad4b81
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryProcessedEvent.java
@@ -0,0 +1,50 @@
+// --- BEGIN COPYRIGHT BLOCK ---
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// (C) 2017 Red Hat, Inc.
+// All rights reserved.
+// --- END COPYRIGHT BLOCK ---
+package com.netscape.certsrv.logging.event;
+
+import com.netscape.certsrv.dbs.keydb.KeyId;
+import com.netscape.certsrv.logging.AuditEvent;
+import com.netscape.certsrv.request.RequestId;
+
+public class SecurityDataRecoveryProcessedEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST_PROCESSED";
+
+ public SecurityDataRecoveryProcessedEvent(
+ String subjectID,
+ String outcome,
+ RequestId recoveryID,
+ KeyId keyID,
+ String failureReason,
+ String recoveryAgents) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ recoveryID,
+ keyID,
+ failureReason,
+ recoveryAgents
+ });
+ }
+} \ No newline at end of file