Class RestLog
- java.lang.Object
-
- org.forgerock.openam.forgerockrest.utils.RestLog
-
public final class RestLog extends Object
REST logging and auditing.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description RestLog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauditAccessDenied(String resource, String action, String authzModule, SSOToken token)Audits a failed REST request, indicating which resource was accessed using which method linked to the SSOToken of the accessing user.voidauditAccessGranted(String resource, String action, String authzModule, SSOToken token)Audits an attempted REST request, indicating which resource was accessed using which method linked to the SSOToken of the accessing user.voidauditAccessMessage(String resource, String action, SSOToken token)Audits an attempted REST request, indicating which resource was accessed using which method linked to the SSOToken of the accessing user.StringdebugOperationAttemptAsPrincipal(String resource, String operation, org.forgerock.services.context.Context context, String realm, Debug debug)Logs an operation attempt on a resource, pulling the principal's name out of the context passed in, and indicating in which realm the operation is requested (if appropriate).
-
-
-
Field Detail
-
LOG_NAME
public static final String LOG_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
debugOperationAttemptAsPrincipal
public String debugOperationAttemptAsPrincipal(String resource, String operation, org.forgerock.services.context.Context context, String realm, Debug debug)
Logs an operation attempt on a resource, pulling the principal's name out of the context passed in, and indicating in which realm the operation is requested (if appropriate).- Parameters:
resource- the resource being used. Not nullable.operation- the operation on the resource being performed. Not nullable.context- the context of the operation request. Not nullable.realm- the realm in which we are executing. Nullable.debug- the debug to write messages out to. Not nullable.- Returns:
- the name of the principal which requested the operation, or null if not available.
-
auditAccessMessage
public void auditAccessMessage(String resource, String action, SSOToken token)
Audits an attempted REST request, indicating which resource was accessed using which method linked to the SSOToken of the accessing user.- Parameters:
resource- The accessed resource.action- The CREST action-type requested.token- The SSO token of the accessing user (null if XUI)
-
auditAccessDenied
public void auditAccessDenied(String resource, String action, String authzModule, SSOToken token)
Audits a failed REST request, indicating which resource was accessed using which method linked to the SSOToken of the accessing user.- Parameters:
resource- The accessed resource.action- The CREST action-type requested.token- The SSO token of the accessing user.
-
auditAccessGranted
public void auditAccessGranted(String resource, String action, String authzModule, SSOToken token)
Audits an attempted REST request, indicating which resource was accessed using which method linked to the SSOToken of the accessing user.- Parameters:
resource- The accessed resource.action- The CREST action-type requested.token- The SSO token of the accessing user.
-
-