
Answer-first summary for fast verification
Answer: Set the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool.
The correct answer is D. Setting the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool is the recommended approach to avoid having the proxy credentials recorded in any logs (such as shell history or gcloud CLI logs) or in the gcloud CLI configuration file. Environment variables are not typically logged, ensuring the credentials remain secure.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have successfully installed the Google Cloud CLI on your workstation and have configured it to use a proxy by setting the necessary proxy settings. Given this setup, you are concerned that your proxy credentials might inadvertently be logged by the gcloud CLI, which could pose a security risk. To ensure that your proxy credentials do not appear in the gcloud CLI logs, what action should you take?
A
Configure username and password by using gcloud config set proxy/username and gcloud config set proxy/password commands.
B
Encode username and password in sha256 encoding, and save into a text file. Use filename as a value in the gcloud config set core/custom_ca_certs_file command.
C
Provide values for CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD in the gcloud CLI tool configuration file.
D
Set the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool.
No comments yet.