An agent needs read access to one BigQuery dataset. How do you grant it following least privilege?
- Exam domain
- Developing custom agents~33% of the exam
- Difficulty
- Medium
- 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).
Least privilege for agents uses their own identity.
Why D is the answer
Grant a dataset read role to the agent's own identity
Agent Identity gives each agent its own principal. Granting a narrow role on just that dataset keeps access minimal and auditable.
Remember: Grant narrow roles to the agent's own identity.
How it works
Agent Identity gives each agent its own principal.
Grant that principal the narrowest role on the one resource it needs.
Clues in the question
The words that point to the answer, and what each one tells you.
- one BigQuery dataset
- Scope to the dataset.
- least privilege
- Narrow role, own identity.
In detail
- Agent identities are not shared and cannot be impersonated.
- Actions are attributed to the agent in audit logs.
- Review grants when an agent's job changes.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Give the agent Project Owner so it never hits a permission errorWrong
Owner is far beyond least privilege.
B. Store a user's password in the agent configurationWrong
Stored passwords are a credential leak.
C. Reuse a shared service account that many workloads already useWrongMost tempting
A shared account mixes access and blurs the audit trail.
Why it tempts: Shared accounts hide which workload acted and carry extra access.
D. Grant a dataset read role to the agent's own identityRight
Grant narrow roles to the agent's own identity.
Use case
An illustrative scenario, not a real incident.
Illustrative: a reporting agent gets a viewer role on one dataset, and every query it runs shows its own identity in the logs.
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".
flowchart LR S0["Agent Identity principal"] --> S1["Narrow role"] --> S2["One dataset"] --> S3["Audited access"]
How to read this chart
- Read it in order: Agent Identity principal, then Narrow role, then One dataset, then Audited access.