AI-102 exam dumps

AI-102 practice question 85 of 493

Designing and Implementing a Microsoft Azure AI Solution. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AI-102 Question 85

Single answer

You are responsible for managing authentication for an Azure Cognitive Services resource. The development team requires secure access to the resource from their application without exposing the service's keys in the codebase. Which method should you implement to ensure secure authentication?

  1. A

    Use Managed Identities for Azure resources to access the Cognitive Services resource.

  2. B

    Embed the resource's API key directly in the application code.

  3. C

    Store the resource's API key in Azure Key Vault and retrieve it during runtime.

  4. D

    Grant public access to the Cognitive Services resource to avoid managing authentication.

Show answer and explanation

Correct answer: A

Explanation

Using Managed Identities for Azure resources is the most secure and recommended method to authenticate applications to Azure services like Cognitive Services. It eliminates the need to manage credentials, reducing the risk of exposure, and integrates seamlessly with Azure's identity and access management framework.

  • A. Correct.

    This is the correct option. Managed Identities allow applications on Azure to securely authenticate to resources without handling sensitive credentials such as API keys. It is the recommended approach for securing access to Azure resources.

  • B. Incorrect.

    Embedding API keys directly in the application code is insecure, as it increases the risk of keys being exposed in source control or during a breach.

  • C. Incorrect.

    While storing API keys in Azure Key Vault is more secure than embedding them in code, it still requires handling and managing the API key, which is less secure than using Managed Identities.

  • D. Incorrect.

    Granting public access to a Cognitive Services resource is not secure and should never be done in production environments, as it exposes the resource to unauthorized access.

Timed practice exam

Take a AI-102 practice test under exam conditions

40 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam