Azure API Management · AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services

An API Management policy must add a payment-provider secret to an outbound request. The secret must not be stored as plaintext in the policy or expos…

Practice question from Azure API Management (AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services), with the correct answer and a step-by-step solution.

medium · MCQ · Q-3B2064

An API Management policy must add a payment-provider secret to an outbound request. The secret must not be stored as plaintext in the policy or exposed to API developers. Which approach best meets this requirement?

  1. A.Store the secret in an Azure Key Vault-backed named value and reference it in the policy as {{payment-provider-secret}}Correct answer
  2. B.Store the secret in a URL query parameter and mark the API operation as internal
  3. C.Store the secret in the API description and obfuscate the value with Base64
  4. D.Store the secret in a request header policy as a literal value and restrict access to the developer portal

Solution

APIM named values can reference secrets stored in Azure Key Vault. A policy can use the named value syntax {{payment-provider-secret}}, while APIM's managed identity can be granted permission to read the secret. Base64 and portal restrictions do not provide secret protection.

More from Azure API Management

All of Azure API Management

Practise more Connect to and Consume Azure and Third-party Services

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed