0
0
Azurecloud~10 mins

Storing keys and certificates 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 a storage account or VM name instead of a Key Vault name.
Leaving the name blank.
2fill in blank
medium

Complete the code to add a certificate to the Azure Key Vault.

Azure
az keyvault certificate create --vault-name MyKeyVault --name [1] --policy @policy.json
Drag options to blanks, or click blank then click option'
AMyCertificate
BMyStorageAccount
CMyVirtualMachine
DMyAppService
Attempts:
3 left
💡 Hint
Common Mistakes
Using names of unrelated resources like storage accounts or VMs.
Using an empty or invalid name.
3fill in blank
hard

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

Azure
az keyvault secret [1] --vault-name MyKeyVault --name MySecret
Drag options to blanks, or click blank then click option'
Adelete
Blist
Ccreate
Dshow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' or 'create' instead of 'show'.
Using 'list' which shows all secrets, not a specific one.
4fill in blank
hard

Fill both blanks to assign access policy to a user for the Key Vault.

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
Cdelete
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using a permission like 'delete' when only read access is needed.
Using a resource name instead of a user email for --upn.
5fill in blank
hard

Fill all three blanks to create a secret with a value in the Key Vault.

Azure
az keyvault secret [1] --vault-name MyKeyVault --name [2] --value [3]
Drag options to blanks, or click blank then click option'
Aset
BMySecret
CmySecretValue123
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' instead of 'set' to create a secret.
Confusing secret name and value.