Class DefaultLoggerAuditLog
java.lang.Object
com.sap.cloud.sdk.cloudplatform.auditlog.DefaultLoggerAuditLog
- All Implemented Interfaces:
AuditLog
Implementation of
AuditLog that redirects to the default logger.
This class does not guarantee any qualities that are expected for productive auditing purposes!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlogConfigChange(AccessRequester initiator, AuditedDataObject object, Throwable error, AccessedAttribute attributeAffected, AccessedAttribute... attributesAffected) Logs the change of some attributes of configuration data.voidlogConfigChangeBeginning(AccessRequester initiator, AuditedDataObject object, AccessedAttribute attributeAffected, AccessedAttribute... attributesAffected) Logs the start of a change of some attributes of configuration data.voidlogDataRead(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, Throwable error, AccessedAttribute attributeAffected, AccessedAttribute... attributesAffected) Logs the read access to some attributes of an object.voidlogDataReadAttempt(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, AccessedAttribute attributeAffected, AccessedAttribute... attributesAffected) Logs the attempt to read some attributes from an object.voidlogDataWrite(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, Throwable error, AccessedAttribute attributeAffected, AccessedAttribute... attributesAffected) Logs the modification of some attributes of an object.voidlogDataWriteAttempt(AccessRequester initiator, AuditedDataObject object, AuditedDataSubject subject, AccessedAttribute attributeAffected, AccessedAttribute... attributesAffected) Logs the attempt to write to some attributes of an object.voidlogSecurityEvent(AccessRequester initiator, String message, Throwable throwable) Logs a generic security event.voidlogSecurityEventBeginning(AccessRequester initiator, String message) Logs the start of a generic security event.
-
Constructor Details
-
DefaultLoggerAuditLog
public DefaultLoggerAuditLog()Default constructor. Uses a logger from theLoggerFactoryas logger implementation.
-
-
Method Details
-
logSecurityEventBeginning
Description copied from interface:AuditLogLogs the start of a generic security event.- Specified by:
logSecurityEventBeginningin interfaceAuditLog- Parameters:
initiator- Information about the user that starts performing the security event.message- Descriptive log message.
-
logSecurityEvent
public void logSecurityEvent(@Nonnull AccessRequester initiator, @Nullable String message, @Nullable Throwable throwable) Description copied from interface:AuditLogLogs a generic security event.- Specified by:
logSecurityEventin interfaceAuditLog- Parameters:
initiator- Information about the user that performed the security event.message- Descriptive log message.throwable- The exception in case of an error.
-
logConfigChangeBeginning
public void logConfigChangeBeginning(@Nonnull AccessRequester initiator, @Nonnull AuditedDataObject object, @Nonnull AccessedAttribute attributeAffected, @Nullable AccessedAttribute... attributesAffected) Description copied from interface:AuditLogLogs the start of a change of some attributes of configuration data.- Specified by:
logConfigChangeBeginningin interfaceAuditLog- Parameters:
initiator- Information about the user starting to modify the configuration.object- An instance ofAuditedDataObjectthat represents the object that will be modified.attributeAffected- An attribute that will be changed.attributesAffected- An arbitrary number of attributes that will be changed.
-
logConfigChange
public void logConfigChange(@Nonnull AccessRequester initiator, @Nonnull AuditedDataObject object, @Nullable Throwable error, @Nonnull AccessedAttribute attributeAffected, @Nullable AccessedAttribute... attributesAffected) Description copied from interface:AuditLogLogs the change of some attributes of configuration data.- Specified by:
logConfigChangein interfaceAuditLog- Parameters:
initiator- Information about the user modifying the configuration.object- An instance ofAuditedDataObjectthat represents the object that has been modified.error- The exception in case of an error.attributeAffected- An attribute that has been changed.attributesAffected- An arbitrary number of attributes that have been changed.
-
logDataReadAttempt
public void logDataReadAttempt(@Nonnull AccessRequester initiator, @Nonnull AuditedDataObject object, @Nonnull AuditedDataSubject subject, @Nonnull AccessedAttribute attributeAffected, @Nullable AccessedAttribute... attributesAffected) Description copied from interface:AuditLogLogs the attempt to read some attributes from an object.- Specified by:
logDataReadAttemptin interfaceAuditLog- Parameters:
initiator- Information about the user trying to the read the attributes.object- An instance ofAuditedDataObjectthat represents the object to be read.subject- An instance ofAuditedDataSubjectthat represents the owner of the data to be read.attributeAffected- An attribute that should be read.attributesAffected- An arbitrary number of attributes that should be read.
-
logDataRead
public void logDataRead(@Nonnull AccessRequester initiator, @Nonnull AuditedDataObject object, @Nonnull AuditedDataSubject subject, @Nullable Throwable error, @Nonnull AccessedAttribute attributeAffected, @Nullable AccessedAttribute... attributesAffected) Description copied from interface:AuditLogLogs the read access to some attributes of an object.- Specified by:
logDataReadin interfaceAuditLog- Parameters:
initiator- Information about the user reading the attributes.object- An instance ofAuditedDataObjectthat represents the object that has been read.subject- An instance ofAuditedDataSubjectthat represents the owner of the data that has been read.error- The exception in case of an error.attributeAffected- An attribute that has been read.attributesAffected- An arbitrary number of attributes that have been read.
-
logDataWriteAttempt
public void logDataWriteAttempt(@Nonnull AccessRequester initiator, @Nonnull AuditedDataObject object, @Nonnull AuditedDataSubject subject, @Nonnull AccessedAttribute attributeAffected, @Nullable AccessedAttribute... attributesAffected) Description copied from interface:AuditLogLogs the attempt to write to some attributes of an object.- Specified by:
logDataWriteAttemptin interfaceAuditLog- Parameters:
initiator- Information about the user trying to write to some attributes.object- An instance ofAuditedDataObjectthat represents the object that is about to be modified.subject- An instance ofAuditedDataSubjectthat represents the owner of the data that is about to be modified.attributeAffected- An attribute that should be modified, containing the old and new value.attributesAffected- An arbitrary number of attributes that should be modified, containing the old and new values.
-
logDataWrite
public void logDataWrite(@Nonnull AccessRequester initiator, @Nonnull AuditedDataObject object, @Nonnull AuditedDataSubject subject, @Nullable Throwable error, @Nonnull AccessedAttribute attributeAffected, @Nullable AccessedAttribute... attributesAffected) Description copied from interface:AuditLogLogs the modification of some attributes of an object.- Specified by:
logDataWritein interfaceAuditLog- Parameters:
initiator- Information about the user changing the attributes.object- An instance ofAuditedDataObjectthat represents the object that has been modified.subject- An instance ofAuditedDataSubjectthat represents the owner of the data that has been modified.error- The exception in case of an error.attributeAffected- An attribute that has been modified, containing the old and new value.attributesAffected- An arbitrary number of attributes that have been modified, containing the old and new values.
-