Question 338 of 1,000
easyMultiple ChoiceObjective-mapped

Delete Service Account Key and Use Workload Identity Federation

This PCSE practice question tests your understanding of service account keys. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: service account keys. 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 junior developer created a service account with the roles/storage.admin role and downloaded a JSON key. What is the best practice to improve security?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

Quick Answer

The answer is to delete the service account key and use workload identity federation. This is the best practice because workload identity federation allows workloads running outside of Google Cloud to authenticate directly to Google Cloud resources without the need for long-lived, static service account keys, which are a primary security risk if exposed or leaked. On the Google Professional Cloud Security Engineer exam, this scenario tests your understanding of identity and access management best practices, specifically the principle of eliminating static credentials in favor of short-lived, federated authentication. A common trap is to think that simply rotating the key (Option B) is sufficient, but rotation only reduces the window of exposure rather than removing the risk entirely. Remember the memory tip: "Keys are risky; federate to eliminate."

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

Delete the key and use workload identity federation.

The best practice is to delete the long-lived JSON key and use workload identity federation, which allows resources to assume a service account identity without a key. This eliminates the risk of key leakage or compromise. Option A is correct. Option D (IP allowlists) adds some protection but does not remove the vulnerability of the key itself. Option B (rotation) reduces the exposure window but still uses keys. Option C (user-managed service account) is not relevant.

Key principle: Service account keys

Answer analysis

Option-by-option breakdown

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

  • Delete the key and use workload identity federation.

    Why this is correct

    Workload identity federation allows authentication without keys, improving security.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Service account keys

  • Rotate the key every 30 days.

    Why it's wrong here

    Rotating keys reduces risk but does not eliminate it; avoiding keys entirely is better.

  • Use a user-managed service account instead.

    Why it's wrong here

    User-managed vs. Google-managed service accounts are not the primary concern; the issue is key usage.

  • Restrict the key's usage with IP allowlists.

    Why it's wrong here

    Service account keys cannot be restricted by IP.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Detailed technical explanation

How to think about this question

Treat this as a scenario question. Identify the problem, the constraint, and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • Service account keys
  • Workload identity federation
  • Role deletion

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

Service account keys

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

Related practice questions

Related PCSE 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 PCSE 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 PCSE question test?

Service account keys

What is the correct answer to this question?

The correct answer is: Delete the key and use workload identity federation. — The best practice is to delete the long-lived JSON key and use workload identity federation, which allows resources to assume a service account identity without a key. This eliminates the risk of key leakage or compromise. Option A is correct. Option D (IP allowlists) adds some protection but does not remove the vulnerability of the key itself. Option B (rotation) reduces the exposure window but still uses keys. Option C (user-managed service account) is not relevant.

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

Review service account keys, then practise related PCSE questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

What is the key concept behind this question?

Service account keys

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

Keep practising

More PCSE practice questions

Last reviewed: Jun 24, 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 PCSE 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 PCSE exam.