An agent must read a user's GitHub repositories on that user's behalf. How should it authenticate?
- Exam domain
- Securing and governing agentic workflows~15% of the exam
- Difficulty
- Medium
- In this mock
- 7 questions on this domainPractise this domain
Why the exam asks this
Configuring agent security and governance.
Objective in the exam guide: Implementing authentication and secure tool execution (e.g., agent-to-tool API calls using OAuth 2.0).
User-delegated access needs user consent and tokens.
Why A is the answer
3-legged OAuth, tokens held by the auth manager
3-legged OAuth gives the agent user-delegated, scoped access. The auth manager stores the tokens, handles consent and lets administrators revoke access.
Remember: Acting for a user means 3-legged OAuth.
How it works
For user-delegated access, configure a 3-legged OAuth auth provider in the Agent Identity auth manager.
It handles consent and stores tokens, so the agent acts with that user's rights only.
Clues in the question
The words that point to the answer, and what each one tells you.
- on that user's behalf
- User-delegated, so 3-legged OAuth.
In detail
- Audit logs record both the agent and the delegating user.
- Machine-to-machine calls use 2-legged OAuth or API keys instead.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. 3-legged OAuth, tokens held by the auth managerRight
Acting for a user means 3-legged OAuth.
B. Share one organization admin token across all usersWrong
A shared admin token gives everyone's access to every user.
C. Use the agent's own identity with full organization accessWrongMost tempting
The agent's own identity should not reach a user's private data.
Why it tempts: That ignores the user's own permissions.
D. Ask users to paste their passwords into the chatWrong
Passwords in chat are a serious leak.
Use case
An illustrative scenario, not a real incident.
Illustrative: a developer approves the agent once, and it then reads only that developer's repositories. Revoking consent stops it.
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".
sequenceDiagram participant P0 as User participant P1 as Agent participant P2 as Auth manager participant P3 as GitHub P1->>P2: need user token P2-->>P0: consent request P0->>P2: approve scopes P1->>P3: call with delegated token
How to read this chart
- 1. Agent sends "need user token" to Auth manager.
- 2. User gets a reply from Auth manager: "consent request".
- 3. User sends "approve scopes" to Auth manager.
- 4. Agent sends "call with delegated token" to GitHub.