0
0
Azurecloud~10 mins

Storing secrets in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Key Vault resource in Azure.

Azure
az keyvault create --name [1] --resource-group MyResourceGroup --location eastus
Drag options to blanks, or click blank then click option'
AMyStorageAccount
BMyKeyVault
CMyVirtualMachine
DMyAppService
Attempts:
3 left
💡 Hint
Common Mistakes
Using names of other Azure resources like storage accounts or VMs.
Leaving the name blank or using invalid characters.
2fill in blank
medium

Complete the code to add a secret named 'DbPassword' with value 'P@ssw0rd!' to the Key Vault.

Azure
az keyvault secret set --vault-name MyKeyVault --name DbPassword --value [1]
Drag options to blanks, or click blank then click option'
AP@ssw0rd!
B12345
Cpassword
Dadmin
Attempts:
3 left
💡 Hint
Common Mistakes
Using simple words like 'password' or 'admin' instead of the actual secret.
Leaving the value empty.
3fill in blank
hard

Fix the error in the command to retrieve the secret value from the Key Vault.

Azure
az keyvault secret [1] --vault-name MyKeyVault --name DbPassword
Drag options to blanks, or click blank then click option'
Adelete
Blist
Cshow
Dset
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list' which shows all secrets but not the value directly.
Using 'set' which is for adding secrets.
Using 'delete' which removes secrets.
4fill in blank
hard

Fill both blanks to assign access policy to a user with secret permissions.

Azure
az keyvault set-policy --name MyKeyVault --upn [1] --secret-permissions [2]
Drag options to blanks, or click blank then click option'
Auser@example.com
Bget
Clist
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using permissions like 'delete' which are too broad for read access.
Using a username instead of an email for --upn.
5fill in blank
hard

Fill all three blanks to create a secret, retrieve it, and delete it from the Key Vault.

Azure
az keyvault secret [1] --vault-name MyKeyVault --name ApiKey --value [2]
az keyvault secret [3] --vault-name MyKeyVault --name ApiKey
Drag options to blanks, or click blank then click option'
Aset
B12345-abcde
Cshow
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list' instead of 'show' to retrieve a secret.
Using wrong secret values or commands.