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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new a62bc2d2a5b2 CAMEL-25226: camel-fory - add security annotation to 
requireClassRegistration option (#27442)
a62bc2d2a5b2 is described below

commit a62bc2d2a5b22f8eddaa63fb84b477f09c13ac5f
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Oct 7 10:10:49 2026 +0200

    CAMEL-25226: camel-fory - add security annotation to 
requireClassRegistration option (#27442)
---
 .../resources/org/apache/camel/catalog/dataformats/fory.json          | 2 +-
 .../src/generated/resources/org/apache/camel/catalog/models/fory.json | 2 +-
 .../org/apache/camel/catalog/schemas/camelYamlDsl-model.json          | 4 ++--
 .../resources/META-INF/org/apache/camel/component/fory/fory.json      | 2 +-
 .../src/main/java/org/apache/camel/component/fory/ForyDataFormat.java | 1 +
 .../resources/META-INF/org/apache/camel/model/dataformat/fory.json    | 2 +-
 .../main/java/org/apache/camel/model/dataformat/ForyDataFormat.java   | 3 ++-
 .../camel-util/src/main/java/org/apache/camel/util/SecurityUtils.java | 3 +++
 .../src/generated/resources/schema/camelYamlDsl-model.json            | 4 ++--
 9 files changed, 14 insertions(+), 9 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fory.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fory.json
index 30266651eeef..328702815281 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fory.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fory.json
@@ -18,7 +18,7 @@
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": 
"common", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
id of this node" },
     "unmarshalType": { "index": 1, "kind": "attribute", "displayName": 
"Unmarshal Type", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Class of the java type to use when 
unmarshalling" },
-    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "advanced", "label": 
"advanced", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "Whether to require register classes" },
+    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"security": "insecure:serialization", "insecureValue": "false", "defaultValue": 
true, "description": "Whether to require register classes" },
     "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread 
Safe", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to use 
the threadsafe Fory" },
     "allowAutoWiredFory": { "index": 4, "kind": "attribute", "displayName": 
"Allow Auto Wired Fory", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to auto-discover Fory from the registry" }
   }
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fory.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fory.json
index 7f2f53d46fd7..a0749cfc1031 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fory.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fory.json
@@ -15,7 +15,7 @@
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": 
"common", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
id of this node" },
     "unmarshalType": { "index": 1, "kind": "attribute", "displayName": 
"Unmarshal Type", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Class of the java type to use when 
unmarshalling" },
-    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "advanced", "label": 
"advanced", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "Whether to require register classes" },
+    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"security": "insecure:serialization", "insecureValue": "false", "defaultValue": 
true, "description": "Whether to require register classes" },
     "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread 
Safe", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to use 
the threadsafe Fory" },
     "allowAutoWiredFory": { "index": 4, "kind": "attribute", "displayName": 
"Allow Auto Wired Fory", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to auto-discover Fory from the registry" }
   }
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
index 3d446416f7f8..d6fc0c2c1c4c 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json
@@ -11941,8 +11941,8 @@
         "displayName" : "Require Class Registration",
         "kind" : "attribute",
         "index" : 2,
-        "group" : "advanced",
-        "label" : "advanced"
+        "group" : "security",
+        "label" : "security"
       }, {
         "name" : "threadSafe",
         "type" : "boolean",
diff --git 
a/components/camel-fory/src/generated/resources/META-INF/org/apache/camel/component/fory/fory.json
 
b/components/camel-fory/src/generated/resources/META-INF/org/apache/camel/component/fory/fory.json
index 30266651eeef..328702815281 100644
--- 
a/components/camel-fory/src/generated/resources/META-INF/org/apache/camel/component/fory/fory.json
+++ 
b/components/camel-fory/src/generated/resources/META-INF/org/apache/camel/component/fory/fory.json
@@ -18,7 +18,7 @@
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": 
"common", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
id of this node" },
     "unmarshalType": { "index": 1, "kind": "attribute", "displayName": 
"Unmarshal Type", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Class of the java type to use when 
unmarshalling" },
-    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "advanced", "label": 
"advanced", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "Whether to require register classes" },
+    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"security": "insecure:serialization", "insecureValue": "false", "defaultValue": 
true, "description": "Whether to require register classes" },
     "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread 
Safe", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to use 
the threadsafe Fory" },
     "allowAutoWiredFory": { "index": 4, "kind": "attribute", "displayName": 
"Allow Auto Wired Fory", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to auto-discover Fory from the registry" }
   }
diff --git 
a/components/camel-fory/src/main/java/org/apache/camel/component/fory/ForyDataFormat.java
 
b/components/camel-fory/src/main/java/org/apache/camel/component/fory/ForyDataFormat.java
index 701bb273b6e9..89e44762d2fb 100644
--- 
a/components/camel-fory/src/main/java/org/apache/camel/component/fory/ForyDataFormat.java
+++ 
b/components/camel-fory/src/main/java/org/apache/camel/component/fory/ForyDataFormat.java
@@ -42,6 +42,7 @@ public class ForyDataFormat extends ServiceSupport implements 
DataFormat, DataFo
     private CamelContext camelContext;
     private Class<?> unmarshalType;
     private String unmarshalTypeName;
+    @Metadata(label = "security", security = "insecure:serialization", 
insecureValue = "false")
     private boolean requireClassRegistration = true;
     private boolean threadSafe = true;
     private boolean allowAutoWiredFory = true;
diff --git 
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fory.json
 
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fory.json
index 7f2f53d46fd7..a0749cfc1031 100644
--- 
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fory.json
+++ 
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fory.json
@@ -15,7 +15,7 @@
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": 
"common", "required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
id of this node" },
     "unmarshalType": { "index": 1, "kind": "attribute", "displayName": 
"Unmarshal Type", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Class of the java type to use when 
unmarshalling" },
-    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "advanced", "label": 
"advanced", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "Whether to require register classes" },
+    "requireClassRegistration": { "index": 2, "kind": "attribute", 
"displayName": "Require Class Registration", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"security": "insecure:serialization", "insecureValue": "false", "defaultValue": 
true, "description": "Whether to require register classes" },
     "threadSafe": { "index": 3, "kind": "attribute", "displayName": "Thread 
Safe", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to use 
the threadsafe Fory" },
     "allowAutoWiredFory": { "index": 4, "kind": "attribute", "displayName": 
"Allow Auto Wired Fory", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to auto-discover Fory from the registry" }
   }
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ForyDataFormat.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ForyDataFormat.java
index 0396342638ca..e61791caa01e 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ForyDataFormat.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/ForyDataFormat.java
@@ -41,7 +41,8 @@ public class ForyDataFormat extends DataFormatDefinition {
     @Metadata(description = "Class of the java type to use when unmarshalling")
     private String unmarshalTypeName;
     @XmlAttribute
-    @Metadata(label = "advanced", description = "Whether to require register 
classes", defaultValue = "true",
+    @Metadata(label = "security", security = "insecure:serialization", 
insecureValue = "false",
+              description = "Whether to require register classes", 
defaultValue = "true",
               javaType = "java.lang.Boolean")
     private String requireClassRegistration;
     @XmlAttribute
diff --git 
a/core/camel-util/src/main/java/org/apache/camel/util/SecurityUtils.java 
b/core/camel-util/src/main/java/org/apache/camel/util/SecurityUtils.java
index b0a785925b59..7019fd2c1801 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/SecurityUtils.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/SecurityUtils.java
@@ -83,6 +83,7 @@ public final class SecurityUtils {
         map.put("nested", new SecurityOption(INSECURE_DEV, "true"));
         map.put("objectcodecpattern", new 
SecurityOption(INSECURE_SERIALIZATION, ""));
         map.put("objectmessageenabled", new 
SecurityOption(INSECURE_SERIALIZATION, "true"));
+        map.put("requireclassregistration", new 
SecurityOption(INSECURE_SERIALIZATION, VALUE_FALSE));
         map.put("sendenabled", new SecurityOption(INSECURE_DEV, "true"));
         map.put("serializablepackages", new 
SecurityOption(INSECURE_SERIALIZATION, ""));
         map.put("skiptlsverify", new SecurityOption(INSECURE_SSL, "true"));
@@ -183,6 +184,8 @@ public final class SecurityUtils {
                 "component:jms",
                 "component:sjms",
                 "component:sjms2"));
+        owners.put("requireclassregistration", Set.of(
+                "dataformat:fory"));
         owners.put("serializablepackages", Set.of(
                 "component:avro",
                 "dataformat:avro"));
diff --git 
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
 
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
index 3d446416f7f8..d6fc0c2c1c4c 100644
--- 
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
+++ 
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json
@@ -11941,8 +11941,8 @@
         "displayName" : "Require Class Registration",
         "kind" : "attribute",
         "index" : 2,
-        "group" : "advanced",
-        "label" : "advanced"
+        "group" : "security",
+        "label" : "security"
       }, {
         "name" : "threadSafe",
         "type" : "boolean",

Reply via email to