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 |
REQUIREMENTS:- |
---|
- Azure Key Vault
- Four Sample Secrets in Azure Key Vault
- Add Tags to One or More Secrets
- Azure Resource Manager Service Connection
- 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:- |
---|
WHERE DO WE APPLY TAGS IN KEY VAULT SECRET:- |
---|
BELOW DISPLAYS THE SECRET TAGS IN KEY VAULT:- |
---|
NAME OF THE SECRET | TAGS ASSOCIATED WITH SECRET |
---|---|
AMSecret005 | |
AMSecret006 | |
AMSecret007 | No Tags Configured |
AMSecret008 |
# | 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 |