Class AbstractXACMLAuthorizingInterceptor
- java.lang.Object
-
- org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
-
- org.apache.cxf.rt.security.saml.xacml2.AbstractXACMLAuthorizingInterceptor
-
- All Implemented Interfaces:
Interceptor<Message>,PhaseInterceptor<Message>
- Direct Known Subclasses:
XACMLAuthorizingInterceptor
public abstract class AbstractXACMLAuthorizingInterceptor extends AbstractPhaseInterceptor<Message>
An interceptor to perform an XACML 2.0 authorization request to a remote PDP using OpenSAML, and make an authorization decision based on the response. It takes the principal and roles from the SecurityContext, and uses the XACMLRequestBuilder to construct an XACML Request statement. How the actual PDP invocation is made is up to a subclass.
-
-
Constructor Summary
Constructors Constructor Description AbstractXACMLAuthorizingInterceptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleanauthorize(Principal principal, List<String> roles, Message message)Perform a (remote) authorization decision and return a boolean depending on the resultXACMLRequestBuildergetRequestBuilder()voidhandleMessage(Message message)Intercepts a message.protected voidhandleObligations(org.opensaml.xacml.ctx.RequestType request, Principal principal, Message message, org.opensaml.xacml.ctx.ResultType result)Handle any Obligations returned by the PDPprotected abstract org.opensaml.xacml.ctx.ResponseTypeperformRequest(org.opensaml.xacml.ctx.RequestType request, Message message)voidsetRequestBuilder(XACMLRequestBuilder requestBuilder)-
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
-
-
-
-
Method Detail
-
handleMessage
public void handleMessage(Message message) throws Fault
Description copied from interface:InterceptorIntercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.- Throws:
Fault
-
getRequestBuilder
public XACMLRequestBuilder getRequestBuilder()
-
setRequestBuilder
public void setRequestBuilder(XACMLRequestBuilder requestBuilder)
-
authorize
protected boolean authorize(Principal principal, List<String> roles, Message message) throws Exception
Perform a (remote) authorization decision and return a boolean depending on the result- Throws:
Exception
-
handleObligations
protected void handleObligations(org.opensaml.xacml.ctx.RequestType request, Principal principal, Message message, org.opensaml.xacml.ctx.ResultType result) throws ExceptionHandle any Obligations returned by the PDP- Throws:
Exception
-
-