
Answer-first summary for fast verification
Answer: Create a service account with appropriate access for Google services, and configure the application to use this account.
The correct answer is B. According to Google-recommended practices, it is advised to create a new service account with the minimum permissions necessary for the VM to perform its tasks. The new service account should be configured with appropriate access for Google services and then configured to be used by the application. This approach provides better security and adheres to the principle of least privilege, reducing the risk of over-privileging the default service account used by the Compute Engine VM.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You developed an application on your local development laptop that leverages Google Cloud services. For authentication, the application utilizes Application Default Credentials (ADC) and functions correctly on your local machine. The next step is to migrate this application to run on a Google Compute Engine virtual machine (VM). To ensure a smooth transition and adhere to Google-recommended authentication practices with minimal modifications to your application, what steps should you take?
A
Assign appropriate access for Google services to the service account used by the Compute Engine VM.
B
Create a service account with appropriate access for Google services, and configure the application to use this account.
C
Store credentials for service accounts with appropriate access for Google services in a config file, and deploy this config file with your application.
D
Store credentials for your user account with appropriate access for Google services in a config file, and deploy this config file with your application.
No comments yet.