| Modifier and Type | Field and Description |
|---|---|
static String |
MASKED_QUERY_PARAMS_OPTION
Comma seperated list of query parameters who's values will be masked
e.g.
|
| Constructor and Description |
|---|
Log4jAuditor(String loggerName,
String componentName,
String serviceName) |
| Modifier and Type | Method and Description |
|---|---|
void |
audit(CorrelationContext correlationContext,
AuditContext auditContext,
String action,
String resourceName,
String resourceType,
String outcome,
String message)
Records a single audit event.
|
void |
audit(String action,
String resourceName,
String resourceType,
String outcome)
Records a single audit event using context information associated with the current thread.
|
void |
audit(String action,
String resourceName,
String resourceType,
String outcome,
String message)
Records a single audit event using context information associated with the current thread.
|
String |
getAuditorName()
The auditor name established when the Auditor was acquired.
|
String |
getComponentName()
The component name established when the Auditor was acquired.
|
String |
getServiceName()
The service name established when the Auditor was acquired.
|
static String |
maskTokenFromURL(String originalUrl)
If the url contains knoxtoken parameter, mask it when logging.
|
public static final String MASKED_QUERY_PARAMS_OPTION
public void audit(CorrelationContext correlationContext, AuditContext auditContext, String action, String resourceName, String resourceType, String outcome, String message)
Auditoraudit in interface AuditorcorrelationContext - The explicit correlation context to use when recording this audit event. May not be null.auditContext - The explicit audit context to use when recording this audit event. May not be null.action - The action being recorded for this audit event. May not be null.resourceName - The resource identifier to record for this audit event. May not be null.resourceType - The resource type to record for this audit event. May not be null.outcome - The outcome to record for this audit event. Typically the result of a authorization check. May not be null.message - An arbitrary message to record with the audit event. May be null.public void audit(String action, String resourceName, String resourceType, String outcome, String message)
Auditoraudit in interface Auditoraction - The action being recorded for this audit event. May not be null.resourceName - The resource identifier to record for this audit event. May not be null.resourceType - The resource type to record for this audit event. May not be null.outcome - The outcome to record for this audit event. Typically the result of a authorization check. May not be null.message - An arbitrary message to record with the audit event. May be null.public void audit(String action, String resourceName, String resourceType, String outcome)
Auditoraudit in interface Auditoraction - The action being recorded for this audit event. May not be null.resourceName - The resource identifier to record for this audit event. May not be null.resourceType - The resource type to record for this audit event. May not be null.outcome - The outcome to record for this audit event. Typically the result of a authorization check. May not be null.public String getComponentName()
AuditorgetComponentName in interface Auditorpublic String getServiceName()
AuditorgetServiceName in interface Auditorpublic String getAuditorName()
AuditorgetAuditorName in interface AuditorCopyright © 2022 The Apache Software Foundation. All rights reserved.