This is an automated email from the ASF dual-hosted git repository.

Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new b369de50ba0 Fix Camel-Spring-Boot Daily #376 test failures
b369de50ba0 is described below

commit b369de50ba0b0ab5e81f88ea0a88ff055ea19ec6
Author: croway <[email protected]>
AuthorDate: Fri Oct 2 13:14:42 2026 +0200

    Fix Camel-Spring-Boot Daily #376 test failures
    
    - CamelSecurityPolicyAutoConfigurationTest: since CAMEL-25134 the security
      policy check only matches a component option against the security options
      that component declares. camel-http does not declare trustAllCertificates
      and camel-netty does not declare allowJavaSerializedObject, so those
      properties are no longer reported. Use options the components do declare
      (aws2-s3 trustAllCertificates, netty transferExchange), also in the
      allowed-properties docs example.
    - CamelCatalogIT: add the missing CamelOpenfgaIT for the new
      camel-openfga-starter (CAMEL-25185).
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../src/main/docs/spring-boot.adoc                 |  2 +-
 .../CamelSecurityPolicyAutoConfigurationTest.java  | 24 +++++++++----------
 .../camel/itest/springboot/CamelOpenfgaIT.java     | 28 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.adoc 
b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
index 63ad5d27530..b52750d95f3 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -532,7 +532,7 @@ To exclude specific properties from all checks, use 
`allowed-properties`:
 
 [source,properties]
 ----
-camel.security.allowed-properties=camel.component.http.trustAllCertificates,camel.component.netty.allowJavaSerializedObject
+camel.security.allowed-properties=camel.component.aws2-s3.trustAllCertificates,camel.component.netty.transferExchange
 ----
 
 === Per-Environment Policies with Spring Profiles
diff --git 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSecurityPolicyAutoConfigurationTest.java
 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSecurityPolicyAutoConfigurationTest.java
index 6d50f9f4012..527833ec697 100644
--- 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSecurityPolicyAutoConfigurationTest.java
+++ 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSecurityPolicyAutoConfigurationTest.java
@@ -45,7 +45,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
 
     @Test
     public void policyAllowShouldIgnoreInsecureConfig() {
-        runner.withPropertyValues("camel.security.policy=allow", 
"camel.component.http.trustAllCertificates=true")
+        runner.withPropertyValues("camel.security.policy=allow", 
"camel.component.aws2-s3.trustAllCertificates=true")
                 .run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
@@ -55,7 +55,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
 
     @Test
     public void policyWarnShouldStartWithViolations() {
-        runner.withPropertyValues("camel.security.policy=warn", 
"camel.component.http.trustAllCertificates=true")
+        runner.withPropertyValues("camel.security.policy=warn", 
"camel.component.aws2-s3.trustAllCertificates=true")
                 .run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
@@ -67,7 +67,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
 
     @Test
     public void policyFailShouldPreventStartup() {
-        runner.withPropertyValues("camel.security.policy=fail", 
"camel.component.http.trustAllCertificates=true")
+        runner.withPropertyValues("camel.security.policy=fail", 
"camel.component.aws2-s3.trustAllCertificates=true")
                 .run(context -> {
                     assertThat(context).hasFailed();
                     
assertThat(context.getStartupFailure()).rootCause().isInstanceOf(RuntimeCamelException.class)
@@ -78,7 +78,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
     @Test
     public void categoryOverrideShouldTakePrecedence() {
         runner.withPropertyValues("camel.security.policy=fail", 
"camel.security.insecure-ssl-policy=allow",
-                "camel.component.http.trustAllCertificates=true").run(context 
-> {
+                
"camel.component.aws2-s3.trustAllCertificates=true").run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
                     assertThat(result.hasViolations()).isFalse();
@@ -88,7 +88,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
     @Test
     public void categoryOverrideWarnWhileGlobalFail() {
         runner.withPropertyValues("camel.security.policy=fail", 
"camel.security.insecure-ssl-policy=warn",
-                "camel.component.http.trustAllCertificates=true").run(context 
-> {
+                
"camel.component.aws2-s3.trustAllCertificates=true").run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
                     assertThat(result.hasViolations()).isTrue();
@@ -99,8 +99,8 @@ public class CamelSecurityPolicyAutoConfigurationTest {
     @Test
     public void allowedPropertiesShouldExcludeFromChecks() {
         runner.withPropertyValues("camel.security.policy=fail",
-                
"camel.security.allowed-properties=camel.component.http.trustAllCertificates",
-                "camel.component.http.trustAllCertificates=true").run(context 
-> {
+                
"camel.security.allowed-properties=camel.component.aws2-s3.trustAllCertificates",
+                
"camel.component.aws2-s3.trustAllCertificates=true").run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
                     assertThat(result.hasViolations()).isFalse();
@@ -109,8 +109,8 @@ public class CamelSecurityPolicyAutoConfigurationTest {
 
     @Test
     public void multipleViolationsDetected() {
-        runner.withPropertyValues("camel.security.policy=warn", 
"camel.component.http.trustAllCertificates=true",
-                
"camel.component.netty.allowJavaSerializedObject=true").run(context -> {
+        runner.withPropertyValues("camel.security.policy=warn", 
"camel.component.aws2-s3.trustAllCertificates=true",
+                "camel.component.netty.transferExchange=true").run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
                     
assertThat(result.getViolationCount()).isGreaterThanOrEqualTo(2);
@@ -128,7 +128,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
     @Test
     public void insecureSerializationPolicyOverride() {
         runner.withPropertyValues("camel.security.policy=fail", 
"camel.security.insecure-serialization-policy=warn",
-                
"camel.component.netty.allowJavaSerializedObject=true").run(context -> {
+                "camel.component.netty.transferExchange=true").run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
                     assertThat(result.hasViolations()).isTrue();
@@ -137,7 +137,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
 
 
     /**
-     * The same option configured as an environment variable arrives as 
CAMEL_COMPONENT_HTTP_TRUSTALLCERTIFICATES,
+     * The same option configured as an environment variable arrives as 
CAMEL_COMPONENT_AWS2S3_TRUSTALLCERTIFICATES,
      * which never matched the "camel." prefix - so every option set through 
the environment, the usual way to
      * configure a containerised application, escaped the policy check 
entirely.
      */
@@ -146,7 +146,7 @@ public class CamelSecurityPolicyAutoConfigurationTest {
         runner.withPropertyValues("camel.security.policy=warn")
                 .withInitializer(ctx -> 
ctx.getEnvironment().getPropertySources()
                         .addFirst(new 
SystemEnvironmentPropertySource("testSystemEnvironment",
-                                
Map.of("CAMEL_COMPONENT_HTTP_TRUSTALLCERTIFICATES", "true"))))
+                                
Map.of("CAMEL_COMPONENT_AWS2S3_TRUSTALLCERTIFICATES", "true"))))
                 .run(context -> {
                     assertThat(context).hasNotFailed();
                     SecurityPolicyResult result = 
context.getBean(SecurityPolicyResult.class);
diff --git 
a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelOpenfgaIT.java
 
b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelOpenfgaIT.java
new file mode 100644
index 00000000000..2ed11a34532
--- /dev/null
+++ 
b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelOpenfgaIT.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.springboot;
+
+import 
org.apache.camel.itest.springboot.common.AbstractSpringBootBaseTestSupport;
+import org.junit.jupiter.api.Test;
+
+public class CamelOpenfgaIT extends AbstractSpringBootBaseTestSupport {
+
+    @Test
+    void componentTest() {
+        assertComponent(inferComponentName(getClass()));
+    }
+}

Reply via email to