public abstract class AbstractAuditInterceptor<T extends WsAuditDataset> extends AbstractSafeInterceptor
| Modifier and Type | Field and Description |
|---|---|
static String |
DATASET_CONTEXT_KEY
Key used to store audit datasets in Web Service contexts.
|
static String |
WSSE_NS_URI
XML Namespace URI of WS-Security Extensions 1.1.
|
static String |
XUA_SAML_ASSERTION
If a SAML assertion is stored under this key in the Web Service context,
IPF will use it instead of parsing the WS-Security header by itself.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuditInterceptor(String phase,
AuditStrategy<T> auditStrategy)
Constructor which sets a strategy.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
extractAddressesFromServletRequest(org.apache.cxf.binding.soap.SoapMessage message,
WsAuditDataset auditDataset)
Extracts service URI and client IP address from the servlet request.
|
protected static Object |
extractPojo(org.apache.cxf.message.Message message)
Extracts POJO from the given CXF message.
|
protected static void |
extractUserIdFromWSAddressing(org.apache.cxf.binding.soap.SoapMessage message,
boolean isInbound,
boolean inverseWsaDirection,
WsAuditDataset auditDataset)
Extracts user ID from an WS-Addressing SOAP header and stores it in the given
audit dataset.
|
protected static void |
extractXuaUserNameFromSaml2Assertion(org.apache.cxf.binding.soap.SoapMessage message,
org.apache.cxf.headers.Header.Direction headerDirection,
WsAuditDataset auditDataset)
Extracts ITI-40 XUA user name from the SAML2 assertion contained
in the given CXF message, and stores it in the ATNA audit dataset.
|
protected T |
getAuditDataset(org.apache.cxf.binding.soap.SoapMessage message)
Returns an audit dataset instance which corresponds to the given message.
|
protected AuditStrategy<T> |
getAuditStrategy()
Returns the audit strategy associated with this interceptor.
|
handleMessage, processgetFaultCodePrefix, getRoles, getUnderstoodHeaders, prepareStackTraceaddAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBeforepublic static final String DATASET_CONTEXT_KEY
public static final String XUA_SAML_ASSERTION
public static final String WSSE_NS_URI
protected AbstractAuditInterceptor(String phase, AuditStrategy<T> auditStrategy)
phase - the phase in which to use this interceptor.auditStrategy - an audit strategy instance. null values are
explicitly prohibited.
protected T getAuditDataset(org.apache.cxf.binding.soap.SoapMessage message)
When no such instance is currently associated with the message, a new one
will be created by means of the corresponding AuditStrategy
and registered in the message's exchange.
message - CXF message currently handled by this interceptor.null when this instance
could be neither obtained nor created from scratch.protected AuditStrategy<T> getAuditStrategy()
null when none configured.protected static void extractUserIdFromWSAddressing(org.apache.cxf.binding.soap.SoapMessage message,
boolean isInbound,
boolean inverseWsaDirection,
WsAuditDataset auditDataset)
message - CXF message.isInbound - true when the CXF message is an inbound one,
false otherwise.inverseWsaDirection - true when direction is actually inversed, i.e. when the
user ID should be taken not from the "ReplyTo:" WS-Addressing header,
but from "To:" --- useful for asynchronous responses, where the endpoint
which receives the response is not the endpoint which sent the request.auditDataset - target audit dataset.protected static void extractXuaUserNameFromSaml2Assertion(org.apache.cxf.binding.soap.SoapMessage message,
org.apache.cxf.headers.Header.Direction headerDirection,
WsAuditDataset auditDataset)
message - source CXF message.headerDirection - direction of the header containing the SAML2 assertion.auditDataset - target ATNA audit dataset.protected static void extractAddressesFromServletRequest(org.apache.cxf.binding.soap.SoapMessage message,
WsAuditDataset auditDataset)
protected static Object extractPojo(org.apache.cxf.message.Message message)
null when none found.Copyright © 2016 Open eHealth Foundation. All rights reserved.