diff options
author | Ade Lee <alee@redhat.com> | 2017-05-23 10:01:47 -0400 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2017-05-23 15:26:16 -0400 |
commit | f40d0aaf446b162994e9c8598a7b00a6d4c906f2 (patch) | |
tree | c88b74ad137b2cecdec48f176e0f6fc7e683c3ef /base/common/src | |
parent | 3027b565320c96857b7f7fdffed9a5fbec084bab (diff) | |
download | pki-f40d0aaf446b162994e9c8598a7b00a6d4c906f2.tar.gz pki-f40d0aaf446b162994e9c8598a7b00a6d4c906f2.tar.xz pki-f40d0aaf446b162994e9c8598a7b00a6d4c906f2.zip |
Encapsulate recovery request approval audit logs
The audit logs where an agent grants an asynchronous recovery request
and the case where recovery request is appproved from the REST API
are consolidated and encapsulated in a class.
Change-Id: I237c1dcfc413012d421f3ccc64e21c7caf5a7701
Diffstat (limited to 'base/common/src')
-rw-r--r-- | base/common/src/com/netscape/certsrv/logging/AuditEvent.java | 2 | ||||
-rw-r--r-- | base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryStateChangeEvent.java | 45 |
2 files changed, 45 insertions, 2 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java index 45907d0b7..891398d10 100644 --- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java +++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java @@ -164,8 +164,6 @@ public class AuditEvent implements IBundleLogEvent { public final static String CONFIG_SERIAL_NUMBER = "LOGGING_SIGNED_AUDIT_CONFIG_SERIAL_NUMBER_1"; - public static final String SECURITY_DATA_RECOVERY_REQUEST_STATE_CHANGE = - "LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST_STATE_CHANGE_4"; public final static String KEY_STATUS_CHANGE = "LOGGING_SIGNED_AUDIT_KEY_STATUS_CHANGE_6"; public final static String SYMKEY_GENERATION_REQUEST_PROCESSED = diff --git a/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryStateChangeEvent.java b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryStateChangeEvent.java new file mode 100644 index 000000000..d0e97f8bf --- /dev/null +++ b/base/common/src/com/netscape/certsrv/logging/event/SecurityDataRecoveryStateChangeEvent.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 SecurityDataRecoveryStateChangeEvent extends AuditEvent { + + private static final long serialVersionUID = 1L; + + private static final String LOGGING_PROPERTY = + "LOGGING_SIGNED_AUDIT_SECURITY_DATA_RECOVERY_REQUEST_STATE_CHANGE"; + + public SecurityDataRecoveryStateChangeEvent( + String subjectID, + String outcome, + RequestId recoveryID, + String operation) { + + super(LOGGING_PROPERTY); + + setParameters(new Object[] { + subjectID, + outcome, + recoveryID, + operation + }); + } +} |