diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-05-19 00:33:26 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-05-26 22:12:48 +0200 |
commit | c9a9fe6e31d860c089dd2b2ee584dd0d4a9b2174 (patch) | |
tree | 83ca0ee1e6c0d22f702be1b0f7aa5b92e6de8a65 /base/common/src | |
parent | 33838ebaffcdf121c4167379f0c917b5b5b67d0e (diff) | |
download | pki-c9a9fe6e31d860c089dd2b2ee584dd0d4a9b2174.tar.gz pki-c9a9fe6e31d860c089dd2b2ee584dd0d4a9b2174.tar.xz pki-c9a9fe6e31d860c089dd2b2ee584dd0d4a9b2174.zip |
Added SCHEDULE_CRL_GENERATION audit event.
A new SCHEDULE_CRL_GENERATION audit event has been added which
will be generated when CRL generation is scheduled manually.
https://pagure.io/dogtagpki/issue/2651
Change-Id: I1e2fc307491e796e50b09550d66e5eba370d090a
Diffstat (limited to 'base/common/src')
-rw-r--r-- | base/common/src/com/netscape/certsrv/logging/event/ScheduleCRLGenerationEvent.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/event/ScheduleCRLGenerationEvent.java b/base/common/src/com/netscape/certsrv/logging/event/ScheduleCRLGenerationEvent.java new file mode 100644 index 000000000..5b2a4610b --- /dev/null +++ b/base/common/src/com/netscape/certsrv/logging/event/ScheduleCRLGenerationEvent.java @@ -0,0 +1,56 @@ +// --- 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.logging.ILogger; + +public class ScheduleCRLGenerationEvent extends AuditEvent { + + private static final long serialVersionUID = 1L; + + public final static String LOGGING_PROPERTY = + "LOGGING_SIGNED_AUDIT_SCHEDULE_CRL_GENERATION"; + + public ScheduleCRLGenerationEvent( + String subjectID) { + + super(LOGGING_PROPERTY); + + setParameters(new Object[] { + subjectID, + ILogger.SUCCESS, + getAttributeList() + }); + } + + public ScheduleCRLGenerationEvent( + String subjectID, + Exception e) { + + super(LOGGING_PROPERTY); + + setAttribute("FailureReason", e.getMessage()); + + setParameters(new Object[] { + subjectID, + ILogger.FAILURE, + getAttributeList() + }); + } +} |