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-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 1af25d8ddc7 [create-pull-request] automated change (#1542)
1af25d8ddc7 is described below

commit 1af25d8ddc771413b47d122b52cf8e166ca2780a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Oct 23 07:11:19 2025 +0200

    [create-pull-request] automated change (#1542)
    
    Co-authored-by: oscerd <[email protected]>
---
 .../springboot/catalog/dataformats.properties      |   1 +
 .../camel/springboot/catalog/dataformats/pqc.json  |  28 +++++
 .../camel-pqc-starter/src/main/docs/pqc.json       |  68 +++++++++++
 .../springboot/PQCDataFormatAutoConfiguration.java |  78 +++++++++++++
 .../springboot/PQCDataFormatConfiguration.java     | 128 +++++++++++++++++++++
 .../springboot/PQCDataFormatConverter.java         |  66 +++++++++++
 ...rk.boot.autoconfigure.AutoConfiguration.imports |   1 +
 7 files changed, 370 insertions(+)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats.properties
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats.properties
index e6b5f537c0e..cddf8a35bde 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats.properties
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats.properties
@@ -32,6 +32,7 @@ lzf
 mimeMultipart
 parquetAvro
 pgp
+pqc
 protobuf
 protobufJackson
 rss
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/pqc.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/pqc.json
new file mode 100644
index 00000000000..b5c96b7b7cd
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/pqc.json
@@ -0,0 +1,28 @@
+{
+  "dataformat": {
+    "kind": "dataformat",
+    "name": "pqc",
+    "title": "PQC (Post-Quantum Cryptography)",
+    "description": "Encrypt and decrypt messages using Post-Quantum 
Cryptography Key Encapsulation Mechanisms (KEM).",
+    "deprecated": false,
+    "firstVersion": "4.16.0",
+    "label": "dataformat,transformation,security",
+    "javaType": "org.apache.camel.component.pqc.dataformat.PQCDataFormat",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-pqc-starter",
+    "version": "4.16.0-SNAPSHOT",
+    "modelName": "pqc",
+    "modelJavaType": "org.apache.camel.model.dataformat.PQCDataFormat"
+  },
+  "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" },
+    "keyEncapsulationAlgorithm": { "index": 1, "kind": "attribute", 
"displayName": "Key Encapsulation Algorithm", "group": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "MLKEM", "description": 
"The Post-Quantum KEM algorithm to use for key encapsulation. Supported values: 
MLKEM, BIKE, HQC, CMCE, SABER, FRODO, NTRU, NTRULPRime, SNTRUPrime, KYBER" },
+    "symmetricKeyAlgorithm": { "index": 2, "kind": "attribute", "displayName": 
"Symmetric Key Algorithm", "group": "common", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "AES", "description": "The symmetric 
encryption algorithm to use with the shared secret. Supported values: AES, 
ARIA, RC2, RC5, CAMELLIA, CAST5, CAST6, CHACHA7539, etc." },
+    "symmetricKeyLength": { "index": 3, "kind": "attribute", "displayName": 
"Symmetric Key Length", "group": "common", "required": false, "type": 
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 128, "description": "The length (in 
bits) of the symmetric key." },
+    "keyPair": { "index": 4, "kind": "attribute", "displayName": "Key Pair", 
"group": "common", "required": false, "type": "object", "javaType": 
"java.security.KeyPair", "deprecated": false, "autowired": false, "secret": 
false, "description": "Refers to the KeyPair to lookup from the register to use 
for KEM operations." },
+    "bufferSize": { "index": 5, "kind": "attribute", "displayName": "Buffer 
Size", "group": "advanced", "label": "advanced", "required": false, "type": 
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 4096, "description": "The size of the 
buffer used for streaming encryption\/decryption." },
+    "provider": { "index": 6, "kind": "attribute", "displayName": "Provider", 
"group": "advanced", "label": "advanced", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "The JCE security provider to use." },
+    "keyGenerator": { "index": 7, "kind": "attribute", "displayName": "Key 
Generator", "group": "advanced", "label": "advanced", "required": false, 
"type": "object", "javaType": "javax.crypto.KeyGenerator", "deprecated": false, 
"autowired": false, "secret": false, "description": "Refers to a custom 
KeyGenerator to lookup from the register for KEM operations." }
+  }
+}
diff --git a/components-starter/camel-pqc-starter/src/main/docs/pqc.json 
b/components-starter/camel-pqc-starter/src/main/docs/pqc.json
index 502ef659791..cea97cdd4fd 100644
--- a/components-starter/camel-pqc-starter/src/main/docs/pqc.json
+++ b/components-starter/camel-pqc-starter/src/main/docs/pqc.json
@@ -10,6 +10,17 @@
       "type": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties",
       "sourceType": 
"org.apache.camel.component.pqc.springboot.PQCComponentConfiguration",
       "sourceMethod": "getCustomizer()"
+    },
+    {
+      "name": "camel.dataformat.pqc",
+      "type": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration"
+    },
+    {
+      "name": "camel.dataformat.pqc.customizer",
+      "type": 
"org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon$CustomizerProperties",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration",
+      "sourceMethod": "getCustomizer()"
     }
   ],
   "properties": [
@@ -131,6 +142,63 @@
       "description": "The required length of the symmetric key used",
       "sourceType": 
"org.apache.camel.component.pqc.springboot.PQCComponentConfiguration",
       "defaultValue": 128
+    },
+    {
+      "name": "camel.dataformat.pqc.buffer-size",
+      "type": "java.lang.Integer",
+      "description": "The size of the buffer used for streaming 
encryption\/decryption.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration",
+      "defaultValue": 4096
+    },
+    {
+      "name": "camel.dataformat.pqc.customizer.enabled",
+      "type": "java.lang.Boolean",
+      "sourceType": 
"org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon$CustomizerProperties"
+    },
+    {
+      "name": "camel.dataformat.pqc.enabled",
+      "type": "java.lang.Boolean",
+      "description": "Whether to enable auto configuration of the pqc data 
format. This is enabled by default.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration"
+    },
+    {
+      "name": "camel.dataformat.pqc.key-encapsulation-algorithm",
+      "type": "java.lang.String",
+      "description": "The Post-Quantum KEM algorithm to use for key 
encapsulation. Supported values: MLKEM, BIKE, HQC, CMCE, SABER, FRODO, NTRU, 
NTRULPRime, SNTRUPrime, KYBER",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration",
+      "defaultValue": "MLKEM"
+    },
+    {
+      "name": "camel.dataformat.pqc.key-generator",
+      "type": "java.lang.String",
+      "description": "Refers to a custom KeyGenerator to lookup from the 
register for KEM operations. The option is a javax.crypto.KeyGenerator type.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration"
+    },
+    {
+      "name": "camel.dataformat.pqc.key-pair",
+      "type": "java.lang.String",
+      "description": "Refers to the KeyPair to lookup from the register to use 
for KEM operations. The option is a java.security.KeyPair type.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration"
+    },
+    {
+      "name": "camel.dataformat.pqc.provider",
+      "type": "java.lang.String",
+      "description": "The JCE security provider to use.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration"
+    },
+    {
+      "name": "camel.dataformat.pqc.symmetric-key-algorithm",
+      "type": "java.lang.String",
+      "description": "The symmetric encryption algorithm to use with the 
shared secret. Supported values: AES, ARIA, RC2, RC5, CAMELLIA, CAST5, CAST6, 
CHACHA7539, etc.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration",
+      "defaultValue": "AES"
+    },
+    {
+      "name": "camel.dataformat.pqc.symmetric-key-length",
+      "type": "java.lang.Integer",
+      "description": "The length (in bits) of the symmetric key.",
+      "sourceType": 
"org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatConfiguration",
+      "defaultValue": 128
     }
   ],
   "hints": [],
diff --git 
a/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatAutoConfiguration.java
 
b/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatAutoConfiguration.java
new file mode 100644
index 00000000000..b643fc55585
--- /dev/null
+++ 
b/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatAutoConfiguration.java
@@ -0,0 +1,78 @@
+/*
+ * 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.component.pqc.dataformat.springboot;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.pqc.dataformat.PQCDataFormat;
+import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.DataFormatConfigurationProperties;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import 
org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
+import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.convert.ApplicationConversionService;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
+@EnableConfigurationProperties({DataFormatConfigurationProperties.class,PQCDataFormatConfiguration.class})
+@ConditionalOnHierarchicalProperties({"camel.dataformat", 
"camel.dataformat.pqc"})
+public class PQCDataFormatAutoConfiguration {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+    private final CamelContext camelContext;
+    @Autowired
+    private PQCDataFormatConfiguration configuration;
+
+    public PQCDataFormatAutoConfiguration(
+            org.apache.camel.CamelContext camelContext) {
+        this.camelContext = camelContext;
+    }
+
+    @Lazy
+    @Bean
+    public DataFormatCustomizer configurePQCDataFormatFactory() {
+        return new DataFormatCustomizer() {
+            @Override
+            public void configure(String name, DataFormat target) {
+                CamelPropertiesHelper.copyProperties(camelContext, 
configuration, target);
+            }
+            @Override
+            public boolean isEnabled(String name, DataFormat target) {
+                return HierarchicalPropertiesEvaluator.evaluate(
+                        applicationContext,
+                        "camel.dataformat.customizer",
+                        "camel.dataformat.pqc.customizer")
+                    && target instanceof PQCDataFormat;
+            }
+        };
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatConfiguration.java
 
b/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatConfiguration.java
new file mode 100644
index 00000000000..ce49b955c97
--- /dev/null
+++ 
b/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatConfiguration.java
@@ -0,0 +1,128 @@
+/*
+ * 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.component.pqc.dataformat.springboot;
+
+import org.apache.camel.spring.boot.DataFormatConfigurationPropertiesCommon;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * Encrypt and decrypt messages using Post-Quantum Cryptography Key
+ * Encapsulation Mechanisms (KEM).
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.dataformat.pqc")
+public class PQCDataFormatConfiguration
+        extends
+            DataFormatConfigurationPropertiesCommon {
+
+    /**
+     * Whether to enable auto configuration of the pqc data format. This is
+     * enabled by default.
+     */
+    private Boolean enabled;
+    /**
+     * The Post-Quantum KEM algorithm to use for key encapsulation. Supported
+     * values: MLKEM, BIKE, HQC, CMCE, SABER, FRODO, NTRU, NTRULPRime,
+     * SNTRUPrime, KYBER
+     */
+    private String keyEncapsulationAlgorithm = "MLKEM";
+    /**
+     * The symmetric encryption algorithm to use with the shared secret.
+     * Supported values: AES, ARIA, RC2, RC5, CAMELLIA, CAST5, CAST6,
+     * CHACHA7539, etc.
+     */
+    private String symmetricKeyAlgorithm = "AES";
+    /**
+     * The length (in bits) of the symmetric key.
+     */
+    private Integer symmetricKeyLength = 128;
+    /**
+     * Refers to the KeyPair to lookup from the register to use for KEM
+     * operations. The option is a java.security.KeyPair type.
+     */
+    private String keyPair;
+    /**
+     * The size of the buffer used for streaming encryption/decryption.
+     */
+    private Integer bufferSize = 4096;
+    /**
+     * The JCE security provider to use.
+     */
+    private String provider;
+    /**
+     * Refers to a custom KeyGenerator to lookup from the register for KEM
+     * operations. The option is a javax.crypto.KeyGenerator type.
+     */
+    private String keyGenerator;
+
+    public String getKeyEncapsulationAlgorithm() {
+        return keyEncapsulationAlgorithm;
+    }
+
+    public void setKeyEncapsulationAlgorithm(String keyEncapsulationAlgorithm) 
{
+        this.keyEncapsulationAlgorithm = keyEncapsulationAlgorithm;
+    }
+
+    public String getSymmetricKeyAlgorithm() {
+        return symmetricKeyAlgorithm;
+    }
+
+    public void setSymmetricKeyAlgorithm(String symmetricKeyAlgorithm) {
+        this.symmetricKeyAlgorithm = symmetricKeyAlgorithm;
+    }
+
+    public Integer getSymmetricKeyLength() {
+        return symmetricKeyLength;
+    }
+
+    public void setSymmetricKeyLength(Integer symmetricKeyLength) {
+        this.symmetricKeyLength = symmetricKeyLength;
+    }
+
+    public String getKeyPair() {
+        return keyPair;
+    }
+
+    public void setKeyPair(String keyPair) {
+        this.keyPair = keyPair;
+    }
+
+    public Integer getBufferSize() {
+        return bufferSize;
+    }
+
+    public void setBufferSize(Integer bufferSize) {
+        this.bufferSize = bufferSize;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public String getKeyGenerator() {
+        return keyGenerator;
+    }
+
+    public void setKeyGenerator(String keyGenerator) {
+        this.keyGenerator = keyGenerator;
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatConverter.java
 
b/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatConverter.java
new file mode 100644
index 00000000000..d5dbac8dcfc
--- /dev/null
+++ 
b/components-starter/camel-pqc-starter/src/main/java/org/apache/camel/component/pqc/dataformat/springboot/PQCDataFormatConverter.java
@@ -0,0 +1,66 @@
+/*
+ * 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.component.pqc.dataformat.springboot;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.apache.camel.CamelContext;
+import org.springframework.beans.factory.annotation.Autowired;
+import 
org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.TypeDescriptor;
+import org.springframework.core.convert.converter.GenericConverter;
+import org.springframework.stereotype.Component;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@ConfigurationPropertiesBinding
+@Component
+public class PQCDataFormatConverter implements GenericConverter {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    public Set<ConvertiblePair> getConvertibleTypes() {
+        Set<ConvertiblePair> answer = new LinkedHashSet<>();
+        answer.add(new ConvertiblePair(String.class, 
java.security.KeyPair.class));
+        answer.add(new ConvertiblePair(String.class, 
javax.crypto.KeyGenerator.class));
+        return answer;
+    }
+
+    public Object convert(
+            Object source,
+            TypeDescriptor sourceType,
+            TypeDescriptor targetType) {
+        if (source == null) {
+            return null;
+        }
+        String ref = source.toString();
+        if (!ref.startsWith("#")) {
+            return null;
+        }
+        ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
+        switch (targetType.getName()) {
+            case "java.security.KeyPair": return 
applicationContext.getBean(ref, java.security.KeyPair.class);
+            case "javax.crypto.KeyGenerator": return 
applicationContext.getBean(ref, javax.crypto.KeyGenerator.class);
+        }
+        return null;
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-pqc-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
 
b/components-starter/camel-pqc-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index f0ad090e431..b6da2261945 100644
--- 
a/components-starter/camel-pqc-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ 
b/components-starter/camel-pqc-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -17,3 +17,4 @@
 
 org.apache.camel.component.pqc.springboot.PQCComponentConverter
 org.apache.camel.component.pqc.springboot.PQCComponentAutoConfiguration
+org.apache.camel.component.pqc.dataformat.springboot.PQCDataFormatAutoConfiguration

Reply via email to