Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to connect and access Azure Key Vault in Talend

Hi,
I have a scenario where my passwords are stored in Azure Key Vault and I have to access the key vault and get the values from Talend. Is there any java code which helps me to access the secret key from Talend by connecting to Azure Key vault or any routine which can be helpful.
Please reply to this post with appropriate solutions if any.

Note : I have the client id and client key available. The ask is how do we use them to connect from Talend and get the values from Key vault
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi @TRF ,@nikhilthampi,

 

May I know if there is any possible solution for my requirement?

 

Thanks,

Kiran Kumar

Anonymous
Not applicable
Author

Hi @TRF ,@nikhilthampi,

 

May I know if there is any possible solution for my requirement?

 

Thanks,

Kiran Kumar

Viswa560
Contributor
Contributor

Hi Kiran,

 

Did you got to find any Azure key vault, I am using Talend 7.3.1 real time bigdata version.

 

Kindly let me know how to take the key values from azure key vault.

Thanks,

Viswa

HPeddireddy1672171879
Contributor
Contributor

Try below script as a routine and pass the secret into JDBC connection

import com.azure.identity.DefaultAzureCredentialBuilder;

import com.azure.security.keyvault.secrets.SecretClient;

import com.azure.security.keyvault.secrets.SecretClientBuilder;

import com.azure.security.keyvault.secrets.models.KeyVaultSecret;

 

public class KeyVaultExample {

  public static void main(String[] args) {

    SecretClient secretClient = new SecretClientBuilder()

        .vaultUrl("https://your-keyvault-name.vault.azure.net/")

        .credential(new DefaultAzureCredentialBuilder().build())

        .buildClient();

 

    KeyVaultSecret secret = secretClient.getSecret("your-secret-name");

    String secretValue = secret.getValue();

 

    System.out.printf("Retrieved secret '%s' with value '%s'\n", secret.getName(), secretValue);

  }

}

 

HPeddireddy1672171879
Contributor
Contributor

Another way to connect Azure key vaults

 

Below are the steps required. The steps 1. and 2. are the ones to get secret id, client app id and tenant id for the API call (authorization call to get token).

 

  1. Register the application in Azure Active Directory (Azure AD), which maps an application object to a service principal. 
  2. Add that service principal to the access policies of the Azure Key Vault. 
  3. Request an access token by calling a REST API in Talend using a tRestClient component. 
  4. Call the Key Vault API to retrieve secrets, using that access token for authentication. 
  5. Retrieve the secret name and secret values and load then into the Talend Job using a tContextLoad component.