This is an automated email from the ASF dual-hosted git repository.
acosentino 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 78ef9ff7f779 CAMEL-22596 - camel-pqc - Add enum values for better
tooling (#19693)
78ef9ff7f779 is described below
commit 78ef9ff7f7795417a7f164fd4379106b5bdcebd1
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Oct 24 15:12:11 2025 +0200
CAMEL-22596 - camel-pqc - Add enum values for better tooling (#19693)
Signed-off-by: Andrea Cosentino <[email protected]>
---
.../resources/org/apache/camel/catalog/dataformats/pqc.json | 4 ++--
.../generated/resources/org/apache/camel/catalog/models/pqc.json | 4 ++--
.../META-INF/org/apache/camel/component/pqc/dataformat/pqc.json | 4 ++--
.../META-INF/org/apache/camel/model/dataformat/pqc.json | 4 ++--
.../java/org/apache/camel/model/dataformat/PQCDataFormat.java | 9 +++++----
.../apache/camel/dsl/yaml/deserializers/ModelDeserializers.java | 4 ++--
.../src/generated/resources/schema/camelYamlDsl.json | 6 ++++--
7 files changed, 19 insertions(+), 16 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pqc.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pqc.json
index a71ec91a6542..7f9b9b2d930a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pqc.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pqc.json
@@ -17,8 +17,8 @@
},
"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." },
+ "keyEncapsulationAlgorithm": { "index": 1, "kind": "attribute",
"displayName": "Key Encapsulation Algorithm", "group": "common", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "MLKEM",
"BIKE", "HQC", "CMCE", "SABER", "FRODO", "NTRU", "NTRULPRime", "SNTRUPrime",
"KYBER" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "MLKEM", "description": "The Post-Quantum KEM algorithm to use
for key encapsulation. Supported values: MLKEM, [...]
+ "symmetricKeyAlgorithm": { "index": 2, "kind": "attribute", "displayName":
"Symmetric Key Algorithm", "group": "common", "required": false, "type":
"enum", "javaType": "java.lang.String", "enum": [ "AES", "ARIA", "RC2", "RC5",
"CAMELLIA", "CAST5", "CAST6", "CHACHA7539", "DSTU7624", "GOST28147",
"GOST3412_2015", "GRAIN128", "HC128", "HC256", "SALSA20", "SEED", "SM4",
"DESEDE" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "AES", "description": "The symmet [...]
"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." },
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pqc.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pqc.json
index c228ea88aaf6..13cdd5ea22c5 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pqc.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pqc.json
@@ -14,8 +14,8 @@
},
"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." },
+ "keyEncapsulationAlgorithm": { "index": 1, "kind": "attribute",
"displayName": "Key Encapsulation Algorithm", "group": "common", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "MLKEM",
"BIKE", "HQC", "CMCE", "SABER", "FRODO", "NTRU", "NTRULPRime", "SNTRUPrime",
"KYBER" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "MLKEM", "description": "The Post-Quantum KEM algorithm to use
for key encapsulation. Supported values: MLKEM, [...]
+ "symmetricKeyAlgorithm": { "index": 2, "kind": "attribute", "displayName":
"Symmetric Key Algorithm", "group": "common", "required": false, "type":
"enum", "javaType": "java.lang.String", "enum": [ "AES", "ARIA", "RC2", "RC5",
"CAMELLIA", "CAST5", "CAST6", "CHACHA7539", "DSTU7624", "GOST28147",
"GOST3412_2015", "GRAIN128", "HC128", "HC256", "SALSA20", "SEED", "SM4",
"DESEDE" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "AES", "description": "The symmet [...]
"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." },
diff --git
a/components/camel-pqc/src/generated/resources/META-INF/org/apache/camel/component/pqc/dataformat/pqc.json
b/components/camel-pqc/src/generated/resources/META-INF/org/apache/camel/component/pqc/dataformat/pqc.json
index a71ec91a6542..7f9b9b2d930a 100644
---
a/components/camel-pqc/src/generated/resources/META-INF/org/apache/camel/component/pqc/dataformat/pqc.json
+++
b/components/camel-pqc/src/generated/resources/META-INF/org/apache/camel/component/pqc/dataformat/pqc.json
@@ -17,8 +17,8 @@
},
"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." },
+ "keyEncapsulationAlgorithm": { "index": 1, "kind": "attribute",
"displayName": "Key Encapsulation Algorithm", "group": "common", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "MLKEM",
"BIKE", "HQC", "CMCE", "SABER", "FRODO", "NTRU", "NTRULPRime", "SNTRUPrime",
"KYBER" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "MLKEM", "description": "The Post-Quantum KEM algorithm to use
for key encapsulation. Supported values: MLKEM, [...]
+ "symmetricKeyAlgorithm": { "index": 2, "kind": "attribute", "displayName":
"Symmetric Key Algorithm", "group": "common", "required": false, "type":
"enum", "javaType": "java.lang.String", "enum": [ "AES", "ARIA", "RC2", "RC5",
"CAMELLIA", "CAST5", "CAST6", "CHACHA7539", "DSTU7624", "GOST28147",
"GOST3412_2015", "GRAIN128", "HC128", "HC256", "SALSA20", "SEED", "SM4",
"DESEDE" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "AES", "description": "The symmet [...]
"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." },
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pqc.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pqc.json
index c228ea88aaf6..13cdd5ea22c5 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pqc.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pqc.json
@@ -14,8 +14,8 @@
},
"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." },
+ "keyEncapsulationAlgorithm": { "index": 1, "kind": "attribute",
"displayName": "Key Encapsulation Algorithm", "group": "common", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "MLKEM",
"BIKE", "HQC", "CMCE", "SABER", "FRODO", "NTRU", "NTRULPRime", "SNTRUPrime",
"KYBER" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "MLKEM", "description": "The Post-Quantum KEM algorithm to use
for key encapsulation. Supported values: MLKEM, [...]
+ "symmetricKeyAlgorithm": { "index": 2, "kind": "attribute", "displayName":
"Symmetric Key Algorithm", "group": "common", "required": false, "type":
"enum", "javaType": "java.lang.String", "enum": [ "AES", "ARIA", "RC2", "RC5",
"CAMELLIA", "CAST5", "CAST6", "CHACHA7539", "DSTU7624", "GOST28147",
"GOST3412_2015", "GRAIN128", "HC128", "HC256", "SALSA20", "SEED", "SM4",
"DESEDE" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "AES", "description": "The symmet [...]
"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." },
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PQCDataFormat.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PQCDataFormat.java
index 9a61a455644b..c00118ff88f1 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PQCDataFormat.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PQCDataFormat.java
@@ -35,11 +35,12 @@ import org.apache.camel.spi.Metadata;
public class PQCDataFormat extends DataFormatDefinition {
@XmlAttribute
- @Metadata(defaultValue = "MLKEM")
- private String keyEncapsulationAlgorithm = "MLKEM";
+ @Metadata(defaultValue = "MLKEM", enums =
"MLKEM,BIKE,HQC,CMCE,SABER,FRODO,NTRU,NTRULPRime,SNTRUPrime,KYBER")
+ private String keyEncapsulationAlgorithm;
@XmlAttribute
- @Metadata(defaultValue = "AES")
- private String symmetricKeyAlgorithm = "AES";
+ @Metadata(defaultValue = "AES",
+ enums =
"AES,ARIA,RC2,RC5,CAMELLIA,CAST5,CAST6,CHACHA7539,DSTU7624,GOST28147,GOST3412_2015,GRAIN128,HC128,HC256,SALSA20,SEED,SM4,DESEDE")
+ private String symmetricKeyAlgorithm;
@XmlAttribute
@Metadata(javaType = "java.lang.Integer", defaultValue = "128")
private String symmetricKeyLength;
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index eb772dabb0ae..c66fb3523c52 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -11750,11 +11750,11 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
properties = {
@YamlProperty(name = "bufferSize", type = "number",
defaultValue = "4096", description = "The size of the buffer used for streaming
encryption/decryption.", displayName = "Buffer Size"),
@YamlProperty(name = "id", type = "string", description =
"The id of this node", displayName = "Id"),
- @YamlProperty(name = "keyEncapsulationAlgorithm", type =
"string", 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", displayName = "Key Encapsulation
Algorithm"),
+ @YamlProperty(name = "keyEncapsulationAlgorithm", type =
"enum:MLKEM,BIKE,HQC,CMCE,SABER,FRODO,NTRU,NTRULPRime,SNTRUPrime,KYBER",
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", displayName = "Key Encapsulation
Algorithm"),
@YamlProperty(name = "keyGenerator", type = "string",
description = "Refers to a custom KeyGenerator to lookup from the register for
KEM operations.", displayName = "Key Generator"),
@YamlProperty(name = "keyPair", type = "string",
description = "Refers to the KeyPair to lookup from the register to use for KEM
operations.", displayName = "Key Pair"),
@YamlProperty(name = "provider", type = "string",
description = "The JCE security provider to use.", displayName = "Provider"),
- @YamlProperty(name = "symmetricKeyAlgorithm", type =
"string", defaultValue = "AES", description = "The symmetric encryption
algorithm to use with the shared secret. Supported values: AES, ARIA, RC2, RC5,
CAMELLIA, CAST5, CAST6, CHACHA7539, etc.", displayName = "Symmetric Key
Algorithm"),
+ @YamlProperty(name = "symmetricKeyAlgorithm", type =
"enum:AES,ARIA,RC2,RC5,CAMELLIA,CAST5,CAST6,CHACHA7539,DSTU7624,GOST28147,GOST3412_2015,GRAIN128,HC128,HC256,SALSA20,SEED,SM4,DESEDE",
defaultValue = "AES", description = "The symmetric encryption algorithm to use
with the shared secret. Supported values: AES, ARIA, RC2, RC5, CAMELLIA, CAST5,
CAST6, CHACHA7539, etc.", displayName = "Symmetric Key Algorithm"),
@YamlProperty(name = "symmetricKeyLength", type =
"number", defaultValue = "128", description = "The length (in bits) of the
symmetric key.", displayName = "Symmetric Key Length")
}
)
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index ce45777b94f0..478a2443b819 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -12431,7 +12431,8 @@
"type" : "string",
"title" : "Key Encapsulation Algorithm",
"description" : "The Post-Quantum KEM algorithm to use for key
encapsulation. Supported values: MLKEM, BIKE, HQC, CMCE, SABER, FRODO, NTRU,
NTRULPRime, SNTRUPrime, KYBER",
- "default" : "MLKEM"
+ "default" : "MLKEM",
+ "enum" : [ "MLKEM", "BIKE", "HQC", "CMCE", "SABER", "FRODO",
"NTRU", "NTRULPRime", "SNTRUPrime", "KYBER" ]
},
"keyGenerator" : {
"type" : "string",
@@ -12452,7 +12453,8 @@
"type" : "string",
"title" : "Symmetric Key Algorithm",
"description" : "The symmetric encryption algorithm to use with
the shared secret. Supported values: AES, ARIA, RC2, RC5, CAMELLIA, CAST5,
CAST6, CHACHA7539, etc.",
- "default" : "AES"
+ "default" : "AES",
+ "enum" : [ "AES", "ARIA", "RC2", "RC5", "CAMELLIA", "CAST5",
"CAST6", "CHACHA7539", "DSTU7624", "GOST28147", "GOST3412_2015", "GRAIN128",
"HC128", "HC256", "SALSA20", "SEED", "SM4", "DESEDE" ]
},
"symmetricKeyLength" : {
"type" : "number",