Package org.forgerock.openam.saml2.audit
Class SAML2Auditor
- java.lang.Object
-
- org.forgerock.openam.saml2.audit.SAML2Auditor
-
- All Implemented Interfaces:
SAML2EventLogger
public class SAML2Auditor extends Object implements SAML2EventLogger
Responsible for publishing audit access events for individual SAML2 requests. A SAML2Auditor is not thread safe and a new SAML2Auditor should be used for each request.
-
-
Constructor Summary
Constructors Constructor Description SAML2Auditor(AuditEventPublisher auditEventPublisher, AuditEventFactory auditEventFactory, jakarta.servlet.http.HttpServletRequest request)Constructor for SAML2Auditor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauditAccessAttempt()Publishes an audit event with details of the attempted SAML2 operation, if the 'access' topic is audited.voidauditAccessFailure(String errorCode, String message)Publishes an event with details of the failed CREST operation, if the 'access' topic is audited.voidauditAccessSuccess()Publishes an event with details of the successfully completed SAML2 operation, if the 'access' topic is audited.voidauditForwardToLocalUserLogin()Audits a forward to local user Login AcitonvoidauditForwardToProxy()Audits a forward to proxy action.voidsetAuthTokenId(Object session)voidsetMethod(String method)voidsetRealm(String realm)voidsetRequestId(String authnRequestId)/**voidsetSessionTrackingId(String trackingId)voidsetSSOTokenId(Object session)voidsetUserId(String userId)
-
-
-
Constructor Detail
-
SAML2Auditor
public SAML2Auditor(AuditEventPublisher auditEventPublisher, AuditEventFactory auditEventFactory, jakarta.servlet.http.HttpServletRequest request)
Constructor for SAML2Auditor- Parameters:
auditEventPublisher- The AuditEventPublisherauditEventFactory- The AuditEventFactoryrequest- The HttpServletReqeust associated with the SAML2 request
-
-
Method Detail
-
auditAccessAttempt
public void auditAccessAttempt()
Description copied from interface:SAML2EventLoggerPublishes an audit event with details of the attempted SAML2 operation, if the 'access' topic is audited.- Specified by:
auditAccessAttemptin interfaceSAML2EventLogger
-
auditAccessSuccess
public void auditAccessSuccess()
Description copied from interface:SAML2EventLoggerPublishes an event with details of the successfully completed SAML2 operation, if the 'access' topic is audited. Any exception that occurs while trying to publish the audit event will be captured in the debug logs but otherwise ignored.- Specified by:
auditAccessSuccessin interfaceSAML2EventLogger
-
auditAccessFailure
public void auditAccessFailure(String errorCode, String message)
Description copied from interface:SAML2EventLoggerPublishes an event with details of the failed CREST operation, if the 'access' topic is audited. Any exception that occurs while trying to publish the audit event will be captured in the debug logs but otherwise ignored.- Specified by:
auditAccessFailurein interfaceSAML2EventLogger- Parameters:
errorCode- A unique code that identifies the error condition.message- A human-readable description of the error that occurred.
-
setSessionTrackingId
public void setSessionTrackingId(String trackingId)
- Specified by:
setSessionTrackingIdin interfaceSAML2EventLogger- Parameters:
trackingId- Unique alias of session.
-
setUserId
public void setUserId(String userId)
- Specified by:
setUserIdin interfaceSAML2EventLogger- Parameters:
userId- Identifies Subject of authentication.
-
setRealm
public void setRealm(String realm)
- Specified by:
setRealmin interfaceSAML2EventLogger- Parameters:
realm- The realm for which the event is being logged.
-
setMethod
public void setMethod(String method)
- Specified by:
setMethodin interfaceSAML2EventLogger- Parameters:
method- Identifies the operation invoked.
-
auditForwardToProxy
public void auditForwardToProxy()
Description copied from interface:SAML2EventLoggerAudits a forward to proxy action.- Specified by:
auditForwardToProxyin interfaceSAML2EventLogger
-
auditForwardToLocalUserLogin
public void auditForwardToLocalUserLogin()
Description copied from interface:SAML2EventLoggerAudits a forward to local user Login Aciton- Specified by:
auditForwardToLocalUserLoginin interfaceSAML2EventLogger
-
setRequestId
public void setRequestId(String authnRequestId)
Description copied from interface:SAML2EventLogger/**- Specified by:
setRequestIdin interfaceSAML2EventLogger- Parameters:
authnRequestId- the request id to log for this saml2 auth request
-
setSSOTokenId
public void setSSOTokenId(Object session)
- Specified by:
setSSOTokenIdin interfaceSAML2EventLogger- Parameters:
session- sets the sso token id
-
setAuthTokenId
public void setAuthTokenId(Object session)
- Specified by:
setAuthTokenIdin interfaceSAML2EventLogger- Parameters:
session- the auth token id for the preceding authentication request
-
-