summaryrefslogtreecommitdiffstats
path: root/base/common/src
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2017-05-16 23:11:34 -0400
committerAde Lee <alee@redhat.com>2017-05-23 14:32:34 -0400
commit90f6d8ece46d70a3566b97b549efb1053895f407 (patch)
treecd2423b2435e308f9faec67a12e14283dfdcf499 /base/common/src
parent3a35eceffed65862e66806c20cff3a3b64d75ae8 (diff)
downloadpki-90f6d8ece46d70a3566b97b549efb1053895f407.tar.gz
pki-90f6d8ece46d70a3566b97b549efb1053895f407.tar.xz
pki-90f6d8ece46d70a3566b97b549efb1053895f407.zip
Encapsulate key recovery audit events
Encapsulate SECURITY_DATA_KEY_RECOVERY_REQUEST and KEY_RECOVERY_REQUEST audit events as audit event objects. We have collapse to a single audit event type. Change-Id: I68c27573725cf27c34d008c58847d6a22e0d0bac
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/SecurityDataArchivalProcessedEvent.java6
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryEvent.java48
3 files changed, 52 insertions, 6 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
index ce5cc4b53..da571fe88 100644
--- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
+++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
@@ -82,8 +82,6 @@ public class AuditEvent implements IBundleLogEvent {
"LOGGING_SIGNED_AUDIT_SERVER_SIDE_KEYGEN_REQUEST_PROCESSED_SUCCESS_4";
public final static String SERVER_SIDE_KEYGEN_REQUEST_PROCESSED_FAILURE =
"LOGGING_SIGNED_AUDIT_SERVER_SIDE_KEYGEN_REQUEST_PROCESSED_FAILURE_3";
- public final static String KEY_RECOVERY_REQUEST =
- "LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_4";
public final static String KEY_RECOVERY_REQUEST_ASYNC =
"LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_ASYNC_4";
public final static String KEY_RECOVERY_AGENT_LOGIN =
@@ -178,8 +176,6 @@ public class AuditEvent implements IBundleLogEvent {
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 =
- "LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST_4";
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/SecurityDataArchivalProcessedEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalProcessedEvent.java
index 8d7593b05..eb4f6b302 100644
--- a/base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalProcessedEvent.java
+++ b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataArchivalProcessedEvent.java
@@ -17,7 +17,9 @@
// --- 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 SecurityDataArchivalProcessedEvent extends AuditEvent {
@@ -28,9 +30,9 @@ public class SecurityDataArchivalProcessedEvent extends AuditEvent {
public SecurityDataArchivalProcessedEvent(
String subjectID,
String outcome,
- String requestID,
+ RequestId requestID,
String clientKeyID,
- String keyID,
+ KeyId keyID,
String failureReason,
String pubkey) {
diff --git a/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryEvent.java
new file mode 100644
index 000000000..97e3c9641
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryEvent.java
@@ -0,0 +1,48 @@
+// --- 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 SecurityDataRecoveryEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST";
+
+ public SecurityDataRecoveryEvent(
+ String subjectID,
+ String outcome,
+ RequestId recoveryID,
+ KeyId keyID,
+ String pubkey) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ recoveryID,
+ keyID,
+ pubkey
+ });
+ }
+} \ No newline at end of file