Question 146 of 507
Trust and security with Google CloudhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is attaching a service account directly to a Compute Engine VM or GKE workload, which replaces long-lived service account keys by automatically obtaining short-lived OAuth 2.0 access tokens from the metadata server. This mechanism aligns with Zero Trust principles because it eliminates static credential files that could be leaked or rotated manually, instead relying on ephemeral tokens that expire within an hour and are refreshed automatically by the infrastructure. On the Google Cloud Digital Leader exam, this concept tests your understanding of how Google Cloud’s default service account and metadata server enforce Zero Trust without requiring key management. A common trap is assuming API keys or downloaded JSON keys are still needed for workloads on Google Cloud infrastructure, but the correct approach is to let the platform handle authentication natively. Memory tip: think “no keys, just metadata” — if the workload runs on Google Cloud, the metadata server provides the keys automatically.

Cloud Digital Leader Trust and security with Google Cloud Practice Question

This GCDL practice question tests your understanding of trust and security with google cloud. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A CISO is designing an identity strategy for Google Cloud that follows Zero Trust principles. She proposes that no long-lived credentials (API keys, service account keys) should be used for any automated workloads. What Google Cloud mechanism replaces service account keys for authenticating workloads running on Google Cloud infrastructure?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Attaching a service account to the Compute Engine VM or GKE workload, allowing the workload to obtain short-lived access tokens from the metadata server automatically — no key files required

Option B is correct because Google Cloud's default service account attached to Compute Engine VMs or GKE nodes uses the metadata server to automatically obtain short-lived OAuth 2.0 access tokens (typically valid for 1 hour). This eliminates the need for any long-lived key files, aligning with Zero Trust principles by reducing credential exposure and enabling automatic rotation.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Using long-lived API keys stored in Secret Manager instead of environment variables — the keys are the same but stored more securely

    Why it's wrong here

    Long-lived API keys remain a risk even in Secret Manager — they can be extracted and used outside the intended context. The Zero Trust approach requires eliminating long-lived credentials, not just storing them more securely.

  • Attaching a service account to the Compute Engine VM or GKE workload, allowing the workload to obtain short-lived access tokens from the metadata server automatically — no key files required

    Why this is correct

    This is the correct Zero Trust-aligned approach. A service account is attached to the VM or GKE pod. The workload calls the metadata server (169.254.169.254) to get a short-lived (1-hour) access token automatically. No key file is created, stored, or managed — eliminating the key compromise risk entirely. Workload Identity in GKE extends this to Kubernetes service accounts.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Rotating service account keys every 24 hours to minimize the exposure window

    Why it's wrong here

    Frequent rotation reduces exposure time but doesn't eliminate the key file risk. Keys must still be distributed, stored, and managed. The Zero Trust principle is to eliminate long-lived credentials entirely through keyless authentication.

  • Using OAuth 2.0 user accounts instead of service accounts for all automated workloads

    Why it's wrong here

    OAuth 2.0 user accounts require human interaction for authentication and are designed for user-facing applications. They cannot be used for unattended automated workloads. Service accounts with metadata-based authentication are the correct solution.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the misconception that rotating keys or storing them securely (e.g., in Secret Manager) is sufficient for Zero Trust, when the core principle is to eliminate long-lived credentials entirely by using metadata-server-based token generation.

Detailed technical explanation

How to think about this question

When a workload runs on a VM with a service account attached, the metadata server exposes a REST endpoint (e.g., `http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token`) that returns an access token scoped to the service account's IAM roles. This token is automatically refreshed before expiry, and the metadata server itself is only accessible from within the VM, preventing external access. In GKE, Workload Identity extends this by allowing individual pods to assume specific service accounts via Kubernetes annotations, further isolating permissions.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related GCDL practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free GCDL practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this GCDL question test?

Trust and security with Google Cloud — This question tests Trust and security with Google Cloud — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Attaching a service account to the Compute Engine VM or GKE workload, allowing the workload to obtain short-lived access tokens from the metadata server automatically — no key files required — Option B is correct because Google Cloud's default service account attached to Compute Engine VMs or GKE nodes uses the metadata server to automatically obtain short-lived OAuth 2.0 access tokens (typically valid for 1 hour). This eliminates the need for any long-lived key files, aligning with Zero Trust principles by reducing credential exposure and enabling automatic rotation.

What should I do if I get this GCDL question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.