Identity, Authorization, and Least Privilege › User, workload, and resource service identities
Language AI HandbookAll chapters This workflow carries three identities. Other architectures can add services or use a different division of responsibility. Begin by identifying the parties whose roles differ in the decision.
- The end user asks for an outcome. The trusted user identity anchors workspace policy, consent, and the starting authority for the task.
- The agent workload asks a service to perform an operation. The workload may be permitted to act for this user on this task under the delegation recorded for it.
- The resource service controls the effect. It authenticates its caller, validates delegated authority, resolves the resource within the workspace, and enforces the applicable policy before performing the operation.
Authentication verifies an asserted identity. Authorization determines which action may be performed on a particular resource under current policy. NIST SP 800-207 treats these as distinct functions. A background task may still run under a valid workload identity even after the initiating user's access changes. The decision should use authority available when it acts.
In a deployed OAuth design, RFC 9700 §2.3 recommends restricting token privileges to those needed for the use case. It also recommends audience restriction where feasible, so the receiving service can verify that it is the intended recipient. An audience identifies where authority may be presented. Resource and action restrictions identify what that authority can authorize there. The chapter's invented grants represent resolved facts after relevant credential checks, with no token handling in the notebook.
Delegation lets an actor use some of a subject's rights on the subject's behalf. RFC 8693 §1.1 distinguishes delegation from impersonation within a defined rights context. In the delegation case, the actor retains a distinct identity from the subject. Keeping actor and subject separate lets a service evaluate the acting workload and preserve both identities for audit.
Consent, scope, and expiry as first-class fields
Consent, scope, expiry, and revocation answer different questions about the same request.
- Consent records the user's choice. The service resolves consent for the relevant task, user, operation, and resource under its own design. It also applies the underlying authorization policy, since a user choice cannot grant rights the user does not hold.
- Scope bounds the operations and resources the authority covers. For the document worker, the useful distinction is between reading this draft and marking this draft ready. Access to the workspace does not supply every operation within it.
- Expiry sets an end time for authority. An expiry limits the validity interval under the enforcement point's rules. It can leave an interval during which authority is still active after a task no longer needs it.
- Revocation withdraws authority before its normal end. The enforcement point needs a design for learning the current state. RFC 7009 §2.2 notes that token revocation can have a propagation delay. The interval accepted by a particular service depends on its own authority freshness rules.
Keep a trusted field or policy input for each question the service must answer. In the fixture the user consent and delegated scope are explicit sets. The clock is an integer supplied with the request. Each hop has an interval and revocation state. A separate approval record models the example review action.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!