Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open the Microsoft Azure Portal.

  2. In the search box, type Key Vault.

  3. Click Key Vaults in the results list.

    Image RemovedImage Added

  4. Click EgisKeyVault to open the eGIS key vault. EgisKeyVault is in the TC-Script-ArcGIS-RG resource group in the TC-Sandbox subscription.

    Image RemovedImage Added

  5. Underneath Settings, click Secrets.

    Image RemovedImage Added

  6. In the list of secrets, click the name of the secret that you want to retrieve.

    Image RemovedImage Added

  7. Underneath Current Version, click the instance of the secret.

    Image RemovedImage Added

  8. Click Show Secret Value to reveal the secret value. Alternatively, clickthe Copy icon to copy the secret’s value to the clipboard.

    Image RemovedImage Added

Create a Secret using Azure Portal

  1. Follow steps 1 through 5 above to open the Secrets blade of EgisKeyVault.

  2. Click Generate/Import.

    Image RemovedImage Added

  3. Specify a Name and Value for the new secret.

  4. Click Create.

    Image RemovedImage Added

The new secret is created in the key vault.

Retrieve a Secret in a DevOps Pipeline

In some cases, it may be necessary to retrieve a secret, such as a password, from within an Azure DevOps pipeline.

Add the Secret to the Pipeline Library

In eGIS DevOps, a library for eGIS passwords has been created. It allows tasks within Azure DevOps pipelines to use secrets from EgisKeyVault.

  1. In Azure DevOps portal, expand the Pipelines menu, then click Library.

    Image Added

  2. Click the EGIS passwords variable group.

    Image Added

  3. In the list of variables, check if the secret that you want to retrieve is already present. If not, click Add.

    Image Added

  4. Check the boxes next to the names of the secrets that you wish to retrieve, then click OK.

    Image Added

  5. Click Save.

    Image Added

  6. In your release pipeline, click the Variables tab.

    Image Added

  7. Click Variable Groups.

  8. Click Link variable group.

    Image Added

  9. Click EGIS passwords from the list of variable groups. By default, the variable group is available to the entire pipeline. To limit the scope to specific stages, click Stages, then choose the specific stages from the dropdown list.

    Image Added

  10. Click Link.

The secrets are now defined in the pipeline’s environment, and can be retrieved in several ways. Refer to the Azure Pipelines documentation on Variable Groups and Secrets for more information.

Retrieve a Secret in an Azure Python Function App

Refer to the documentation on Python Function Apps DevOps Pipelines for information on accessing an Azure Key Vault secret from wtihin an Azure Python Function App.