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 0822f5753f3b camel-azure-key-vault: two header javaTypes are wrong,
one of them naming a class that does not exist (#29963)
0822f5753f3b is described below
commit 0822f5753f3b65b7d2cf6b635a4a3fa845c40108
Author: dhairya05 <[email protected]>
AuthorDate: Sun Nov 15 01:07:11 2026 +0530
camel-azure-key-vault: two header javaTypes are wrong, one of them naming a
class that does not exist (#29963)
…ming a class that does not exist
CamelAzureKeyVaultProducerOperation is documented as
KeyVaultOperationDefinition. No such class exists in the component or
anywhere in the tree - the enum is KeyVaultOperation, which is what the
producer reads the header as and what the operation endpoint option is
typed as. The name reached the generated catalog and the endpoint DSL,
where it sits in an {@link}-style {@code} reference that resolves to
nothing.
CamelAzureKeyVaultSecretProperties is documented as String, but
updateSecretProperties reads it as the Azure SecretProperties model:
final SecretProperties secretProperties
=
exchange.getMessage().getHeader(KeyVaultConstants.SECRET_PROPERTIES,
SecretProperties.class);
if (ObjectHelper.isEmpty(secretProperties)) {
throw new IllegalArgumentException(MISSING_SECRET_PROPERTIES);
}
There is no String to SecretProperties converter, so following the
documented type gives null from getHeader and the operation fails with
"secret properties must be specified" although they were. The component's
own bodyTypes description already says the operation "takes the
SecretProperties from the CamelAzureKeyVaultSecretProperties header".
Declare the types the producer actually reads.
---
.../org/apache/camel/catalog/components/azure-key-vault.json | 4 ++--
.../org/apache/camel/component/azure/key/vault/azure-key-vault.json | 4 ++--
.../apache/camel/component/azure/key/vault/KeyVaultConstants.java | 4 ++--
.../camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java | 5 +++--
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
index a02dcaba454a..be8c3c354f99 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
@@ -29,9 +29,9 @@
"autowiredEnabled": { "index": 1, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
},
"headers": {
- "CamelAzureKeyVaultProducerOperation": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType":
"org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition",
"deprecated": false, "autowired": false, "secret": false, "description":
"Overrides the desired operation to be used in the producer.", "constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#OPERATION" },
+ "CamelAzureKeyVaultProducerOperation": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperation",
"enum": [ "createSecret", "getSecret", "updateSecretProperties",
"deleteSecret", "purgeDeletedSecret" ], "deprecated": false, "autowired":
false, "secret": false, "description": "Overrides the desired operation to be
used in the producer.", "constantName": "org [...]
"CamelAzureKeyVaultSecretName": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The secret name to be used in Key Vault", "constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#SECRET_NAME" },
- "CamelAzureKeyVaultSecretProperties": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The secret properties to be used in Key Vault for updating a
secret", "constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#SECRET_PROPERTIES"
}
+ "CamelAzureKeyVaultSecretProperties": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.security.keyvault.secrets.models.SecretProperties",
"deprecated": false, "autowired": false, "secret": false, "description": "The
secret properties to be used in Key Vault for updating a secret",
"constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#SECRET_PROPERTIES"
}
},
"bodyTypes": {
"producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map",
"list", "pojo" ], "byOption": [ { "option": "operation", "value": "getSecret",
"carriers": [ "any" ] }, { "option": "operation", "value":
"updateSecretProperties", "carriers": [ "any" ] }, { "option": "operation",
"value": "deleteSecret", "carriers": [ "any" ] }, { "option": "operation",
"value": "purgeDeletedSecret", "carriers": [ "any" ] } ], "description": "The
value of the secret for createSecret, the default [...]
diff --git
a/components/camel-azure/camel-azure-key-vault/src/generated/resources/META-INF/org/apache/camel/component/azure/key/vault/azure-key-vault.json
b/components/camel-azure/camel-azure-key-vault/src/generated/resources/META-INF/org/apache/camel/component/azure/key/vault/azure-key-vault.json
index a02dcaba454a..be8c3c354f99 100644
---
a/components/camel-azure/camel-azure-key-vault/src/generated/resources/META-INF/org/apache/camel/component/azure/key/vault/azure-key-vault.json
+++
b/components/camel-azure/camel-azure-key-vault/src/generated/resources/META-INF/org/apache/camel/component/azure/key/vault/azure-key-vault.json
@@ -29,9 +29,9 @@
"autowiredEnabled": { "index": 1, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
},
"headers": {
- "CamelAzureKeyVaultProducerOperation": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType":
"org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition",
"deprecated": false, "autowired": false, "secret": false, "description":
"Overrides the desired operation to be used in the producer.", "constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#OPERATION" },
+ "CamelAzureKeyVaultProducerOperation": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperation",
"enum": [ "createSecret", "getSecret", "updateSecretProperties",
"deleteSecret", "purgeDeletedSecret" ], "deprecated": false, "autowired":
false, "secret": false, "description": "Overrides the desired operation to be
used in the producer.", "constantName": "org [...]
"CamelAzureKeyVaultSecretName": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The secret name to be used in Key Vault", "constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#SECRET_NAME" },
- "CamelAzureKeyVaultSecretProperties": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The secret properties to be used in Key Vault for updating a
secret", "constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#SECRET_PROPERTIES"
}
+ "CamelAzureKeyVaultSecretProperties": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "com.azure.security.keyvault.secrets.models.SecretProperties",
"deprecated": false, "autowired": false, "secret": false, "description": "The
secret properties to be used in Key Vault for updating a secret",
"constantName":
"org.apache.camel.component.azure.key.vault.KeyVaultConstants#SECRET_PROPERTIES"
}
},
"bodyTypes": {
"producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map",
"list", "pojo" ], "byOption": [ { "option": "operation", "value": "getSecret",
"carriers": [ "any" ] }, { "option": "operation", "value":
"updateSecretProperties", "carriers": [ "any" ] }, { "option": "operation",
"value": "deleteSecret", "carriers": [ "any" ] }, { "option": "operation",
"value": "purgeDeletedSecret", "carriers": [ "any" ] } ], "description": "The
value of the secret for createSecret, the default [...]
diff --git
a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
index 5cccf1f02716..d27d5c5a3dc5 100644
---
a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
+++
b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConstants.java
@@ -23,14 +23,14 @@ public final class KeyVaultConstants {
// headers set by the producer only
@Metadata(label = "producer", description = "Overrides the desired
operation to be used in the producer.",
- javaType =
"org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition")
+ javaType =
"org.apache.camel.component.azure.key.vault.KeyVaultOperation")
public static final String OPERATION = HEADER_PREFIX + "ProducerOperation";
// headers set by the producer only
@Metadata(label = "producer", description = "The secret name to be used in
Key Vault",
javaType = "String")
public static final String SECRET_NAME = HEADER_PREFIX + "SecretName";
@Metadata(label = "producer", description = "The secret properties to be
used in Key Vault for updating a secret",
- javaType = "String")
+ javaType =
"com.azure.security.keyvault.secrets.models.SecretProperties")
public static final String SECRET_PROPERTIES = HEADER_PREFIX +
"SecretProperties";
private KeyVaultConstants() {
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
index d0a62e6267d1..7c9aec8b806c 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
@@ -310,7 +310,7 @@ public interface KeyVaultEndpointBuilderFactory {
* Overrides the desired operation to be used in the producer.
*
* The option is a: {@code
- *
org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition} type.
+ * org.apache.camel.component.azure.key.vault.KeyVaultOperation} type.
*
* Group: producer
*
@@ -335,7 +335,8 @@ public interface KeyVaultEndpointBuilderFactory {
/**
* The secret properties to be used in Key Vault for updating a secret.
*
- * The option is a: {@code String} type.
+ * The option is a: {@code
+ * com.azure.security.keyvault.secrets.models.SecretProperties} type.
*
* Group: producer
*