public class CryptoCoverageChecker extends AbstractSoapInterceptor
Modifier and Type | Class and Description |
---|---|
static class |
CryptoCoverageChecker.XPathExpression
A simple wrapper for an XPath expression and coverage type / scope
indicating how the XPath expression should be enforced as a cryptographic
coverage requirement.
|
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
prefixMap
Mapping of namespace prefixes to namespace URIs.
|
protected List<CryptoCoverageChecker.XPathExpression> |
xPaths
The XPath expressions for locating elements in SOAP messages
that must be covered.
|
Constructor and Description |
---|
CryptoCoverageChecker()
Creates a new instance.
|
CryptoCoverageChecker(Map<String,String> prefixes,
List<CryptoCoverageChecker.XPathExpression> xPaths)
Creates a new instance that checks for signature coverage over matches to
the provided XPath expressions making defensive copies of provided arguments.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrefixes(Map<String,String> prefixes)
Adds the mapping of namespace prefixes to namespace URIs, adding to any previously
set mappings.
|
void |
addXPaths(List<CryptoCoverageChecker.XPathExpression> xpaths)
Adds the XPath expressions to check for, adding to any previously
set expressions.
|
void |
handleMessage(SoapMessage message)
Checks that the WSS4J results refer to the required signed/encrypted
elements as defined by the XPath expressions in
xPaths . |
boolean |
isCheckFaults() |
void |
setCheckFaults(boolean checkFaults) |
void |
setPrefixes(Map<String,String> prefixes)
Sets the mapping of namespace prefixes to namespace URIs, clearing all previously
set mappings.
|
void |
setXPaths(List<CryptoCoverageChecker.XPathExpression> xpaths)
Sets the XPath expressions to check for, clearing all previously
set expressions.
|
getFaultCodePrefix, getRoles, getUnderstoodHeaders, prepareStackTrace
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleFault
protected List<CryptoCoverageChecker.XPathExpression> xPaths
prefixMap
for namespace prefixes available.public CryptoCoverageChecker()
#setPrefixes()
and #setXpaths()
for providing configuration options.public CryptoCoverageChecker(Map<String,String> prefixes, List<CryptoCoverageChecker.XPathExpression> xPaths)
prefixes
- mapping of namespace prefixes to namespace URIsxPaths
- a list of XPath expressionspublic void handleMessage(SoapMessage message) throws Fault
xPaths
.public final void setXPaths(List<CryptoCoverageChecker.XPathExpression> xpaths)
xPaths
- the XPath expressions to check forpublic final void addXPaths(List<CryptoCoverageChecker.XPathExpression> xpaths)
xPaths
- the XPath expressions to check forpublic final void setPrefixes(Map<String,String> prefixes)
prefixes
- the mapping of namespace prefixes to namespace URIspublic final void addPrefixes(Map<String,String> prefixes)
prefixes
- the mapping of namespace prefixes to namespace URIspublic boolean isCheckFaults()
public void setCheckFaults(boolean checkFaults)
Apache CXF