summaryrefslogtreecommitdiffstats
path: root/base/common/src/com
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2017-05-16 17:29:45 -0400
committerAde Lee <alee@redhat.com>2017-05-23 14:31:54 -0400
commit1c8c61ef235bb57e744e9a8cfa5e1ff0cebb06a2 (patch)
tree67efbe323389114660ae79e918c9e621d61f86d7 /base/common/src/com
parent3249ddc2c19f6f5ded11823b345c9c58bae4750b (diff)
downloadpki-1c8c61ef235bb57e744e9a8cfa5e1ff0cebb06a2.tar.gz
pki-1c8c61ef235bb57e744e9a8cfa5e1ff0cebb06a2.tar.xz
pki-1c8c61ef235bb57e744e9a8cfa5e1ff0cebb06a2.zip
Encapsulate the archival audit log
This patch encapsulates the SECURITY_DATA_ARCHIVAL_REQUEST and PRIVATE_DATA_ARCHIVAL_REQUEST audit logs as audit events. The PRIVATE_DATA_ARCHIVAL_REQUEST events are mapped to the SECURITY_DATA ones to simplify the whole structure. They used to provide an archivalID parameter which was pretty much meaningless as it was at best just the same as the request id which is alreadty logged. So this is now dropped. Change-Id: I705d25ce716c73f2c954c5715b0aafdad80b99d2
Diffstat (limited to 'base/common/src/com')
-rw-r--r--base/common/src/com/netscape/certsrv/logging/AuditEvent.java4
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalEvent.java59
2 files changed, 59 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 21cac2747..a224ae615 100644
--- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
+++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
@@ -72,8 +72,6 @@ public class AuditEvent implements IBundleLogEvent {
public final static String LOG_PATH_CHANGE =
"LOGGING_SIGNED_AUDIT_LOG_PATH_CHANGE_4";
- public final static String PRIVATE_KEY_ARCHIVE_REQUEST =
- "LOGGING_SIGNED_AUDIT_PRIVATE_KEY_ARCHIVE_REQUEST_4";
public final static String PRIVATE_KEY_ARCHIVE_REQUEST_PROCESSED =
"LOGGING_SIGNED_AUDIT_PRIVATE_KEY_ARCHIVE_REQUEST_PROCESSED_3";
public final static String PRIVATE_KEY_EXPORT_REQUEST_PROCESSED_SUCCESS =
@@ -182,8 +180,6 @@ public class AuditEvent implements IBundleLogEvent {
public final static String SECURITY_DATA_ARCHIVAL_REQUEST_PROCESSED =
"LOGGING_SIGNED_AUDIT_SECURITY_DATA_ARCHIVAL_REQUEST_PROCESSED_6";
- public static final String SECURITY_DATA_ARCHIVAL_REQUEST =
- "LOGGING_SIGNED_AUDIT_SECURITY_DATA_ARCHIVAL_REQUEST_4";
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 =
diff --git a/base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalEvent.java
new file mode 100644
index 000000000..43f752507
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalEvent.java
@@ -0,0 +1,59 @@
+// --- 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.logging.AuditEvent;
+import com.netscape.certsrv.request.RequestId;
+
+public class SecurityDataArchivalEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_SECURITY_DATA_ARCHIVAL_REQUEST";
+
+ public SecurityDataArchivalEvent(
+ String subjectID,
+ String outcome,
+ RequestId requestID,
+ String clientKeyID) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ requestID,
+ clientKeyID
+ });
+ }
+
+ public SecurityDataArchivalEvent(
+ String subjectID,
+ String outcome,
+ String requestID) {
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ requestID,
+ null
+ });
+ }
+} \ No newline at end of file