Get Key Vault Secret Custom API
This custom API allows you to retrieve a secret or a certificate from a keyvault.
Feature Overview
This custom API allows you to retrieve a secret or a certificate from a keyvault.
Assumptions
- You know and understand how to make Custom API calls
- You have configured access to your keyvault
Dependencies
The following are dependencies for this feature:
- App Service connection with appropriate rights
Design Details
The plugin uses a feature that Microsoft intends to make GA in Nov 2024. Check the status of this feature before using it in production.
The feature allows a plugin to get a security token for a managed identity, configured for the plugin. This token alllows the plugin to access Azure Resources that has been configured to give access to the managed identity.
Security Considerations
Only a system admin or the elevated service account can execute this custom API.
The App Registration needs to be given access to the keyvault.
The Managed Identity needs to be configured with the App Registration Details.
This uses the same Managed Identity record as the SQL custom API, and therefore the same App Registration details need to be configured for both API's if you are using both.
Configuration
Install the klevr utilities and klevr utilities code solutions in your environment.
Configure an App Service Registration in Azure, if you have not already. Follow the configuration instructions in the "Execute SQL Custom API" article to configure the federated credential on the app service registration for your environment.
Grant access to the keyvault for the App Service Registration in Azure.
You are now ready to execute the API. Simply pass the the keyvault secret or certificate URL as an input parameter. The result is a JSON encoded string containing the result from KeyVault.
Last updated on