Working with Microsoft Azure Key Vault

VuGen enables you to access Microsoft Azure Key Vault secrets from your Vuser scripts.

VuGen's Azure APIs

Azure Key Vault stores confidential data, such as passwords, certificates, or cryptographic keys, in the form of secrets. VuGen includes API functions you can add to Vuser scripts, to enable access to Key Vault secrets when running the scripts. You can insert these APIs manually into scripts written in the C language.

To run scripts containing VuGen's Azure APIs, the LoadRunner Azure API Service must be installed on each load generator machine that runs the scripts. To replay the scripts in VuGen, install the service on the VuGen machine. For details, see Install the LoadRunner Azure API Service.

There are also JavaScript API functions for use with DevWeb. For details on using Azure Key Vault secrets with DevWeb scripts, see the information in the LoadRunner Developer and DevWeb Help Center.

Back to top

Access Key Vault secrets from Vuser scripts

You use the Azure API functions to access Key Vault secrets from a Vuser script. For details on the Azure API functions for C language scripts, see Azure API Functions in the Function Reference.

Note: For details on the Azure API functions for DevWeb, see the DevWeb JavaScript SDK.

To access a Key Vault secret from a Vuser script:

  1. Insert the lr_azure_set_service_port function into your script to set the service port for the LoadRunner Azure API Service. The default port is 16888.
  2. Insert the lr_azure_ad_client_get_token function into your script and pass the Key Vault authentication credentials to the function. The function saves an authentication token to a specified parameter.
  3. Insert the lr_azure_kv_get_secret function into your script, and pass the Key Vault secret details and the saved authentication token to the function. The function accesses the secret value and saves it to a specified parameter.

Back to top

See also: