|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.rt.security.xacml.DefaultXACMLRequestBuilder
public class DefaultXACMLRequestBuilder
This class constructs an XACML Request given a Principal, list of roles and MessageContext, following the SAML 2.0 profile of XACML 2.0. The principal name is inserted as the Subject ID, and the list of roles associated with that principal are inserted as Subject roles. The action to send defaults to "execute". For a SOAP Service, the resource-id Attribute refers to the "{serviceNamespace}serviceName#{operationNamespace}operationName" String (shortened to "{serviceNamespace}serviceName#operationName" if the namespaces are identical). The "{serviceNamespace}serviceName", "{operationNamespace}operationName" and resource URI are also sent to simplify processing at the PDP side. For a REST service the request URL is the resource. You can also configure the ability to send the truncated request URI instead for a SOAP or REST service. The current DateTime is also sent in an Environment, however this can be disabled via configuration.
Constructor Summary | |
---|---|
DefaultXACMLRequestBuilder()
|
Method Summary | |
---|---|
org.opensaml.xacml.ctx.RequestType |
createRequest(Principal principal,
List<String> roles,
Message message)
Create an XACML Request given a Principal, list of roles and Message. |
String |
getResource(Message message)
Return the Resource that has been inserted into the Request. |
List<String> |
getResources(Message message)
Return the list of Resources that have been inserted into the Request. |
void |
setAction(String action)
Set a new Action String to use |
void |
setSendDateTime(boolean sendDateTime)
|
void |
setSendFullRequestURL(boolean sendFullRequestURL)
Whether to send the full Request URL as the resource or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultXACMLRequestBuilder()
Method Detail |
---|
public org.opensaml.xacml.ctx.RequestType createRequest(Principal principal, List<String> roles, Message message) throws Exception
createRequest
in interface XACMLRequestBuilder
principal
- The principal to insert into the Subject of the Requestroles
- The list of roles associated with the principalmessage
- The Message from which to retrieve the resource
Exception
public void setAction(String action)
public void setSendDateTime(boolean sendDateTime)
public void setSendFullRequestURL(boolean sendFullRequestURL)
public List<String> getResources(Message message)
XACMLRequestBuilder
getResources
in interface XACMLRequestBuilder
message
- The Message from which to retrieve the resource
public String getResource(Message message)
XACMLRequestBuilder
getResource
in interface XACMLRequestBuilder
message
- The Message from which to retrieve the resource
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |