2.1.x
Upgrading and Migrating Azure Key Vault Properties Provider to Version 2.2
Upgrade Azure Key Vault Properties Provider to version 2.2.0.
Changes in This Release
This release contains the following changes:
-
Azure Key Vault Properties Provider now supports multiple key vault configurations in the same Mule app. Each configuration connects to a different key vault, and you reference secrets by using the configuration name as a namespace, in the format
${azure-key-vault-properties-provider::configName::secret::yourSecret}. -
The legacy secret format
${azure-key-vault-properties-provider::secret::yourSecret}is now supported only when the Mule app contains a single properties provider configuration.
|
If your existing configuration has multiple configs defined and references secrets through the legacy |
Upgrade Prerequisites
To perform the upgrade:
-
Create a backup of your files, data, and configurations in case you need to restore to them.
Upgrade Steps
Follow these steps to perform the upgrade:
-
In Anypoint Studio, create a Mule project.
-
In Mule Palette, click Search in Exchange.
-
In Add Dependencies to Project, enter
azure key vault properties providerin the search field. -
In Available modules, select Azure Key Vault Properties Provider and click Add.
-
Click Finish.
-
Verify that the Azure Key Vault Properties Provider
mule4-azure-key-vault-properties-providerversion is 2.2.0 in thepom.xmlfile in the Mule project.
Verify the Upgrade
After you install the latest version of the properties provider, verify the upgrade:
-
In Studio, verify that there are no errors in the Problems or Console views.
-
Verify that there are no problems in the project
pom.xmlfile. -
Test the connection to verify that the operations work.
-
Ensure that the
Key Vault Nameis correctly configured for each configuration, either through thekeyVaultNameattribute or the system propertyMULE_AZURE_KEY_VAULT_NAME. If your Mule app uses multiple key vault configurations that must connect to different vaults, set thekeyVaultNameattribute explicitly on each configuration, because configurations that omitkeyVaultNameall fall back to the same system property value and therefore resolve to the same vault. -
If using environment variables for
tenantId,clientId, andclientSecret, ensure these are set correctly and verify their usage.
Update Configuration Files
If your project configuration files (XML) reference secrets through the legacy ${azure-key-vault-properties-provider::secret::yourSecret} format and your Mule app uses multiple key vault configurations, update the secret references to use the configuration name as a namespace:
-
Before upgrading:
<azure-key-vault-properties-provider:config name="Azure_Key_Vault_Properties_Provider_Config" keyVaultName="connectors-vault"/> <set-variable variableName="dbPassword" value="${azure-key-vault-properties-provider::secret::mulesoft-test-password}"/> -
After upgrading:
<azure-key-vault-properties-provider:config name="Azure_Key_Vault_Properties_Provider_Config" keyVaultName="connectors-vault"/> <set-variable variableName="dbPassword" value="${azure-key-vault-properties-provider::configName::secret::yourSecret}"/>
If your Mule app uses a single configuration, the legacy secret format continues to work and no changes are required.
If your project configuration files (XML) specify multiple Key Vault configurations, update them as follows:
-
If a configuration must resolve to the vault defined by the system property
MULE_AZURE_KEY_VAULT_NAME, you can remove thekeyVaultNameattribute from that configuration. Note that all configurations that omitkeyVaultNamefall back to the same system property value and therefore resolve to the same vault, so set thekeyVaultNameattribute explicitly on each configuration that must connect to a different vault. -
Ensure that
tenantId,clientId, andclientSecretare correctly set, either as attributes in the configuration file or as environment variables (AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID).
Example Configuration
If you prefer to use environment variables, your configuration looks like this:
<azure-key-vault-properties-provider:config name="Azure_Key_Vault_Properties_Provider_Config" />
Alternatively, use the attributes directly in the configuration:
<azure-key-vault-properties-provider:config name="Azure_Key_Vault_Properties_Provider_Config"
keyVaultName="connectors-vault"
tenantId="your-tenant-id"
clientId="your-client-id"
clientSecret="your-client-secret"/>
Revert the Upgrade
If you need to revert to the previous version of Azure Key Vault Properties Provider, follow these steps:
-
Go to Anypoint Studio.
-
In the project’s
pom.xmlfile, change themule4-azure-key-vault-properties-providerdependency version from 2.2.0 to the previous version.
After reverting, you must review and adapt your configurations to be compatible with the previous version:
Revert to Version 2.1.x:
If you use multiple key vault configurations or reference secrets through the ${azure-key-vault-properties-provider::configName::secret::yourSecret} format, revert your secret references to the legacy ${azure-key-vault-properties-provider::secret::yourSecret} format, because versions earlier than 2.2.0 do not support configuration-name namespacing. These versions support only a single key vault configuration.
Revert to Version 2.0.0:
Ensure that the keyVaultName attribute is explicitly set in your configuration files, as version 2.0.0 does not support the system property MULE_AZURE_KEY_VAULT_NAME.
Example Configuration for Version 2.0.0:
<azure-key-vault-properties-provider:config name="Azure_Key_Vault_Properties_Provider_Config"
keyVaultName="connectors-vault"
tenantId=""
clientId=""
clientSecret=""/>
Revert to a Major Previous Version (e.g., 1.0.1):
Ensure that the keyVaultName, tenantId, clientId, and clientSecret attributes are explicitly set in your configuration files, as these versions do not support setting these values through system properties or environment variables.
Example Configuration for Version 1.0.1:
<azure-key-vault-properties-provider:config name="Azure_Key_Vault_Properties_Provider_Config"
keyVaultName="connectors-vault"
tenantId="your-tenant-id"
clientId="your-client-id"
clientSecret="your-client-secret"/>



