This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 3.33.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/3.33.x by this push:
new 779f7eebe3 Use RSA 1.5 key wrap in the programmatic STS tests on FIPS
779f7eebe3 is described below
commit 779f7eebe366cf99d889fcf70d0b3c9739abbc52
Author: Jiří Ondrušek <[email protected]>
AuthorDate: Fri Oct 23 08:32:47 2026 +0200
Use RSA 1.5 key wrap in the programmatic STS 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 programmatic STS client and service
proxy, and on the STS and both service endpoints of the WS-Trust tests.
Related to #9333
Co-authored-by: jiriOndrusek-agent <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../component/cxf/soap/it/ws/trust/server/WsTrustServerRoutes.java | 2 ++
.../soap/it/ws/trust/server/cxf/way/TrustHelloServiceCxfWayImpl.java | 3 ++-
.../camel/quarkus/component/cxf/soap/it/ws/trust/sts/SampleSTS.java | 3 ++-
.../camel/quarkus/component/cxf/soap/it/ws/trust/CxfWsTrustTest.java | 4 ++++
.../component/cxf/soap/it/ws/trust/cxf/way/CxfWsTrustCxfWayTest.java | 4 ++++
5 files changed, 14 insertions(+), 2 deletions(-)
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/WsTrustServerRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/WsTrustServerRoutes.java
index a9fc23ce53..60adca2c77 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/WsTrustServerRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/WsTrustServerRoutes.java
@@ -68,6 +68,8 @@ public class WsTrustServerRoutes extends RouteBuilder {
props.put("ws-security.encryption.properties",
"serviceKeystore.properties");
props.put("ws-security.callback-handler",
"org.apache.camel.quarkus.component.cxf.soap.it.ws.trust.server.ServerCallbackHandler");
+
props.put("ws-security.custom.alg.suite.asymmetric.key.encryption.algorithm",
+ "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
result.setProperties(props);
return result;
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/cxf/way/TrustHelloServiceCxfWayImpl.java
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/cxf/way/TrustHelloServiceCxfWayImpl.java
index 73ee31fb3c..63bc9ffa31 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/cxf/way/TrustHelloServiceCxfWayImpl.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/server/cxf/way/TrustHelloServiceCxfWayImpl.java
@@ -28,7 +28,8 @@ import org.apache.cxf.annotations.EndpointProperty;
@EndpointProperty(key = "ws-security.signature.username", value =
"myservicekey"),
@EndpointProperty(key = "ws-security.signature.properties", value =
"serviceKeystore.properties"),
@EndpointProperty(key = "ws-security.encryption.properties", value =
"serviceKeystore.properties"),
- @EndpointProperty(key = "ws-security.callback-handler", value =
"org.apache.camel.quarkus.component.cxf.soap.it.ws.trust.server.ServerCallbackHandler")
+ @EndpointProperty(key = "ws-security.callback-handler", value =
"org.apache.camel.quarkus.component.cxf.soap.it.ws.trust.server.ServerCallbackHandler"),
+ @EndpointProperty(key =
"ws-security.custom.alg.suite.asymmetric.key.encryption.algorithm", value =
"http://www.w3.org/2001/04/xmlenc#rsa-1_5")
})
public class TrustHelloServiceCxfWayImpl implements TrustHelloServiceCxfWay {
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/sts/SampleSTS.java
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/sts/SampleSTS.java
index 7401e07e34..257a06b349 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/sts/SampleSTS.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/sts/SampleSTS.java
@@ -42,7 +42,8 @@ import org.eclipse.microprofile.config.ConfigProvider;
@EndpointProperty(key = "ws-security.signature.username", value =
"mystskey"),
@EndpointProperty(key = "ws-security.signature.properties", value =
"stsKeystore.properties"),
@EndpointProperty(key = "ws-security.callback-handler", value =
"org.apache.camel.quarkus.component.cxf.soap.it.ws.trust.sts.StsCallbackHandler"),
- @EndpointProperty(key = "ws-security.validate.token", value = "false")
+ @EndpointProperty(key = "ws-security.validate.token", value = "false"),
+ @EndpointProperty(key =
"ws-security.custom.alg.suite.asymmetric.key.encryption.algorithm", value =
"http://www.w3.org/2001/04/xmlenc#rsa-1_5")
})
public class SampleSTS extends SecurityTokenServiceProvider {
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/CxfWsTrustTest.java
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/CxfWsTrustTest.java
index c031af97ec..7809ef2de3 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/CxfWsTrustTest.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/CxfWsTrustTest.java
@@ -141,6 +141,8 @@ public class CxfWsTrustTest {
Thread.currentThread().getContextClassLoader().getResource("clientKeystore.properties"));
ctx.put(SecurityConstants.SIGNATURE_USERNAME, "myclientkey");
ctx.put(SecurityConstants.ENCRYPT_USERNAME, "myservicekey");
+
ctx.put(SecurityConstants.CUSTOM_ALG_SUITE_ASYMMETRIC_KEY_ENCRYPTION_ALGORITHM,
+ "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
}
/**
@@ -173,6 +175,8 @@ public class CxfWsTrustTest {
props.put(SecurityConstants.STS_TOKEN_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("clientKeystore.properties"));
props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
+
props.put(SecurityConstants.CUSTOM_ALG_SUITE_ASYMMETRIC_KEY_ENCRYPTION_ALGORITHM,
+ "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
return stsClient;
}
}
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/cxf/way/CxfWsTrustCxfWayTest.java
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/cxf/way/CxfWsTrustCxfWayTest.java
index 18403d41c7..4c4ee5920c 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/cxf/way/CxfWsTrustCxfWayTest.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-ws-trust/src/test/java/org/apache/camel/quarkus/component/cxf/soap/it/ws/trust/cxf/way/CxfWsTrustCxfWayTest.java
@@ -131,6 +131,8 @@ public class CxfWsTrustCxfWayTest {
Thread.currentThread().getContextClassLoader().getResource("clientKeystore.properties"));
ctx.put(SecurityConstants.SIGNATURE_USERNAME, "myclientkey");
ctx.put(SecurityConstants.ENCRYPT_USERNAME, "myservicekey");
+
ctx.put(SecurityConstants.CUSTOM_ALG_SUITE_ASYMMETRIC_KEY_ENCRYPTION_ALGORITHM,
+ "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
}
/**
@@ -163,6 +165,8 @@ public class CxfWsTrustCxfWayTest {
props.put(SecurityConstants.STS_TOKEN_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("clientKeystore.properties"));
props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
+
props.put(SecurityConstants.CUSTOM_ALG_SUITE_ASYMMETRIC_KEY_ENCRYPTION_ALGORITHM,
+ "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
return stsClient;
}
}