Skip to content

arindam0310018/21-Apr-2022-DevOps__Fetch-Selective-Secrets-With-No-Access-To-KeyVault

Repository files navigation

FETCH SELECTIVE SECRETS WITH NO ACCESS TO KEY VAULT USING DEVOPS PIPELINES

Greetings my fellow Technology Advocates and Specialists!!!

This Blog post is a follow-up to my previous post - [Fetch Secrets with no access to key vault] (https://dev.to/arindam0310018/fetch-secrets-with-no-access-to-key-vault-using-devops-pipelines-54h3)

MY SUGGESTION:-
Please Read my previous blog first to better understand the Use Case
USE CASES:-
Fetch Secrets only with Tags (any)
Fetch Secrets only with Specific defined Tags
LIVE RECORDED SESSION:-
LIVE DEMO was Recorded as part of my Presentation in WELSH AZURE GROUP Forum/Platform
Duration of My Demo = 32 Mins 38 Secs
Start and End Time = 00:39:22 to 01:12:00
IMAGE ALT TEXT HERE
REQUIREMENTS:-
  1. Azure Key Vault
  2. Four Sample Secrets in Azure Key Vault
  3. Add Tags to One or More Secrets
  4. Azure Resource Manager Service Connection
  5. Azure DevOps Pipeline (YAML)
NOTE:-

The Service Principal (which is required to Create Service Connection) should at minimum have GET and LIST Access Policy Permissions in Azure Key Vault.

BELOW DISPLAYS THE SAMPLE SECRETS IN KEY VAULT:-
Image description
WHERE DO WE APPLY TAGS IN KEY VAULT SECRET:-
Image description
Image description
BELOW DISPLAYS THE SECRET TAGS IN KEY VAULT:-
NAME OF THE SECRET TAGS ASSOCIATED WITH SECRET
AMSecret005 Image description
AMSecret006 Image description
AMSecret007 No Tags Configured
AMSecret008 Image description
# PIPELINE TASKS
1. AZURE KEY VAULT TASKS
2. FETCH ALL SECRETS WITH TAGS OR ALL SECRETS WITH SPECIFIC TAG. EXPORT IT THEN IN A TEXT FILE
3. COPY THE SECRETS TEXT FILE TO ARTIFACTS STAGING DIRECTORY
4. PUBLISH THE ARTIFACTS