exam questions

Exam AZ-304 All Questions

View all questions & answers for the AZ-304 exam

Exam AZ-304 topic 2 question 65 discussion

Actual exam question from Microsoft's AZ-304
Question #: 65
Topic #: 2
[All AZ-304 Questions]

HOTSPOT -
You have a resource group named RG1 that contains the objects shown in the following table.

You need to configure permissions so that App1 can copy all the secrets from KV1 to KV2. App1 currently has the Get permission for the secrets in KV1.
Which additional permissions should you assign to App1? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: List -
Get: Gets the specified Azure key vault.
List: The List operation gets information about the vaults associated with the subscription.

Box 2: Create -
Create Or Update: Create or update a key vault in the specified subscription.
Reference:
https://docs.microsoft.com/en-us/rest/api/keyvault/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ario
Highly Voted 3 years, 7 months ago
Given answer is correct
upvoted 21 times
STH
3 years, 4 months ago
Yes : as "App1 currently has the Get permission for the secrets in KV1", only List permission is needed to access all secrets and values in KV1 Then, having all informations, we only need Create permission to populate KV2
upvoted 3 times
...
...
dirgiklis
Highly Voted 3 years, 6 months ago
There is no "Create" or "Import" permission for Secrets, only "Set".
upvoted 12 times
telepeti
3 years, 2 months ago
I had this question yesterday, still with the 4 wrong options for KV2 restore.
upvoted 1 times
...
MasterArmSwitch
3 years, 5 months ago
You are right: https://docs.microsoft.com/en-us/azure/key-vault/secrets/about-secrets#secret-access-control Then what is the answer ?
upvoted 1 times
...
walkwolf3
3 years, 5 months ago
Azure key vault does have "Create" and "Import". Given answer is correct. https://docs.microsoft.com/en-us/azure/key-vault/general/security-features#privileged-access
upvoted 2 times
AB20101
3 years, 2 months ago
The questions is asking to copy secrets, not to create key vaults
upvoted 3 times
...
...
magichappens
2 years, 8 months ago
I just checked it and indeed there is a "Create" and "Import" permission. However, "List" and "Create" is the right answer.
upvoted 1 times
...
...
plmmsg
Most Recent 3 years, 1 month ago
list Import
upvoted 1 times
...
joehoesofat
3 years, 2 months ago
I say backup and import are the only 2 ways- or... use a read only copy in the other region- MS says you can't move a Secret to another region- or if you do- backup and import is it! https://docs.microsoft.com/en-us/azure/key-vault/general/move-region#prerequisites https://docs.microsoft.com/en-us/answers/questions/199024/how-to-copy-azure-keyvault-secrets-to-other-subscr.html
upvoted 1 times
joehoesofat
3 years, 2 months ago
Ok i was wrong the restore wont work either- !!! dang- ok this is too devops for me- i am just going with the answer list and create https://docs.microsoft.com/en-us/azure/key-vault/general/move-region#prerequisites
upvoted 1 times
...
...
joehoesofat
3 years, 2 months ago
MS says you can't move a Secret to another region- or if you do- backup and import is it! https://docs.microsoft.com/en-us/azure/key-vault/general/move-region#prerequisites https://docs.microsoft.com/en-us/answers/questions/199024/how-to-copy-azure-keyvault-secrets-to-other-subscr.html Below is all a rabitt hole for cross region- use read only copy instead for cross region! This https://docs.microsoft.com/en-us/azure/key-vault/general/assign-access-policy?tabs=azure-portal Leads to this-Authenticate to key vault in code- https://docs.microsoft.com/en-us/azure/key-vault/general/authentication Leads to this Azure Key Vault developer's guide | Microsoft Docs
upvoted 1 times
joehoesofat
3 years, 2 months ago
Ok i was wrong the restore wont work either- !!! dang- ok this is too devops for me- i am just going with the answer list and create https://docs.microsoft.com/en-us/azure/key-vault/general/move-region#prerequisites
upvoted 1 times
...
...
jmay
3 years, 3 months ago
The question / answers are flawed. The question specifically asked "copy all the SECRETS" - not keys, not certificates. And for secrets, there is no "create" or "import" operations but only "set". Some may argue it is about the Key Vault it self, so "Create" is applicable. But KV2 has already been created. The only argument to make "Import" applausible is the text label used in Azure Portal. However, the label reads "Generate/Import". I guess I just need to roll the dice for this question.
upvoted 2 times
...
micofucho
3 years, 4 months ago
I think it would be 'Import' for the second box: Import Key: 'Imports an externally created key, stores it, and returns key parameters and attributes to the client.' https://docs.microsoft.com/en-us/rest/api/keyvault/import-key/import-key Create key: 'Creates a new key, stores it, then returns key parameters and attributes to the client.' https://docs.microsoft.com/en-us/rest/api/keyvault/create-key/create-key Technically, both solutions are valid, but may be Import is more appropiate, becouse the key already exists. The Import key help page says ..'Imports an externally created key,...', so, in this case, the key has already been created, in the first vault.
upvoted 1 times
yyuryyucicuryyforme
3 years, 3 months ago
Create - a new secret will be generated by Azure Import - the pre-existing secret will be imported For example in Powershell the same cmdlet is used for both - Add-AzKeyVaultKey - and the difference between create and import is in the different switches - e.g. during create you may specify the key type (RSA or elliptic) and size, and during import you must specify the key file and password.
upvoted 1 times
...
...
examineezer
3 years, 4 months ago
1. List all keys 2. For each key, "Get Key" 3. For each response, "Import" Why is it Import and not Create? "Get Key" response is of type "KeyBundle" https://docs.microsoft.com/en-us/rest/api/keyvault/get-key/get-key#keybundle KeyBundle includes key of type "JsonWebKey". "Create Key" request body does not include JsonWebKey (it is not for pre-existing keys). https://docs.microsoft.com/en-us/rest/api/keyvault/create-key/create-key#request-body Import Key request body DOES include JsonWebKey. https://docs.microsoft.com/en-us/rest/api/keyvault/import-key/import-key#request-body
upvoted 1 times
...
cfsxtuv33
3 years, 6 months ago
Working in PowerShell you would need to "import" the secrets into KV2. The first box is correct but perhaps the second box should be "import." Any rebuttal is welcome.
upvoted 5 times
...
waqas
3 years, 6 months ago
Given answers are correct.
upvoted 4 times
...
leo_az300
3 years, 6 months ago
I would go with List & Import If you check API response body for Get Key and Import Key, they match each other. But Create Key API request body needs more fields.
upvoted 3 times
Ajdlfasudfo0
3 years, 6 months ago
isn't import for restoring the backup? Which we cannot use because they are in differnt geo regions
upvoted 4 times
...
...
syu31svc
3 years, 6 months ago
I would say List to copy from KV1 Import to copy to KV2
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago