Class BaseAuditLogger

java.lang.Object
swiss.trustbroker.audit.service.BaseAuditLogger
All Implemented Interfaces:
AuditLogger
Direct Known Subclasses:
DefaultAuditLogger, OpsAuditLogger

public abstract class BaseAuditLogger extends Object implements AuditLogger
Base class of loggers that perrform the actual logging. Separate class to allow mocking in tests.
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 Details

  • Constructor Details

    • BaseAuditLogger

      protected BaseAuditLogger()
  • Method Details

    • log

      public void log(EventType eventType, boolean inbound, String message)
      Description copied from interface: AuditLogger
      Audit message and context data to analyze login traffic and record what's needed for compliance.
      Specified by:
      log in interface AuditLogger
      Parameters:
      eventType - is SAML AuthnRequest or Response
      inbound - means messages coming in (AuthnRequest from RP or Response from CP)
      message - contains the data already mapped via AuditMapper and formatted by AuditLogBuilder
    • 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

      public String getAuditDetail(org.opensaml.core.xml.XMLObject xmlObject)
      Description copied from interface: AuditLogger
      Convert OpenSAML object to details for logging.
      Specified by:
      getAuditDetail in interface AuditLogger
      Parameters:
      xmlObject -
      Returns:
      Extracted part of object for detail logging.
    • isDetailAuditingEnabled

      protected boolean isDetailAuditingEnabled()