You installed the gcloud CLI and configured an HTTP proxy. To prevent your proxy credentials from being recorded in gcloud logs, what should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Set CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD as environment variables in your shell..
Why this is the answer
Setting CLOUDSDKPROXYUSERNAME and CLOUDSDKPROXYPASSWORD as environment variables is the correct approach because environment variables are not typically logged by applications like gcloud CLI, thus preventing sensitive credentials from appearing in log files. This method keeps the credentials out of persistent configuration files and command history. Configuring username and password with gcloud config set proxy/username and gcloud config set proxy/password would store the credentials in the gcloud configuration file, which could be read by others or inadvertently logged. Encoding credentials and setting core/customcacertsfile is incorrect because customcacertsfile is for specifying custom CA certificates, not for proxy authentication. Adding these values directly to the gcloud CLI configuration file is incorrect for the same reason as using gcloud config set – it stores sensitive data in a persistent file.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed