public final class AuditLogger extends Object
This class handles all logging request by delegating the calls to the AuditLog
implementation given by the
AuditLogFacade
.
Constructor and Description |
---|
AuditLogger() |
Modifier and Type | Method and Description |
---|---|
static AuditLog |
getAuditLog()
Getter for the current
AuditLog implementation. |
static AuditLogFacade |
getAuditLogFacade()
Returns the
AuditLogFacade instance. |
static void |
logConfigChange(AccessRequester initiator,
AuditedDataObject object,
Iterable<AccessedAttribute> attributesAffected,
Throwable error)
Logs the change of some attributes of configuration data.
|
static void |
logConfigChange(AuditedDataObject object,
Iterable<AccessedAttribute> attributesAffected,
Throwable error)
Logs the change of some attributes of configuration data by the current request.
|
static void |
logConfigChangeBeginning(AccessRequester initiator,
AuditedDataObject object,
Iterable<AccessedAttribute> attributesAffected)
Logs the start of a change of some attributes of configuration data.
|
static void |
logConfigChangeBeginning(AuditedDataObject object,
Iterable<AccessedAttribute> attributesAffected)
Logs the start of a change of some attributes of configuration data by the current request.
|
static void |
logDataRead(AccessRequester initiator,
AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected,
Throwable error)
Logs the read access to some attributes of an object.
|
static void |
logDataRead(AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected,
Throwable error)
Logs the read access to some attributes of an object by the current request.
|
static void |
logDataReadAttempt(AccessRequester initiator,
AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected)
Logs the attempt to read some attributes from an object.
|
static void |
logDataReadAttempt(AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected)
Logs the attempt to read some attributes from an object by the current request.
|
static void |
logDataWrite(AccessRequester initiator,
AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected,
Throwable error)
Logs the modification of some attributes of an object.
|
static void |
logDataWrite(AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected,
Throwable error)
Logs the modification of some attributes of an object by the current request.
|
static void |
logDataWriteAttempt(AccessRequester initiator,
AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected)
Logs the attempt to write to some attributes of an object.
|
static void |
logDataWriteAttempt(AuditedDataObject object,
AuditedDataSubject subject,
Iterable<AccessedAttribute> attributesAffected)
Logs the attempt to write to some attributes of an object by the current request.
|
static void |
logSecurityEvent(AccessRequester initiator,
String message,
Throwable throwable)
Logs a generic security event.
|
static void |
logSecurityEvent(String message,
Throwable throwable)
Logs a generic security event by the current request.
|
static void |
logSecurityEventBeginning(AccessRequester initiator,
String message)
Logs the start of a generic security event.
|
static void |
logSecurityEventBeginning(String message)
Logs the start of a generic security event by the current request.
|
static void |
setAuditLogFacade(AuditLogFacade auditLogFacade)
Replaces the default
AuditLogFacade instance. |
public static void setAuditLogFacade(AuditLogFacade auditLogFacade)
AuditLogFacade
instance. This method is for internal use only.auditLogFacade
- The facade to replace the current/default one with.public static AuditLog getAuditLog()
AuditLog
implementation.public static void logSecurityEventBeginning(AccessRequester initiator, String message)
initiator
- Information about the user that starts performing the security event.message
- Descriptive log message.public static void logSecurityEventBeginning(String message)
message
- Descriptive log message.public static void logSecurityEvent(AccessRequester initiator, String message, @Nullable Throwable throwable)
initiator
- Information about the user that performed the security event.message
- Descriptive log message.throwable
- The exception in case of an error.public static void logSecurityEvent(String message, @Nullable Throwable throwable)
message
- Descriptive log message.throwable
- The exception in case of an error.public static void logConfigChangeBeginning(AccessRequester initiator, AuditedDataObject object, @Nullable Iterable<AccessedAttribute> attributesAffected)
initiator
- Information about the user starting to modify the configuration.object
- An instance of AuditedDataObject
that represents the object that will be modified.attributesAffected
- A list containing the attributes that will be changed.public static void logConfigChangeBeginning(AuditedDataObject object, @Nullable Iterable<AccessedAttribute> attributesAffected)
object
- An instance of AuditedDataObject
that represents the object that will be modified.attributesAffected
- A list containing the attributes that will be changed.public static void logConfigChange(AccessRequester initiator, AuditedDataObject object, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable Throwable error)
initiator
- Information about the user modifying the configuration.object
- An instance of AuditedDataObject
that represents the object that has been modified.attributesAffected
- A list containing the attributes that were changed.error
- The exception in case of an error.public static void logConfigChange(AuditedDataObject object, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable Throwable error)
object
- An instance of AuditedDataObject
that represents the object that has been modified.attributesAffected
- A list containing the attributes that were changed.error
- The exception in case of an error.public static void logDataReadAttempt(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected)
initiator
- Information about the user trying to the read the attributes.object
- An instance of AuditedDataObject
that represents the object to be read.subject
- An instance of AuditedDataSubject
that represents the owner of the data to be read.attributesAffected
- A list containing the attributes that were read.public static void logDataReadAttempt(AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected)
object
- An instance of AuditedDataObject
that represents the object to be read.subject
- An instance of AuditedDataSubject
that represents the owner of the data to be read.attributesAffected
- A list containing the attributes that were read.public static void logDataRead(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable Throwable error)
initiator
- Information about the user reading the attributes.object
- An instance of AuditedDataObject
that represents the object that has been read.subject
- An instance of AuditedDataSubject
that represents the owner of the data that has been read.attributesAffected
- A list containing the attributes that were read.error
- The exception in case of an error.public static void logDataRead(AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable Throwable error)
object
- An instance of AuditedDataObject
that represents the object that has been read.subject
- An instance of AuditedDataSubject
that represents the owner of the data that has been read.attributesAffected
- A list containing the attributes that were read.error
- The exception in case of an error.public static void logDataWriteAttempt(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected)
initiator
- Information about the user trying to write to some attributes.object
- An instance of AuditedDataObject
that represents the object that is about to be modified.subject
- An instance of AuditedDataSubject
that represents the owner of the data that is about to be
modified.attributesAffected
- A list containing the attributes that should be modified, containing the old and new values.public static void logDataWriteAttempt(AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected)
object
- An instance of AuditedDataObject
that represents the object that is about to be modified.subject
- An instance of AuditedDataSubject
that represents the owner of the data that is about to be
modified.attributesAffected
- A list containing the attributes that should be modified, containing the old and new values.public static void logDataWrite(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable Throwable error)
initiator
- Information about the user changing the attributes.object
- An instance of AuditedDataObject
that represents the object that has been modified.subject
- An instance of AuditedDataSubject
that represents the owner of the data that has been
modified.attributesAffected
- A list containing the attributes that should were modified, containing the old and new values.error
- The exception in case of an error.public static void logDataWrite(AuditedDataObject object, AuditedDataSubject subject, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable Throwable error)
object
- An instance of AuditedDataObject
that represents the object that has been modified.subject
- An instance of AuditedDataSubject
that represents the owner of the data that has been
modified.attributesAffected
- A list containing the attributes that should were modified, containing the old and new values.error
- The exception in case of an error.@Nullable public static AuditLogFacade getAuditLogFacade()
AuditLogFacade
instance. For internal use only.Copyright © 2018 SAP SE. All rights reserved.