Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 423 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 423

Select 3Google Cloud Platform

You are developing an application that needs to integrate with the Google Cloud Translation API to translate user-provided text. The application is deployed on Cloud Run. What steps should you take to securely authenticate and access the Translation API while following best practices?

  1. A

    Use a service account with the appropriate IAM roles and grant it to the Cloud Run service.

  2. B

    Embed the API key for the Translation API directly in your application's code for authentication.

  3. C

    Enable the Translation API in your Google Cloud project.

  4. D

    Use Application Default Credentials (ADC) to authenticate your application with the Translation API.

  5. E

    Allow unauthenticated access to your Cloud Run service to simplify integration.

Show answer and explanation

Correct answers: A, C, D

Explanation

To securely integrate an application running on Cloud Run with the Google Cloud Translation API, you should enable the API in your project, use a service account with appropriate IAM roles, and rely on Application Default Credentials (ADC) for authentication. These practices ensure security and follow the principle of least privilege. Embedding API keys in code or allowing unauthenticated access are insecure and should be avoided.

  • A. Correct.

    Correct. Using a service account with the appropriate IAM roles (e.g., 'Cloud Translation API User') is the recommended approach to securely authenticate and access Google Cloud APIs like the Translation API.

  • B. Incorrect.

    Incorrect. Embedding API keys directly in code is a security risk because they could be exposed and misused if the codebase is compromised.

  • C. Correct.

    Correct. The Translation API must be enabled in your Google Cloud project to allow your application to make requests to it.

  • D. Correct.

    Correct. Using Application Default Credentials (ADC) is a best practice for authenticating applications running on Google Cloud services, as it automatically uses the service account assigned to your Cloud Run service.

  • E. Incorrect.

    Incorrect. Allowing unauthenticated access to your Cloud Run service is not secure and does not follow best practices for integrating with Google Cloud APIs.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

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

Start timed exam