This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch 3.40.x in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 44ceef6f9fed73d7db7244a623bcc4d0291ff8b2 Author: jiriOndrusek-agent <[email protected]> AuthorDate: Wed Oct 14 06:57:27 2026 +0000 Fixes #9333. Use RSA 1.5 key wrap in WS-SecurityPolicy server tests on FIPS With -Dfips.enabled=true, CXF's CustomAlgorithmSuite defaults to RSA-OAEP key wrap, which the Red Hat FIPS JDK does not provide. Set the key wrap to RSA 1.5 on the test clients and the server endpoints. Co-Authored-By: Claude Opus 5.5 <[email protected]> --- .../server/cxf/way/it/WssSecurityPolicyHelloServiceCxfWayImpl.java | 3 ++- .../securitypolicy/server/it/WssSecurityPolicyHelloServiceImpl.java | 3 ++- .../server/cxf/way/it/CxfWssSecurityPolicyServerCxfWayTest.java | 2 ++ .../soap/securitypolicy/server/it/CxfWssSecurityPolicyServerTest.java | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/WssSecurityPolicyHelloServiceCxfWayImpl.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/WssSecurityPolicyHelloServiceCxfWayImpl.java index 2213ba0ca0..5234321ef9 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/WssSecurityPolicyHelloServiceCxfWayImpl.java +++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/WssSecurityPolicyHelloServiceCxfWayImpl.java @@ -30,7 +30,8 @@ import org.apache.cxf.annotations.Policy; @EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"), @EndpointProperty(key = "ws-security.signature.username", value = "bob"), @EndpointProperty(key = "ws-security.encryption.username", value = "alice"), - @EndpointProperty(key = "ws-security.callback-handler", value = "org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.it.PasswordCallbackHandler") + @EndpointProperty(key = "ws-security.callback-handler", value = "org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.it.PasswordCallbackHandler"), + @EndpointProperty(key = "ws-security.custom.alg.suite.asymmetric.key.encryption.algorithm", value = "http://www.w3.org/2001/04/xmlenc#rsa-1_5") }) public class WssSecurityPolicyHelloServiceCxfWayImpl implements WssSecurityPolicyHelloServiceCxfWay { diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/WssSecurityPolicyHelloServiceImpl.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/WssSecurityPolicyHelloServiceImpl.java index 9f741e554e..debf85613c 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/WssSecurityPolicyHelloServiceImpl.java +++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/WssSecurityPolicyHelloServiceImpl.java @@ -28,7 +28,8 @@ import org.apache.cxf.annotations.Policy; @EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"), @EndpointProperty(key = "ws-security.signature.username", value = "bob"), @EndpointProperty(key = "ws-security.encryption.username", value = "alice"), - @EndpointProperty(key = "ws-security.callback-handler", value = "org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.it.PasswordCallbackHandler") + @EndpointProperty(key = "ws-security.callback-handler", value = "org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.it.PasswordCallbackHandler"), + @EndpointProperty(key = "ws-security.custom.alg.suite.asymmetric.key.encryption.algorithm", value = "http://www.w3.org/2001/04/xmlenc#rsa-1_5") }) public class WssSecurityPolicyHelloServiceImpl implements WssSecurityPolicyHelloService { diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/CxfWssSecurityPolicyServerCxfWayTest.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/CxfWssSecurityPolicyServerCxfWayTest.java index 81571e53c3..fe5d89c344 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/CxfWssSecurityPolicyServerCxfWayTest.java +++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/cxf/way/it/CxfWssSecurityPolicyServerCxfWayTest.java @@ -49,6 +49,8 @@ public class CxfWssSecurityPolicyServerCxfWayTest { ctx.put(SecurityConstants.ENCRYPT_USERNAME, "bob"); ctx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("alice.properties")); + ctx.put(SecurityConstants.CUSTOM_ALG_SUITE_ASYMMETRIC_KEY_ENCRYPTION_ALGORITHM, + "http://www.w3.org/2001/04/xmlenc#rsa-1_5"); Assertions.assertThat(client.sayHello("foo")).isEqualTo("SecurityPolicy hello foo CXF way"); } diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/CxfWssSecurityPolicyServerTest.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/CxfWssSecurityPolicyServerTest.java index c32b4cf37d..931c33e3e9 100644 --- a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/CxfWssSecurityPolicyServerTest.java +++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/securitypolicy/server/it/CxfWssSecurityPolicyServerTest.java @@ -48,6 +48,8 @@ public class CxfWssSecurityPolicyServerTest { ctx.put(SecurityConstants.ENCRYPT_USERNAME, "bob"); ctx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("alice.properties")); + ctx.put(SecurityConstants.CUSTOM_ALG_SUITE_ASYMMETRIC_KEY_ENCRYPTION_ALGORITHM, + "http://www.w3.org/2001/04/xmlenc#rsa-1_5"); Assertions.assertThat(client.sayHello("foo")).isEqualTo("Secure good morning foo"); }
