exam questions

Exam AZ-305 All Questions

View all questions & answers for the AZ-305 exam

Exam AZ-305 topic 6 question 4 discussion

Actual exam question from Microsoft's AZ-305
Question #: 4
Topic #: 6
[All AZ-305 Questions]

HOTSPOT -
You need to recommend a solution to ensure that App1 can access the third-party credentials and access strings. The solution must meet the security requirements.
What should you include in the recommendation? 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:
Scenario: Security Requirement -
All secrets used by Azure services must be stored in Azure Key Vault.
Services that require credentials must have the credentials tied to the service instance. The credentials must NOT be shared between services.
Box 1: A system-assigned managed identity
No one knows the credentials of managed identities.
Managed Identities exist in two formats:
* System assigned: in this scenario, the identity is linked to a single Azure Resource, eg a Virtual Machine, a Logic App, a Storage Account, Web App, Function,ג€¦ so almost anything. Next, they also ג€liveג€ with the Azure Resource, which means they get deleted when the Azure Resource gets deleted.
* User Assigned Managed Identity (incorrect for this question), which means that you first have to create it as a stand-alone Azure resource by itself, after which it can be linked to multiple Azure Resources.

Box 2: An access policy -
Set up an access policy for the system-assigned managed identity.

Note: Grant access -
The managed identity needs to be granted access to read the secret that we'll store in the Key Vault.
1. Navigate to your newly created Key Vault
2. Select Access Policy from the menu on the left side.
3. Select Add Access Policy
4. Etc.
Reference:
https://devblogs.microsoft.com/devops/demystifying-service-principals-managed-identities/ https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-nonaad

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
kay000001
Highly Voted 2 years, 2 months ago
Drop Down 1: A system-assigned managed identity. Drop Down 2: Role Assignment. But I'm happy to be corrected. Thanks.
upvoted 43 times
Snownoodles
2 years, 2 months ago
Question 2: Both access policy and role assignment should work here
upvoted 5 times
Snownoodles
2 years, 2 months ago
I figured out why only "role assignment" is the correct answer. "Services that require credentials must have the credentials tied to the service instance. The credentials must NOT be shared between services" RBAC can assign permission to a specific secret, but the access policy assigns permissions for all secrets or keys, not as granular as RBAC
upvoted 21 times
AzureJobsTillRetire
1 year, 10 months ago
I created a key and a secret in a key vault and can confirm that you cannot do role assignment on a particular key or secret.
upvoted 3 times
upwork
1 year, 10 months ago
You need to select RBAC permission model first, then you can assign granular permissions to individual items.
upvoted 1 times
...
...
AzureJobsTillRetire
1 year, 10 months ago
What do you mean RBAC can assign permission to a specific secret? How? For the controls at key/secret level, Access Policy is more granular than RBAC.
upvoted 1 times
...
...
...
...
JaQua
Highly Voted 2 years, 1 month ago
1. user assigned managed identity - share 1 identity among all 6 app services 2. access policy
upvoted 22 times
Jay_2pt0
2 years, 1 month ago
It specifies that "credentials must NOT be shared."
upvoted 8 times
DeBoer
1 year, 9 months ago
They must not be shared... between APP1 and APP2. But it says nothing about sharing between instances of the app. If we want to reduce admin overhead then this is actually better while still adhering to requirements,
upvoted 5 times
m1dp
1 year, 3 months ago
Services that require credentials must have the credentials tied to the service instance. The credentials must NOT be shared between services. Credentials tied to the service instance. System assigned.
upvoted 7 times
...
...
...
...
SeMo0o0o0o
Most Recent 2 weeks, 6 days ago
WRONG 1. A system-assigned managed identity 2. A role assignment
upvoted 1 times
...
_punky_
1 month, 1 week ago
Access policy is currently marked as legacy: https://learn.microsoft.com/en-us/azure/key-vault/general/assign-access-policy?tabs=azure-portal New method is RBAC(Role based access control), which means you need to do Role assignment to get proper reference to a secret in KV.
upvoted 1 times
...
Semualulus
2 months, 2 weeks ago
Answer 1: System-assigned MI 2: Access Policy Why not the other? User-assigned managed identity: While user-assigned identities can be used across multiple resources, this option is not selected as it would contradict the requirement that credentials should not be shared between services. Role assignment: While this is used for access control in Azure resources, role-based access control (RBAC) in Key Vault is more commonly used for higher-level management tasks, whereas access policies are typically used to control access to secrets.
upvoted 1 times
...
Teerawee
2 months, 3 weeks ago
system-assigned managed identity role assignment
upvoted 1 times
...
ubdubdoo
7 months, 3 weeks ago
If you need separate managed identities for each instance, you would have to use user-assigned managed identities instead of system-assigned. User-assigned identities are created as separate Azure resources that can then be assigned individually to each App Service instance as needed. A MI would the same across instances. The "not sharing" between services is about separating Key Vaults or not using the same UI between the two apps.
upvoted 1 times
...
chair123
8 months, 3 weeks ago
When i create a key vault i get to choose either RBAC or Access Policy. i think both are correct but which of them satisfy the security requirements? "Security Requirement - - All secrets used by Azure services must be stored in Azure Key Vault. - Services that require credentials must have the credentials tied to the service instance. The credentials must NOT be shared between services." Box1: "Services that require credentials must have the credentials tied to the service instance. The credentials must NOT be shared between services." > system-assigned-managed identity Box2: we can use either of RBAC or Access Policy. couldn't find a clue which one to choose of them.
upvoted 1 times
chair123
8 months, 3 weeks ago
in this RBAC article: https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide Also in the access policy article: https://learn.microsoft.com/en-us/azure/key-vault/general/assign-access-policy?WT.mc_id=Portal-Microsoft_Azure_KeyVault&tabs=azure-portal#:~:text=you%27re%20using%20a-,managed%20identity,-for%20the%20app anyone can give me an insight on which one better would be great :D
upvoted 1 times
cosmicT73
1 month, 2 weeks ago
i think microsoft now is moving towards RBAC and by time access policies can be disabled for these features. so access policy is consider an older approach . i would pick Role assignment accordingly
upvoted 1 times
...
...
...
BShelat
11 months, 4 weeks ago
With given answers how following condition can be met? App1 will be a Python web app hosted in Azure App Service that requires a Linux runtime. Users from Contoso and Fabrikam will access App1.
upvoted 1 times
...
Paul_white
1 year ago
To ensure that App1 can access the third-party credentials and access strings securely, you should: **Authenticate App1 by using**: A system-assigned managed identity (Option B). A system-assigned managed identity is tied to your App Service and is automatically cleaned up when the service is deleted. **Authorize App1 to retrieve Key Vault secrets by using**: An access policy (Option A). You can configure Azure Key Vault to allow your App Service to retrieve secrets using its system-assigned managed identity. This is done by adding an access policy in Key Vault that grants the necessary permissions (like Get and List) to the managed identity.
upvoted 3 times
...
StixxNSnares
1 year ago
I recommend the following solution: System-assigned managed identity - This will allow app1 to use the Azure ad identity of the app service instance to access other Azure resources such as Key Vault. Then to authorize App1 to retrieve key vault secrets, use access policy. This will grant App1 the necessary permissions to read the secrets from the Key Vault. See this: https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity https://docs.microsoft.com/en-us/azure/key-vault/general/assign-access-policy-portal
upvoted 1 times
...
spotted
1 year ago
If you use ChatGPT 4 now the answer became the following. A system-assigned managed identity: This is an identity created by Azure for the App Service instance, which is tied to the lifecycle of this service and does not require the management of credentials. A role assignment: Utilizing Azure role-based access control (RBAC), you can assign a specific role to the managed identity, like “Key Vault Secrets User”, to retrieve secrets from the Key Vault. Chat GPT 4 has now been updated to 2023 and its answer changed compared to a few months ago.
upvoted 2 times
...
pabsinaz
1 year, 1 month ago
Option 2 is role assignment is more granular. Here is how: https://learn-attachment.microsoft.com/api/attachments/193976-image.png?platform=QnA
upvoted 1 times
...
m1dp
1 year, 3 months ago
Drop down 1: system-assigned MI. Literally states services cannot share the same identity. Drop down 2: Role assignment. More granular than access policy.
upvoted 1 times
...
stanl2
1 year, 3 months ago
I think DD1 should be "A user-assigned managed identity". Here's why: Requirements state: "App1 will have six instances: three in the East US Azure region and three in the West Europe Azure region." This means we have two App Services (one per region), each with its own system identity. Using user-managed identity, we can have a single MI to control the access. DD2 should be: Role Assignment (as pointed out in other posts, it provides more granular access)
upvoted 1 times
...
NotMeAnyWay
1 year, 5 months ago
Answer: 1. Authenticate App1 by using: - B. A system-assigned managed identity 2. Authorize App1 to retrieve Key Vault secrets by using: - A. An access policy Explanation: System-assigned managed identities are automatically managed by Azure, providing an identity for the Azure resource in Azure AD. This makes it an ideal choice for authenticating App1. The Key Vault Access Policy determines what permissions the identities have, like get, list, set, and delete rights for secrets, which is necessary for App1 to retrieve the secrets stored in the Key Vault, hence the selection of an Access Policy for authorization.
upvoted 6 times
...
vali6969
1 year, 5 months ago
It's said here (https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-access-policy) that access policies is the "legacy" mode to access key vault. It's not said that one is more granular than other one. https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-access-policy So for me that will be : Drop Down 1: System-Assigned Managed Identity. Drop Down 2: Role Assignment.
upvoted 2 times
vali6969
1 year, 5 months ago
Sorry It's said too that Azure RBAC is built on Azure Resource Manager and provides FINE-GRAINED access management of Azure resources. And the scope can be an individual resource and the access policiy is limited to key vault scope.
upvoted 1 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 ...