ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 119 - AZ-204 discussion

Report
Export

Your company is developing an Azure API hosted in Azure.

You need to implement authentication for the Azure API to access other Azure resources. You have the following requirements:

All API calls must be authenticated.

Callers to the API must not send credentials to the API.

Which authentication mechanism should you use?

A.
Basic
Answers
A.
Basic
B.
Anonymous
Answers
B.
Anonymous
C.
Managed identity
Answers
C.
Managed identity
D.
Client certificate
Answers
D.
Client certificate
Suggested answer: C

Explanation:

Azure Active Directory Managed Service Identity (MSI) gives your code an automatically managed identity for authenticating to Azure services, so that you can keep credentials out of your code.

Note: Use the authentication-managed-identity policy to authenticate with a backend service using the managed identity. This policy essentially uses the managed identity to obtain an access token from Azure Active Directory for accessing the specified resource. After successfully obtaining the token, the policy will set the value of the token in the Authorization header using the Bearer scheme.

Incorrect Answers:

A: Use the authentication-basic policy to authenticate with a backend service using Basic authentication. This policy effectively sets the HTTP Authorization header to the value corresponding to the credentials provided in the policy.

B: Anonymous is no authentication at all.

D: Your code needs credentials to authenticate to cloud services, but you want to limit the visibility of those credentials as much as possible. Ideally, they never appear on a developer's workstation or get checked-in to source control. Azure Key Vault can store credentials securely so they aren't in your code, but to retrieve them you need to authenticate to Azure Key Vault. To authenticate to Key Vault, you need a credential! A classic bootstrap problem.

Reference:

https://azure.microsoft.com/en-us/blog/keep-credentials-out-of-code-introducing-azure-ad-managed-service-identity/

https://docs.microsoft.com/en-us/azure/api-management/api-management-authentication-policies

asked 02/10/2024
Yuri Mitrofanov
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first