You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/12/12 13:09:25 UTC

(camel) branch azure-key-vault-docs created (now da3213a2ca8)

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

acosentino pushed a change to branch azure-key-vault-docs
in repository https://gitbox.apache.org/repos/asf/camel.git


      at da3213a2ca8 CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Security Docs

This branch includes the following new commits:

     new 7d860dcbf67 CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Docs
     new da3213a2ca8 CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Security Docs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/02: CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch azure-key-vault-docs
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7d860dcbf678cc7d1edfec07d5e0af3cfe1d1520
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 12 14:00:29 2023 +0100

    CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/docs/azure-key-vault-component.adoc   | 32 ++++++++++++++++++++++
 .../azure/key/vault/KeyVaultConfiguration.java     |  4 +--
 .../azure/key/vault/KeyVaultEndpoint.java          |  1 -
 3 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/components/camel-azure/camel-azure-key-vault/src/main/docs/azure-key-vault-component.adoc b/components/camel-azure/camel-azure-key-vault/src/main/docs/azure-key-vault-component.adoc
index 1e64b2b4174..7b950138fcf 100644
--- a/components/camel-azure/camel-azure-key-vault/src/main/docs/azure-key-vault-component.adoc
+++ b/components/camel-azure/camel-azure-key-vault/src/main/docs/azure-key-vault-component.adoc
@@ -73,6 +73,22 @@ camel.vault.azure.clientSecret = clientSecret
 camel.vault.azure.vaultName = vaultName
 ----
 
+Or you can enable the usage of Azure Identity in the following way:
+
+[source,bash]
+----
+export $CAMEL_VAULT_AZURE_IDENTITY_ENABLED=true
+export $CAMEL_VAULT_AZURE_VAULT_NAME=vaultName
+----
+
+You can also enable the usage of Azure Identity in the `application.properties` file such as:
+
+[source,properties]
+----
+camel.vault.azure.azureIdentityEnabled = true
+camel.vault.azure.vaultName = vaultName
+----
+
 At this point you'll be able to reference a property in the following way:
 
 [source,xml]
@@ -209,6 +225,22 @@ camel.vault.azure.clientSecret = clientSecret
 camel.vault.azure.vaultName = vaultName
 ----
 
+If you want to use Azure Identity with environment variables, you can do in the following way:
+
+[source,bash]
+----
+export $CAMEL_VAULT_AZURE_IDENTITY_ENABLED=true
+export $CAMEL_VAULT_AZURE_VAULT_NAME=vaultName
+----
+
+You can also enable the usage of Azure Identity in the `application.properties` file such as:
+
+[source,properties]
+----
+camel.vault.azure.azureIdentityEnabled = true
+camel.vault.azure.vaultName = vaultName
+----
+
 To enable the automatic refresh you'll need additional properties to set:
 
 [source,properties]
diff --git a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConfiguration.java b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConfiguration.java
index 2e3fb12b957..0605858194d 100644
--- a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConfiguration.java
+++ b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultConfiguration.java
@@ -23,7 +23,6 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 
-import static org.apache.camel.component.azure.key.vault.CredentialType.AZURE_IDENTITY;
 import static org.apache.camel.component.azure.key.vault.CredentialType.CLIENT_SECRET;
 
 @UriParams
@@ -43,7 +42,7 @@ public class KeyVaultConfiguration implements Cloneable {
     @UriParam(label = "producer")
     private KeyVaultOperation operation = KeyVaultOperation.createSecret;
     @UriParam(label = "common", enums = "CLIENT_SECRET,AZURE_IDENTITY",
-            defaultValue = "CLIENT_SECRET")
+              defaultValue = "CLIENT_SECRET")
     private CredentialType credentialType = CLIENT_SECRET;
 
     /**
@@ -112,7 +111,6 @@ public class KeyVaultConfiguration implements Cloneable {
         this.operation = operation;
     }
 
-
     public CredentialType getCredentialType() {
         return credentialType;
     }
diff --git a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultEndpoint.java b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultEndpoint.java
index 17bdcbca647..e1c6da18ede 100644
--- a/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultEndpoint.java
+++ b/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/KeyVaultEndpoint.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.azure.key.vault;
 
 import com.azure.core.credential.TokenCredential;
-import com.azure.identity.ClientSecretCredential;
 import com.azure.identity.ClientSecretCredentialBuilder;
 import com.azure.identity.DefaultAzureCredentialBuilder;
 import com.azure.security.keyvault.secrets.SecretClient;


(camel) 02/02: CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Security Docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch azure-key-vault-docs
in repository https://gitbox.apache.org/repos/asf/camel.git

commit da3213a2ca8419052d1418ef55459b979d9b8715
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 12 14:02:44 2023 +0100

    CAMEL-20220 - Camel Azure Key Vault: Support Azure Identity in the component and secrets function - Security Docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 docs/user-manual/modules/ROOT/pages/security.adoc | 32 +++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/security.adoc b/docs/user-manual/modules/ROOT/pages/security.adoc
index e749620a357..36f7a26eceb 100644
--- a/docs/user-manual/modules/ROOT/pages/security.adoc
+++ b/docs/user-manual/modules/ROOT/pages/security.adoc
@@ -330,6 +330,22 @@ camel.vault.azure.clientSecret = clientSecret
 camel.vault.azure.vaultName = vaultName
 ----
 
+Or you can enable the usage of Azure Identity in the following way:
+
+[source,bash]
+----
+export $CAMEL_VAULT_AZURE_IDENTITY_ENABLED=true
+export $CAMEL_VAULT_AZURE_VAULT_NAME=vaultName
+----
+
+You can also enable the usage of Azure Identity in the `application.properties` file such as:
+
+[source,properties]
+----
+camel.vault.azure.azureIdentityEnabled = true
+camel.vault.azure.vaultName = vaultName
+----
+
 At this point you'll be able to reference a property in the following way:
 
 [source,xml]
@@ -647,6 +663,22 @@ camel.vault.azure.clientSecret = clientSecret
 camel.vault.azure.vaultName = vaultName
 ----
 
+If you want to use Azure Identity with environment variables, you can do in the following way:
+
+[source,bash]
+----
+export $CAMEL_VAULT_AZURE_IDENTITY_ENABLED=true
+export $CAMEL_VAULT_AZURE_VAULT_NAME=vaultName
+----
+
+You can also enable the usage of Azure Identity in the `application.properties` file such as:
+
+[source,properties]
+----
+camel.vault.azure.azureIdentityEnabled = true
+camel.vault.azure.vaultName = vaultName
+----
+
 To enable the automatic refresh you'll need additional properties to set:
 
 [source,properties]