summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2017-05-24 12:31:45 -0400
committerAde Lee <alee@redhat.com>2017-05-24 14:49:30 -0400
commit3ddc916954d712f6fe25497789925fecebef20fc (patch)
tree5f2cd696c77fc7d54cd5188dc6d5cd56488b2874 /base/common
parent84f3958dc9c1c5bfab4a8789e621d621a28cbdd6 (diff)
downloadpki-3ddc916954d712f6fe25497789925fecebef20fc.tar.gz
pki-3ddc916954d712f6fe25497789925fecebef20fc.tar.xz
pki-3ddc916954d712f6fe25497789925fecebef20fc.zip
Encapsulate symmetric and asymmetric keygen audit events
Change-Id: Ifc8d05bd1d2d34bb0ef25877f838731bed58d00e
Diffstat (limited to 'base/common')
-rw-r--r--base/common/src/com/netscape/certsrv/logging/AuditEvent.java8
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationEvent.java45
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationProcessedEvent.java51
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationEvent.java45
-rw-r--r--base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationProcessedEvent.java50
5 files changed, 191 insertions, 8 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
index 891398d10..beedb9fb9 100644
--- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
+++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
@@ -166,14 +166,6 @@ public class AuditEvent implements IBundleLogEvent {
public final static String KEY_STATUS_CHANGE =
"LOGGING_SIGNED_AUDIT_KEY_STATUS_CHANGE_6";
- public final static String SYMKEY_GENERATION_REQUEST_PROCESSED =
- "LOGGING_SIGNED_AUDIT_SYMKEY_GEN_REQUEST_PROCESSED_6";
- public static final String SYMKEY_GENERATION_REQUEST =
- "LOGGING_SIGNED_AUDIT_SYMKEY_GENERATION_REQUEST_4";
- public static final String ASYMKEY_GENERATION_REQUEST =
- "LOGGING_SIGNED_AUDIT_ASYMKEY_GENERATION_REQUEST_4";
- public final static String ASYMKEY_GENERATION_REQUEST_PROCESSED =
- "LOGGING_SIGNED_AUDIT_ASYMKEY_GEN_REQUEST_PROCESSED_6";
public final static String TOKEN_CERT_ENROLLMENT =
"LOGGING_SIGNED_AUDIT_TOKEN_CERT_ENROLLMENT_9";
diff --git a/base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationEvent.java b/base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationEvent.java
new file mode 100644
index 000000000..f3236d626
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationEvent.java
@@ -0,0 +1,45 @@
+// --- 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 AsymKeyGenerationEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_ASYMKEY_GENERATION_REQUEST";
+
+ public AsymKeyGenerationEvent(
+ String subjectID,
+ String outcome,
+ RequestId requestID,
+ String clientKeyID) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ requestID,
+ clientKeyID
+ });
+ }
+}
diff --git a/base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationProcessedEvent.java b/base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationProcessedEvent.java
new file mode 100644
index 000000000..ba242de9e
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/AsymKeyGenerationProcessedEvent.java
@@ -0,0 +1,51 @@
+// --- 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 AsymKeyGenerationProcessedEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_ASYMKEY_GEN_REQUEST_PROCESSED";
+
+ public AsymKeyGenerationProcessedEvent(
+ String subjectID,
+ String outcome,
+ RequestId requestID,
+ String clientKeyID,
+ KeyId keyID,
+ String failureReason) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ requestID,
+ clientKeyID,
+ keyID,
+ failureReason
+ });
+ }
+}
+
diff --git a/base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationEvent.java
new file mode 100644
index 000000000..c1b865232
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationEvent.java
@@ -0,0 +1,45 @@
+// --- 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 SymKeyGenerationEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_SYMKEY_GENERATION_REQUEST";
+
+ public SymKeyGenerationEvent(
+ String subjectID,
+ String outcome,
+ RequestId requestID,
+ String clientKeyID) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ requestID,
+ clientKeyID
+ });
+ }
+} \ No newline at end of file
diff --git a/base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationProcessedEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationProcessedEvent.java
new file mode 100644
index 000000000..ad36d4484
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/logging/event/SymKeyGenerationProcessedEvent.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 SymKeyGenerationProcessedEvent extends AuditEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String LOGGING_PROPERTY =
+ "LOGGING_SIGNED_AUDIT_SYMKEY_GEN_REQUEST_PROCESSED";
+
+ public SymKeyGenerationProcessedEvent(
+ String subjectID,
+ String outcome,
+ RequestId requestID,
+ String clientKeyID,
+ KeyId keyID,
+ String failureReason) {
+
+ super(LOGGING_PROPERTY);
+
+ setParameters(new Object[] {
+ subjectID,
+ outcome,
+ requestID,
+ clientKeyID,
+ keyID,
+ failureReason
+ });
+ }
+}