A team deleted an agent and deployed a replacement with the same code. Every call the new agent makes to Cloud Storage now fails with permission denied. What is the likely cause?
- Exam domain
- Developing custom agents~33% of the exam
- Difficulty
- Hard
- In this mock
- 15 questions on this domainPractise this domain
Why the exam asks this
Integrating enterprise domain knowledge.
Objective in the exam guide: Configuring agent permissions (e.g., Agent Identity).
Agent Identity principals are tied to the agent resource, which affects IAM.
Why C is the answer
It has a new principal, so old IAM bindings do not apply
An Agent Identity principal is derived from the agent's resource. A replacement agent gets a new resource ID and so a new principal, and the IAM bindings on the old principal do not apply to it.
Remember: Replacement agent means new principal, so rebind.
How it works
A replacement agent gets a new resource ID and so a new principal.
IAM bindings on the old principal do not apply to it, so grants must be added again.
Clues in the question
The words that point to the answer, and what each one tells you.
- deleted an agent and deployed a replacement
- A new principal.
In detail
- Deleting an agent also leaves its old bindings behind, so clean them up.
- Automate grants as code with the deployment.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Its credentials expired because certificates last one yearWrong
Agent certificates are short-lived and renewed automatically, not yearly.
B. The new version must wait 24 hours for permissions to startWrongMost tempting
There is no 24-hour wait.
Why it tempts: There is no wait; the binding is simply missing.
C. It has a new principal, so old IAM bindings do not applyRight
Replacement agent means new principal, so rebind.
D. Cloud Storage blocks agents that replace a deleted oneWrong
Storage has no such rule.
In practice
- Grant roles in the same pipeline that deploys the agent.
Use case
An illustrative scenario, not a real incident.
Illustrative: a team adds IAM grants to its deployment pipeline, so every replacement agent gets its grants bound to the new principal and the old ones removed.
See it in different ways
mindmap
root(("Agent Identity"))
n1["Principal"]
n2["SPIFFE-based ID per agent"]
n3["Not shared, no long-lived keys"]
n4["Access"]
n5["IAM roles on the principal"]
n6["Principal Access Boundary caps reach"]
n7["Third-party auth"]
n8["Auth manager stores credentials"]
n9["3-legged OAuth for user data"]How to read this chart
- The centre is "Agent Identity".
- "Principal" covers "SPIFFE-based ID per agent", "Not shared, no long-lived keys".
- "Access" covers "IAM roles on the principal", "Principal Access Boundary caps reach".
- "Third-party auth" covers "Auth manager stores credentials", "3-legged OAuth for user data".
stateDiagram-v2 state "Agent v1 bound" as s0 state "Agent v2 deployed" as s1 state "Access denied" as s2 state "Access works" as s3 [*] --> s0 s0 --> s1: delete and replace s1 --> s2: no binding s2 --> s3: bind new principal s3 --> [*]
How to read this chart
- It starts at "Agent v1 bound".
- From "Agent v1 bound", "delete and replace" moves it to "Agent v2 deployed".
- From "Agent v2 deployed", "no binding" moves it to "Access denied".
- From "Access denied", "bind new principal" moves it to "Access works".
- It ends at "Access works".