Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Testing

To test this project, make sure to build it by following our building instructions, then follow the testing instructions.

You can use existing Azure resources for the live tests, or generate new ones by using our New-TestResources.ps1 script, which will use an ARM template that already has all of the the necessary configurations.

The Azure resource that is used by the tests in this project is:

  • An Azure Key Vault. Your Azure Active Directory application needs to be added to the Access Policies of the Key Vault. The steps are provided below.

To run the live tests, you will also need to set the below environment variables:

  • TEST_MODE: Should have live assigned.
  • AZURE_CLIENT_ID: The client ID of an Azure Active Directory application.
  • AZURE_CLIENT_SECRET: The client secret of an Azure Active Directory application.
  • AZURE_TENANT_ID: The Tenant ID of your organization in Azure Active Directory.
  • KEYVAULT_URI: The uri of the KeyVault to use.

The live tests in this project will create, modify and delete certificates inside of the provided Azure Key Vault.

AAD based authentication

The following steps will help you setup the AAD credentials.

Register a new application in AAD

  • Follow Documentation to register a new application in the Azure Active Directory (in the Azure portal).
  • Note down the CLIENT_ID and TENANT_ID.
  • In the "Certificates & Secrets" tab, create a secret and note that down.

Allow your registered application to access your Key Vault

  • In the Azure portal, go to your Azure Key Vault.
  • In the left-side-navbar of your Azure Key Vault in the Azure portal, go to the Access Policies section, then click the + Add Access Policy button.
  • In the Add access policy page, select all the permissions for Keys, Secrets and Certificates.
  • For the Select principal field, click on the None selected. A panel will appear at the right of the window. Search for your Azure Active Directory application, click the application on the search results, then click "Select" at the bottom.
  • Once your application is selected, click the "Add" button.
  • Click the Save button at the top of the Access Policies section of your Key Vault.
  • For more information on securing your Key Vault: Learn more

Impressions