This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 9c503f0afc Fix SFTP test resources crashing in FIPS mode
9c503f0afc is described below
commit 9c503f0afc3494c188fd72f02ff1fae35f1c0a0d
Author: Gaƫlle Fournier <[email protected]>
AuthorDate: Wed Sep 23 22:56:09 2026 +0200
Fix SFTP test resources crashing in FIPS mode
Skip AES-256-CTR private key encryption in FIPS mode where it is
unsupported and use @DisabledIfFipsMode when required.
---
.../apache/camel/quarkus/test/support/sftp/SftpCertificates.java | 5 ++++-
.../apache/camel/quarkus/component/sftp/it/SftpHostCertTest.java | 3 ---
.../java/org/apache/camel/quarkus/component/sftp/it/SftpTest.java | 6 ------
.../apache/camel/quarkus/component/mina/sftp/it/MinaSftpTest.java | 1 +
4 files changed, 5 insertions(+), 10 deletions(-)
diff --git
a/integration-tests-support/sftp/src/main/java/org/apache/camel/quarkus/test/support/sftp/SftpCertificates.java
b/integration-tests-support/sftp/src/main/java/org/apache/camel/quarkus/test/support/sftp/SftpCertificates.java
index acf83bfad2..8bd83ea44b 100644
---
a/integration-tests-support/sftp/src/main/java/org/apache/camel/quarkus/test/support/sftp/SftpCertificates.java
+++
b/integration-tests-support/sftp/src/main/java/org/apache/camel/quarkus/test/support/sftp/SftpCertificates.java
@@ -29,6 +29,7 @@ import java.time.Duration;
import java.time.Instant;
import java.util.Collections;
+import org.apache.camel.quarkus.test.FipsModeUtil;
import org.apache.sshd.certificate.OpenSshCertificateBuilder;
import org.apache.sshd.common.config.keys.OpenSshCertificate;
import
org.apache.sshd.common.config.keys.writer.openssh.OpenSSHKeyEncryptionContext;
@@ -172,7 +173,9 @@ public class SftpCertificates {
LOGGER.debug("Generated ftp SSH key pair");
ftpEncryptedKeyPair = generateRsaKeyPair(2048);
- writeKeyPair(ftpEncryptedKeyPair, ftpEncryptedKeyPath,
ftpEncryptedPubKeyPath, "ftp-encrypted-test", "password");
+ String encryptedKeyPassword = FipsModeUtil.isFipsMode() ? null :
"password";
+ writeKeyPair(ftpEncryptedKeyPair, ftpEncryptedKeyPath,
ftpEncryptedPubKeyPath, "ftp-encrypted-test",
+ encryptedKeyPassword);
LOGGER.debug("Generated ftp-encrypted SSH key pair");
}
diff --git
a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpHostCertTest.java
b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpHostCertTest.java
index 45745414f1..d60935976f 100644
---
a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpHostCertTest.java
+++
b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpHostCertTest.java
@@ -22,7 +22,6 @@ import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.smallrye.certs.Format;
import io.smallrye.certs.junit5.Certificate;
-import org.apache.camel.quarkus.test.DisabledIfFipsMode;
import org.apache.camel.quarkus.test.support.certificate.TestCertificates;
import org.apache.camel.quarkus.test.support.sftp.SftpHostCertTestResource;
import org.junit.jupiter.api.Test;
@@ -39,7 +38,6 @@ import static org.hamcrest.CoreMatchers.is;
class SftpHostCertTest {
@Test
- @DisabledIfFipsMode
public void testHostCertificateVerification() {
RestAssured.given()
.contentType(ContentType.TEXT)
@@ -59,7 +57,6 @@ class SftpHostCertTest {
}
@Test
- @DisabledIfFipsMode
public void testHostCertificateVerificationWithCaSignatureAlgorithms() {
// Test host certificate verification with specific CA signature
algorithms
RestAssured.given()
diff --git
a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTest.java
b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTest.java
index 9d6186e9f7..5795f21bcc 100644
---
a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTest.java
+++
b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTest.java
@@ -22,7 +22,6 @@ import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.smallrye.certs.Format;
import io.smallrye.certs.junit5.Certificate;
-import org.apache.camel.quarkus.test.DisabledIfFipsMode;
import org.apache.camel.quarkus.test.support.certificate.TestCertificates;
import org.apache.camel.quarkus.test.support.sftp.SftpTestResource;
import org.junit.jupiter.api.Test;
@@ -39,7 +38,6 @@ import static org.hamcrest.CoreMatchers.is;
class SftpTest {
@Test
- @DisabledIfFipsMode
public void testSftpComponent() {
// Create a new file on the SFTP server
RestAssured.given()
@@ -83,7 +81,6 @@ class SftpTest {
}
@Test
- @DisabledIfFipsMode
void testCertificateAuthentication() {
RestAssured.given()
.contentType(ContentType.TEXT)
@@ -103,7 +100,6 @@ class SftpTest {
}
@Test
- @DisabledIfFipsMode
void testCertificateAuthenticationWithFile() {
RestAssured.given()
.contentType(ContentType.TEXT)
@@ -123,7 +119,6 @@ class SftpTest {
}
@Test
- @DisabledIfFipsMode
void testCertificateAuthenticationWithBytes() {
RestAssured.given()
.contentType(ContentType.TEXT)
@@ -143,7 +138,6 @@ class SftpTest {
}
@Test
- @DisabledIfFipsMode
void testCertificateAuthenticationWithCaSignatureAlgorithms() {
RestAssured.given()
.contentType(ContentType.TEXT)
diff --git
a/integration-tests/mina-sftp/src/test/java/org/apache/camel/quarkus/component/mina/sftp/it/MinaSftpTest.java
b/integration-tests/mina-sftp/src/test/java/org/apache/camel/quarkus/component/mina/sftp/it/MinaSftpTest.java
index 153f421bae..83e7cd9bd2 100644
---
a/integration-tests/mina-sftp/src/test/java/org/apache/camel/quarkus/component/mina/sftp/it/MinaSftpTest.java
+++
b/integration-tests/mina-sftp/src/test/java/org/apache/camel/quarkus/component/mina/sftp/it/MinaSftpTest.java
@@ -104,6 +104,7 @@ class MinaSftpTest {
}
@Test
+ @DisabledIfFipsMode
void testEncryptedPrivateKeyAuthentication() {
RestAssured.given()
.contentType(ContentType.TEXT)