Omaha #3509 Fixed XACML processing to work properly with DPA
Change-Id: I6b66cfe4217c8a9bc2dec1d7e97b7f5203b518fe Former-commit-id:02719e9f90
[formerly 4661d8ec3ed187b2ccf270a2acbcd55cc5ef359c] Former-commit-id:201962c6fc
This commit is contained in:
parent
f62c51c532
commit
defe9d1c42
3 changed files with 36 additions and 7 deletions
|
@ -3,6 +3,14 @@
|
|||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<bean id="xacmlInterceptor" class="com.raytheon.uf.edex.registry.acp.xacml.interceptor.XACMLInterceptor">
|
||||
<constructor-arg value="pre-invoke"/>
|
||||
<constructor-arg ref="XACMLPolicyAdministrator"/>
|
||||
<constructor-arg ref="XACMLPolicyDecisionPoint"/>
|
||||
<constructor-arg ref="registryObjectDao"/>
|
||||
</bean>
|
||||
|
||||
<bean id="xacmlQueryInterceptor" class="com.raytheon.uf.edex.registry.acp.xacml.interceptor.XACMLInterceptor">
|
||||
<constructor-arg value="post-invoke"/>
|
||||
<constructor-arg ref="XACMLPolicyAdministrator"/>
|
||||
<constructor-arg ref="XACMLPolicyDecisionPoint"/>
|
||||
<constructor-arg ref="registryObjectDao"/>
|
||||
|
|
|
@ -133,7 +133,26 @@ public class XACMLInterceptor extends AbstractPhaseInterceptor<Message> {
|
|||
*/
|
||||
public XACMLInterceptor(XACMLPolicyAdministrator xacmlPolicyAdmin,
|
||||
XACMLPolicyDecisionPoint pdp, RegistryObjectDao registryObjectDao) {
|
||||
super(Phase.PRE_INVOKE);
|
||||
this(Phase.PRE_INVOKE, xacmlPolicyAdmin, pdp, registryObjectDao);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new XACMLInterceptor
|
||||
*
|
||||
* @param phase
|
||||
* The phase in the CXF Interceptor chain that this interceptor
|
||||
* gets executed
|
||||
* @param xacmlPolicyAdmin
|
||||
* The policy admin
|
||||
* @param pdp
|
||||
* The policy decision point
|
||||
* @param registryObjectDao
|
||||
* The registry object data access object
|
||||
*/
|
||||
public XACMLInterceptor(String phase,
|
||||
XACMLPolicyAdministrator xacmlPolicyAdmin,
|
||||
XACMLPolicyDecisionPoint pdp, RegistryObjectDao registryObjectDao) {
|
||||
super(phase);
|
||||
OpenSAMLUtil.initSamlEngine();
|
||||
this.xacmlPolicyAdmin = xacmlPolicyAdmin;
|
||||
this.pdp = pdp;
|
||||
|
@ -283,11 +302,13 @@ public class XACMLInterceptor extends AbstractPhaseInterceptor<Message> {
|
|||
} else if (request instanceof FilterObjectsRequest) {
|
||||
objList = ((FilterObjectsRequest) request).getOriginalObjects();
|
||||
} else if (request instanceof QueryRequest) {
|
||||
if (message.getExchange().getOutMessage() != null) {
|
||||
QueryResponse queryResponse = (QueryResponse) ((SoapMessage) message
|
||||
.getExchange().getOutMessage()).getContent(List.class)
|
||||
.get(0);
|
||||
.getExchange().getOutMessage()).getContent(
|
||||
List.class).get(0);
|
||||
refList = queryResponse.getObjectRefList();
|
||||
objList = queryResponse.getRegistryObjectList();
|
||||
}
|
||||
} else if (request instanceof RemoveObjectsRequest) {
|
||||
refList = ((RemoveObjectsRequest) request).getObjectRefList();
|
||||
} else if (request instanceof SubmitObjectsRequest) {
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<jaxws:inInterceptors>
|
||||
<ref bean="webServiceInInterceptor" />
|
||||
<ref bean="authenticationInterceptor" />
|
||||
<ref bean="xacmlInterceptor" />
|
||||
<ref bean="xacmlQueryInterceptor" />
|
||||
</jaxws:inInterceptors>
|
||||
<jaxws:serviceBean>
|
||||
<ref bean="QueryServiceWrapper" />
|
||||
|
|
Loading…
Add table
Reference in a new issue