Package swiss.trustbroker.audit.service
Class BaseAuditLogger
java.lang.Object
swiss.trustbroker.audit.service.BaseAuditLogger
- All Implemented Interfaces:
AuditLogger
- Direct Known Subclasses:
DefaultAuditLogger,OpsAuditLogger
Base class of loggers that perrform the actual logging. Separate class to allow mocking in tests.
Audit entries emitted as follows:
Audit entries emitted as follows:
- INFO: RP.AuthnRequest, RP.Response, RP.LogoutRequest
- DEBUG: CP.AuthnRequest, CP.Response
- TRACE: AttributeValue marked with FQ name
- If AuditLoggerDetails=TRACE the full SAML message is attached as a detail field (large).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAuditDetail(org.opensaml.core.xml.XMLObject xmlObject) Convert OpenSAML object to details for logging.protected abstract org.slf4j.Loggerprotected abstract org.slf4j.Loggerprotected booleanvoidAudit message and context data to analyze login traffic and record what's needed for compliance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface swiss.trustbroker.audit.service.AuditLogger
createAuditLogBuilder
-
Field Details
-
DETAILS_LOGGER_POSTFIX
- See Also:
-
-
Constructor Details
-
BaseAuditLogger
protected BaseAuditLogger()
-
-
Method Details
-
log
Description copied from interface:AuditLoggerAudit message and context data to analyze login traffic and record what's needed for compliance.- Specified by:
login interfaceAuditLogger- Parameters:
eventType- is SAML AuthnRequest or Responseinbound- means messages coming in (AuthnRequest from RP or Response from CP)message- contains the data already mapped viaAuditMapperand formatted byAuditLogBuilder
-
getLogger
protected abstract org.slf4j.Logger getLogger()- Returns:
- logger to use
-
getDetailLogger
protected abstract org.slf4j.Logger getDetailLogger()- Returns:
- logger to use for details
-
getAuditDetail
Description copied from interface:AuditLoggerConvert OpenSAML object to details for logging.- Specified by:
getAuditDetailin interfaceAuditLogger- Parameters:
xmlObject-- Returns:
- Extracted part of object for detail logging.
-
isDetailAuditingEnabled
protected boolean isDetailAuditingEnabled()
-