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 703c31fac6 Fixes #9222. Use TLS for the MySQL Testcontainers readiness 
check on FIPS
703c31fac6 is described below

commit 703c31fac6bd6ebd18ff092d627e166d9aaae7c9
Author: Jiří Ondrušek <[email protected]>
AuthorDate: Wed Sep 23 22:55:08 2026 +0200

    Fixes #9222. Use TLS for the MySQL Testcontainers readiness check on FIPS
    
    On a FIPS JVM the Testcontainers MySQL readiness probe (useSSL=false,
    allowPublicKeyRetrieval=true) fails with "Cannot find any provider
    supporting RSA/ECB/OAEPWithSHA-1AndMGF1Padding", so the container is
    never reported as started.
    
    - quartz-clustered: new `fips` Maven profile sets
      quarkus.datasource.devservices.properties.useSSL=true for surefire
      and failsafe
    - Debezium MySQL test resource: withUrlParam("useSSL", "true") when the
      JVM runs in FIPS mode
    
    Over TLS the password is sent inside the channel and no RSA-OAEP step
    is needed. Regular (non-FIPS) runs are unchanged.
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
---
 .../common/it/mysql/DebeziumMysqlTestResource.java | 11 +++++++-
 integration-tests/quartz-clustered/pom.xml         | 31 ++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git 
a/integration-test-groups/debezium/mysql/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTestResource.java
 
b/integration-test-groups/debezium/mysql/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTestResource.java
index 0f3310e008..2606edf671 100644
--- 
a/integration-test-groups/debezium/mysql/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTestResource.java
+++ 
b/integration-test-groups/debezium/mysql/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTestResource.java
@@ -23,6 +23,7 @@ import java.nio.file.Path;
 import java.util.Collections;
 import java.util.Map;
 
+import org.apache.camel.quarkus.test.FipsModeUtil;
 import 
org.apache.camel.quarkus.test.support.debezium.AbstractDebeziumTestResource;
 import org.apache.camel.quarkus.test.support.debezium.Type;
 import org.eclipse.microprofile.config.ConfigProvider;
@@ -53,12 +54,20 @@ public class DebeziumMysqlTestResource extends 
AbstractDebeziumTestResource<MySQ
         // This generally means that you are trying to use an image that 
Testcontainers has not been designed to use.
         DockerImageName mySqlImage = 
DockerImageName.parse(MYSQL_IMAGE).asCompatibleSubstituteFor("mysql");
 
-        return new MySQLContainer(mySqlImage)
+        MySQLContainer container = new MySQLContainer(mySqlImage)
                 .withUsername(DB_USERNAME)
                 .withPassword(DB_PASSWORD)
                 .withDatabaseName(DB_NAME)
                 .withLogConsumer(new Slf4jLogConsumer(log))
                 .withInitScript("initMysql.sql");
+
+        if (FipsModeUtil.isFipsMode()) {
+            // TLS for the Testcontainers readiness check and init script. 
Without TLS Connector/J needs RSA-OAEP with
+            // SHA-1, which FIPS JVMs do not provide.
+            container.withUrlParam("useSSL", "true");
+        }
+
+        return container;
     }
 
     @Override
diff --git a/integration-tests/quartz-clustered/pom.xml 
b/integration-tests/quartz-clustered/pom.xml
index f4c2d10d48..86db78150f 100644
--- a/integration-tests/quartz-clustered/pom.xml
+++ b/integration-tests/quartz-clustered/pom.xml
@@ -201,6 +201,37 @@
                 <skipTests>true</skipTests>
             </properties>
         </profile>
+        <profile>
+            <id>fips</id>
+            <activation>
+                <property>
+                    <name>fips</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <systemPropertyVariables>
+                                <!-- TLS for the MySQL dev service readiness 
check. Without TLS Connector/J needs RSA-OAEP with SHA-1, which FIPS JVMs do 
not provide. -->
+                                
<quarkus.datasource.devservices.properties.useSSL>true</quarkus.datasource.devservices.properties.useSSL>
+                            </systemPropertyVariables>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <configuration>
+                            <systemPropertyVariables>
+                                
<quarkus.datasource.devservices.properties.useSSL>true</quarkus.datasource.devservices.properties.useSSL>
+                            </systemPropertyVariables>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>

Reply via email to