This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch wss4j_2.3.0
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/wss4j_2.3.0 by this push:
new c58d059 Set the SOAP namespace on the streaming policy validation code
c58d059 is described below
commit c58d059255bc6101ea20304adeaabcacb2872df5
Author: Colm O hEigeartaigh <[email protected]>
AuthorDate: Fri Feb 1 16:34:02 2019 +0000
Set the SOAP namespace on the streaming policy validation code
---
.../apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java | 2 ++
.../cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
index f9c8bd2..356a1fd 100644
---
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
+++
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java
@@ -171,6 +171,8 @@ public abstract class AbstractWSS4JStaxInterceptor
implements SoapInterceptor,
boolean validateSchemas =
MessageUtils.getContextualBoolean(msg,
"schema-validation-enabled", false);
securityProperties.setDisableSchemaValidation(!validateSchemas);
+
+
securityProperties.setSoap12(WSSConstants.NS_SOAP12.equals(msg.getVersion().getNamespace()));
}
private Collection<Pattern> convertCertConstraints(String certConstraints)
{
diff --git
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
index 9144df3..c80503f 100644
---
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
+++
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
@@ -55,6 +55,7 @@ import org.apache.wss4j.policy.model.AlgorithmSuite;
import org.apache.wss4j.policy.stax.OperationPolicy;
import org.apache.wss4j.policy.stax.enforcer.PolicyEnforcer;
import org.apache.wss4j.policy.stax.enforcer.PolicyInputProcessor;
+import org.apache.wss4j.stax.ext.WSSConstants;
import org.apache.wss4j.stax.ext.WSSSecurityProperties;
import org.apache.wss4j.stax.impl.securityToken.HttpsSecurityTokenImpl;
import org.apache.wss4j.stax.securityEvent.HttpsTokenSecurityEvent;
@@ -424,7 +425,6 @@ public class PolicyBasedWSS4JStaxInInterceptor extends
WSS4JStaxInInterceptor {
if (soapAction == null) {
soapAction = "";
}
-
String actor =
(String)msg.getContextualProperty(SecurityConstants.ACTOR);
final Collection<org.apache.cxf.message.Attachment> attachments =
msg.getAttachments();
int attachmentCount = 0;
@@ -433,7 +433,8 @@ public class PolicyBasedWSS4JStaxInInterceptor extends
WSS4JStaxInInterceptor {
}
return new PolicyEnforcer(operationPolicies, soapAction,
isRequestor(msg),
actor, attachmentCount,
- new
WSS4JPolicyAsserter(msg.get(AssertionInfoMap.class)));
+ new
WSS4JPolicyAsserter(msg.get(AssertionInfoMap.class)),
+
WSSConstants.NS_SOAP12.equals(msg.getVersion().getNamespace()));
}
}