You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2025/04/24 10:40:23 UTC
(camel-quarkus) 02/03: Fixes #7286: aws2-s3 tests fail on FIPS
This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch 3.20.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 14875a165de1ea7eb0d92f8c8df7075a66b40071
Author: Jiri Ondrusek <on...@gmail.com>
AuthorDate: Tue Apr 22 13:55:41 2025 +0200
Fixes #7286: aws2-s3 tests fail on FIPS
---
.../org/apache/camel/quarkus/component/aws2/s3/it/Aws2S3Test.java | 5 +++--
.../org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/s3/it/Aws2S3Test.java b/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/s3/it/Aws2S3Test.java
index 248e5e769d..67a83d37c4 100644
--- a/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/s3/it/Aws2S3Test.java
+++ b/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/s3/it/Aws2S3Test.java
@@ -20,6 +20,7 @@ import java.net.URI;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
+import java.util.Random;
import java.util.UUID;
import java.util.stream.Stream;
@@ -195,8 +196,8 @@ class Aws2S3Test extends BaseAWs2TestSupport {
@Test
public void upload() throws Exception {
final String oid = UUID.randomUUID().toString();
- final String content = RandomStringUtils.randomAlphabetic(8 * 1024 * 1024);
-
+ //pseudo random data are fine -> if secureRandom is used in FIPS -> sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DEVICE_ERROR
+ final String content = RandomStringUtils.random(8 * 1024 * 1024, 0, 0, true, true, null, new Random());
try {
RestAssured.given()
.contentType(ContentType.TEXT)
diff --git a/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java b/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
index 10abd9e2c9..b7d929a66d 100644
--- a/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
+++ b/integration-tests-support/aws2/src/test/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
@@ -89,6 +89,8 @@ public final class Aws2TestResource implements QuarkusTestResourceLifecycleManag
.withServices(services);
localstack.withEnv("LS_LOG", localstackLogLevel);
localstack.withEnv("PROVIDER_OVERRIDE_CLOUDWATCH", "v1");
+ localstack.withEnv("AWS_ACCESS_KEY_ID", "testAccessKeyId"); //has to be longer then `test`, to work on FIPS systems
+ localstack.withEnv("AWS_SECRET_ACCESS_KEY", "testSecretKeyId");
localstack.withLogConsumer(new Slf4jLogConsumer(LOG));
localstack.start();