In this article, we will walk you through the necessary steps to configure and set up Azure Secrets for use with Data Collector.
Firstly, We have to create the secret on the Azure portal which we will be using in the pipeline. In this article, I am going to store the mysql username and password in secrets.
The pre-requisite is to install the package Azure Key Vault Credentials Store on the Data collector and then update the following properties in credential-stores.properties file.
- credentialStores=azure
- credentialStore.azure.config.vault.url=https://<YOUR_KEY_VAULT>.vault.azure.net/
- credentialStore.azure.config.client.id=<MUST BE SET>
- credentialStore.azure.config.client.key=<MUST BE SET>
This is how you can create the secret and add the values to it:-
Once done, restart the data collector and add the following EL expression in the pipeline to fetch the username and password.
Username => ${credential:get("azure", "all@all", "SQLusername")}
Password => ${credential:get("azure", "all@all", "SQLpassword")}
For more details you can follow the following documents: