public class Audit extends AuditModule
This class provides convenience methods for producing audit output. Audit output is logged using the standard iAS logger SECURITYLOGGER. However, audit output is only produced if auditing is active. Auditing is configured in server.xml in the security-service element.
Audit output if logged with Level.WARNING.
Some diagnostic methods are also provided for debugging.
props
Constructor and Description |
---|
Audit() |
Modifier and Type | Method and Description |
---|---|
void |
authentication(String user,
String realm,
boolean success)
Invoked post authentication request for a user in a given realm
|
void |
ejbAsWebServiceInvocation(String endpoint,
boolean success)
Invoked during validation of the web service request
|
void |
ejbInvocation(String user,
String ejb,
String method,
boolean success)
Invoked post ejb authorization request.
|
void |
init(Properties props)
Method is invoked at server startup, during AuditModule initialization.
|
static boolean |
isActive()
Check auditing state.
|
void |
serverShutdown()
Invoked upon completion of the server shutdown
|
void |
serverStarted()
Invoked upon completion of the server startup
|
static void |
showACL(Application app)
Diagnostic method.
|
void |
webInvocation(String user,
javax.servlet.http.HttpServletRequest req,
String type,
boolean success)
Invoked post web authorization request.
|
void |
webServiceInvocation(String uri,
String endpoint,
boolean success)
Invoked during validation of the web service request
|
public static boolean isActive()
public void init(Properties props)
BaseAuditModule
init
in class BaseAuditModule
props
- the properties for the AuditModule. These properties are defined in the domain.xmlpublic void authentication(String user, String realm, boolean success)
authentication
in class BaseAuditModule
user
- username for whom the authentication request was maderealm
- the realm name under which the user is authenticated.success
- the status of the authenticationpublic void webInvocation(String user, javax.servlet.http.HttpServletRequest req, String type, boolean success)
webInvocation
in class AuditModule
user
- the username for whom the authorization was performedreq
- the HttpRequest object for the web requesttype
- either hasResourcePermission, hasUserDataPermission or hasRoleRefPermissionsuccess
- the status of the web authorization requestpublic void ejbInvocation(String user, String ejb, String method, boolean success)
ejbInvocation
in class AuditModule
user
- the username for whom the authorization was performedejb
- the ejb name for which this authorization was performedmethod
- the method name for which this authorization was performedsuccess
- the status of the ejb authorization requestpublic void webServiceInvocation(String uri, String endpoint, boolean success)
webServiceInvocation
in class AuditModule
uri
- The URL representation of the web service endpointendpoint
- The name of the endpoint representationsuccess
- the status of the web service request validationpublic void ejbAsWebServiceInvocation(String endpoint, boolean success)
ejbAsWebServiceInvocation
in class AuditModule
endpoint
- The URL representation of the web service endpointsuccess
- the status of the web service request validationpublic void serverStarted()
serverStarted
in class BaseAuditModule
public void serverShutdown()
serverShutdown
in class BaseAuditModule
public static void showACL(Application app)
Implementation is not particularly efficient but this is only called for debugging purposes at startup. All errors are ignored.
app
- Application object to analyze.Copyright © 2019. All rights reserved.