Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 473 of 481

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

Google Professional Cloud Developer Question 473

Single answerGoogle Cloud Platform

You are developing a serverless application on Google Cloud that needs to read data from a private Cloud Storage bucket. To follow best practices for security and minimize manual credential management, how should you configure the application to authenticate and access the bucket?

  1. A

    Create a service account, assign it the appropriate IAM role, and provide its private key to the application.

  2. B

    Use the default App Engine or Cloud Function service account, ensuring it has the required IAM permissions for the bucket.

  3. C

    Embed hardcoded credentials into your application code for accessing the bucket securely.

  4. D

    Set up the application to use user credentials for authentication by prompting users to log in.

Show answer and explanation

Correct answer: B

Explanation

The best practice for using service accounts to make Cloud API calls is to leverage the default service account of Google Cloud services like App Engine or Cloud Functions. By assigning the necessary IAM permissions to the service account, the application can securely access resources without requiring manual credential management, such as distributing private keys or hardcoding credentials.

  • A. Incorrect.

    This approach is not recommended because it requires distributing and managing sensitive private key files, which increases security risks.

  • B. Correct.

    This is the correct approach. Using the default service account provided by App Engine or Cloud Functions, along with appropriate IAM permissions, ensures secure and automated authentication without manual credential management.

  • C. Incorrect.

    Hardcoding credentials into your application code is a security anti-pattern and should be avoided as it exposes sensitive information to potential compromise.

  • D. Incorrect.

    Using user credentials adds unnecessary complexity, is less secure, and does not align with service account usage for server-to-server communication.

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