diff options
| author | Ade Lee <alee@redhat.com> | 2017-05-24 23:42:41 -0400 |
|---|---|---|
| committer | Ade Lee <alee@redhat.com> | 2017-05-25 10:40:47 -0400 |
| commit | 2a947446b81d21758ffadbae905a49e8c4e900ef (patch) | |
| tree | 4114e1c775f90cf235971b0ae95961b88aacb829 /base/common/src/com/netscape/certsrv | |
| parent | c88ad697138778c597cf8ce361f8ee1761bee0ab (diff) | |
| download | pki-2a947446b81d21758ffadbae905a49e8c4e900ef.tar.gz pki-2a947446b81d21758ffadbae905a49e8c4e900ef.tar.xz pki-2a947446b81d21758ffadbae905a49e8c4e900ef.zip | |
Encapsulate server side keygen audit events
This encapsulates key gen events for the token servlets.
Consolidated the success and failure cases. Note that this
event can likely later be replaced with security_data_keygen
events. Leaving separate for now.
Change-Id: I6caaeb2231fd2f7410eade03cb5fa93d66444bbf
Diffstat (limited to 'base/common/src/com/netscape/certsrv')
3 files changed, 92 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 348ea09dc..1d94dad16 100644 --- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java +++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java @@ -72,12 +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 SERVER_SIDE_KEYGEN_REQUEST = - "LOGGING_SIGNED_AUDIT_SERVER_SIDE_KEYGEN_REQUEST_3"; - public final static String SERVER_SIDE_KEYGEN_REQUEST_PROCESSED_SUCCESS = - "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_AGENT_LOGIN = "LOGGING_SIGNED_AUDIT_KEY_RECOVERY_AGENT_LOGIN_4"; public final static String KEY_GEN_ASYMMETRIC = diff --git a/base/common/src/com/netscape/certsrv/logging/event/ServerSideKeyGenEvent.java b/base/common/src/com/netscape/certsrv/logging/event/ServerSideKeyGenEvent.java new file mode 100644 index 000000000..0894716be --- /dev/null +++ b/base/common/src/com/netscape/certsrv/logging/event/ServerSideKeyGenEvent.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 ServerSideKeyGenEvent extends AuditEvent { + + private static final long serialVersionUID = 1L; + + private static final String LOGGING_PROPERTY = + "LOGGING_SIGNED_AUDIT_SERVER_SIDE_KEYGEN_REQUEST"; + + public ServerSideKeyGenEvent( + String subjectID, + String outcome, + String entityID, + RequestId requestID) { + + super(LOGGING_PROPERTY); + + setParameters(new Object[] { + subjectID, + outcome, + entityID, + requestID + }); + } +} diff --git a/base/common/src/com/netscape/certsrv/logging/event/ServerSideKeyGenProcessedEvent.java b/base/common/src/com/netscape/certsrv/logging/event/ServerSideKeyGenProcessedEvent.java new file mode 100644 index 000000000..71ed3ed87 --- /dev/null +++ b/base/common/src/com/netscape/certsrv/logging/event/ServerSideKeyGenProcessedEvent.java @@ -0,0 +1,47 @@ +// --- 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 ServerSideKeyGenProcessedEvent extends AuditEvent { + + private static final long serialVersionUID = 1L; + + private static final String LOGGING_PROPERTY = + "LOGGING_SIGNED_AUDIT_SYMKEY_GEN_REQUEST_PROCESSED"; + + public ServerSideKeyGenProcessedEvent( + String subjectID, + String outcome, + String entityID, + RequestId requestID, + String pubKey) { + + super(LOGGING_PROPERTY); + + setParameters(new Object[] { + subjectID, + outcome, + entityID, + requestID, + pubKey + }); + } +}
\ No newline at end of file |
