<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-liu-oauth-chain-delegation-00"
  ipr="trust200902"
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="OAuth Delegation Chain">Delegation Chain for OAuth 2.0</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-oauth-chain-delegation-00"/>

    <author fullname="Dapeng Liu" initials="D." surname="Liu">
      <organization>Alibaba Group</organization>
      <address>
        <email>max.ldp@alibaba-inc.com</email>
      </address>
    </author>

    <author fullname="Hongru Zhu" initials="H." surname="Zhu">
      <organization>Alibaba Group</organization>
      <address>
        <email>hongru.zhr@alibaba-inc.com</email>
      </address>
    </author>

    <author fullname="Suresh Krishnan" initials="S." surname="Krishnan">
      <organization>Cisco</organization>
      <address>
        <email>suresh.krishnan@gmail.com</email>
      </address>
    </author>

    <author fullname="Aaron Parecki" initials="A." surname="Parecki">
      <organization>Okta</organization>
      <address>
        <email>aaron@parecki.com</email>
      </address>
    </author>

    <date year="2026" month="June" day="6"/>
    <area>Security</area>
    <workgroup>Web Authorization Protocol</workgroup>

    <keyword>OAuth</keyword>
    <keyword>Delegation</keyword>
    <keyword>Chain</keyword>
    <keyword>Multi-hop</keyword>
    <keyword>Agent</keyword>

    <abstract>
      <t>
        RFC 8693 defines the <tt>act</tt> claim for expressing delegation
        semantics in JWTs, including nested multi-hop actor identification.
        However, <tt>act</tt> captures only the identity of each actor in the
        chain, not the authorization constraints applied at each hop, and is
        constructed unilaterally by the Authorization Server without
        cryptographic confirmation from the delegating agent.  This
        specification defines the <tt>delegation_chain</tt> JWT claim as a
        structured delegation record companion to <tt>act</tt>: an ordered array of
        delegation records, each capturing the Authorization Server's
        attestation and, when present, the delegated policy constraints,
        and optionally carrying the delegator's cryptographic confirmation.  Together, <tt>act</tt> and <tt>delegation_chain</tt>
        provide both runtime authorization and verifiable delegation
        lineage for
        multi-hop agent delegation.  The specification supports cross-domain
        delegation by composing with the identity chaining transport pattern,
        and integrates a user interaction mechanism for explicit consent when
        required by policy or regulation.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>
        In multi-agent systems, a primary agent (Agent A) may need to
        delegate a subset of its authorized operations to a secondary agent
        (Agent B), which may in turn delegate further to Agent C.  Each
        delegation hop must preserve the original user's authorization
        intent while constraining what each downstream agent is permitted
        to do.
      </t>

      <t>
        OAuth 2.0 already provides building blocks for expressing delegation.
        RFC 8693 defines the <tt>act</tt> claim, which supports nested
        multi-hop actor identification — enabling a token to express that
        Agent A delegated to Agent B, which in turn delegated to Agent C.
        <xref target="I-D.ietf-oauth-identity-chaining"/> defines the
        cross-domain transport pattern combining Token Exchange
        (<xref target="RFC8693"/>) and JWT Authorization Grant
        (<xref target="RFC7523"/>) to carry identity and authorization
        information across trust domain boundaries.  Together, these
        mechanisms address the runtime dimension of delegation: who is
        currently acting, and how to move tokens across domains.
      </t>

      <t>
        However, three structural gaps remain for agent delegation scenarios:
      </t>

      <ul>
        <li>
          <strong>Per-hop policy constraint:</strong> The <tt>act</tt> claim
          identifies the actors at each hop but does not record what
          authorization constraints were applied at each delegation step.
          A downstream Resource Server sees the final <tt>scope</tt> but
          cannot verify whether intermediate agents narrowed or expanded
          the authorization along the way.
        </li>
        <li>
          <strong>Delegator cryptographic confirmation:</strong> The
          <tt>act</tt> claim is constructed unilaterally by the
          Authorization Server.  The delegating agent leaves no independent
          cryptographic evidence that it authorized a specific delegation.
          This limits non-repudiation and post-hoc audit capabilities.
        </li>
        <li>
          <strong>User interaction for delegation:</strong> Neither
          <tt>act</tt> nor identity chaining defines a mechanism for
          pausing a delegation flow to obtain explicit user consent.  This
          is a gap specific to agent scenarios, where agents may
          autonomously delegate to other agents without the user's
          awareness.
        </li>
      </ul>

      <t>
        This specification introduces the <tt>delegation_chain</tt> claim as
        a structured companion to <tt>act</tt>.  While <tt>act</tt>
        provides runtime actor identification for authorization decisions,
        <tt>delegation_chain</tt> records the full delegation history as an
        ordered array of delegation records.  Each record captures the
        AS's attestation and, when present, the delegated policy at that
        hop, and MAY additionally carry the delegator's cryptographic
        confirmation,
        ensuring that neither the AS nor any delegating agent can
        unilaterally construct or deny a delegation record.  The two claims coexist in the same token:
        <tt>act</tt> answers "who is acting now" for the Resource Server,
        while <tt>delegation_chain</tt> answers "how was this authorization
        delegated, step by step" for verification and compliance systems.
      </t>

      <t>
        The <tt>delegation_chain</tt> claim addresses the delegation lineage and verification
        dimension of complex delegation, complementing the runtime semantics
        provided by existing OAuth mechanisms.  Cross-domain delegation
        (<xref target="cross-domain"/>) addresses the multi-domain scenario.  This version of the specification focuses on linear
        delegation chains; other complex topologies such as
        diamond-shaped delegation, where multiple paths converge on the same
        agent, may be addressed by future extensions.
      </t>

      <t>
        <strong>Scope Boundary:</strong> This specification addresses
        problems that lie outside the design scope of Token Exchange
        (<xref target="RFC8693"/>) and Identity Chaining
        (<xref target="I-D.ietf-oauth-identity-chaining"/>).  Token
        Exchange defines how to convert one token into another but does
        not record the delegation lineage across multiple hops.  Identity
        Chaining defines how to transport identity across trust domains
        but intentionally leaves Claims Transcription representation
        undefined.  The three problems solved by this specification —
        multi-hop delegation lineage, delegator non-repudiation, and
        delegation consent interaction — are orthogonal to both token
        conversion and cross-domain transport.  Absorbing this
        mechanism into either existing specification would broaden
        their scope beyond their original design intent and impose
        delegation lineage complexity on deployments that do not
        need it.
      </t>

      <t>
        <strong>Deployment Options:</strong> A minimal deployment
        requires only the <tt>delegation_chain</tt> claim structure
        (<xref target="delegation-chain-claim"/>), the delegation
        Token Exchange flow (<xref target="protocol-flow"/>), and
        the AS validation rules
        (<xref target="step3-delegation-request"/>).
        Implementations MAY additionally support structured policy
        (<tt>delegated_policy</tt>), user interaction
        (<xref target="delegation-interaction"/>), cross-domain
        delegation (<xref target="cross-domain"/>),
        <tt>delegator_signature</tt>, and authorization evidence
        propagation, depending on deployment requirements.
      </t>

      <section title="Requirements Language">
        <t>
          The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", 
          "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this 
          document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> 
          <xref target="RFC8174"/> when, and only when, they appear in all capitals.
        </t>
      </section>

    </section>

    <section anchor="relationship" title="Relationship to Existing Mechanisms">
      <t>
        This section describes how the <tt>delegation_chain</tt> claim
        relates to existing OAuth 2.0 mechanisms, establishing the precise
        boundary between runtime delegation semantics and structured
        delegation records.
      </t>

      <section anchor="rel-act" title="Relationship to the act Claim">
        <t>
          RFC 8693 defines the <tt>act</tt> claim to express that delegation
          has occurred and to identify the acting party.  The <tt>act</tt>
          claim supports nested multi-hop actor chains: a token can express
          that Agent A delegated to Agent B, which delegated to Agent C, all
          within a single nested JSON structure.  This nesting enables
          Resource Servers to identify the current actor and trace the actor
          lineage for authorization decisions.
        </t>

        <t>
          The <tt>act</tt> claim is constructed by the Authorization Server
          alone: the AS assembles the nested actor chain without requiring
          independent proof from each delegating agent.  This is sufficient
          for runtime authorization decisions but does not capture per-hop
          policy constraints or delegator consent.
        </t>

        <t>
          The <tt>delegation_chain</tt> claim complements <tt>act</tt> by
          recording the delegation lineage as a structured array of signed
          records.  Each record captures the AS's attestation
          (<tt>as_signature</tt>), the policy constraints applied at
          that hop (<tt>scope</tt>, and — when present —
          <tt>delegated_policy</tt>), and — when present —
          the delegator's own cryptographic proof
          (<tt>delegator_signature</tt>).  This enables:
        </t>

        <ul>
          <li>
            <strong>Per-hop policy constraints:</strong> Each delegation
            record carries the policy that was applied at that hop, not
            just the final scope.  This preserves the full delegation
            lineage and enables policy narrowing verification.
          </li>
          <li>
            <strong>Delegator proof:</strong> The optional
            <tt>delegator_signature</tt> on each record provides
            independent evidence of each delegator's consent, enabling
            non-repudiation that the AS alone cannot provide.
          </li>
          <li>
            <strong>User interaction:</strong> The delegation flow
            supports optional user consent interaction
            (<xref target="delegation-interaction"/>) at each hop,
            which is outside the scope of <tt>act</tt>.
          </li>
        </ul>

        <t>
          In a token carrying both claims, <tt>act</tt> identifies the
          current actor for the Resource Server's authorization decision,
          while <tt>delegation_chain</tt> provides the structured delegation
          record from the current actor back to the original human principal.
          The <tt>delegatee_id</tt> of the most recent delegation record
          (index 0) MUST match the <tt>act.sub</tt> value, ensuring
          continuity between the two claims.
        </t>
      </section>

      <section anchor="rel-identity-chaining" title="Relationship to Identity Chaining">
        <t>
          <xref target="I-D.ietf-oauth-identity-chaining"/> defines a
          general-purpose pattern for preserving identity and authorization
          information across trust domains, combining Token Exchange
          (<xref target="RFC8693"/>) and JWT Authorization Grant
          (<xref target="RFC7523"/>).  It addresses the <strong>transport
          dimension</strong> of cross-domain delegation: how to move a token
          from Domain A to Domain B while preserving the user identity and
          authorization context.
        </t>

        <t>
          This specification reuses the identity chaining transport for
          cross-domain delegation (<xref target="cross-domain"/>) and adds
          agent-specific extensions:
        </t>

        <ul>
          <li>
            <strong>delegation_chain claim:</strong> An explicit,
            cryptographically signed delegation record of all delegation hops,
            which identity chaining does not define;
          </li>
          <li>
            <strong>Policy narrowing enforcement:</strong> Each delegation
            hop MUST carry a <tt>scope</tt> equal to or narrower than its
            predecessor; structured policy
            (<tt>delegated_policy</tt>) is additionally enforced when
            present;
          </li>
          <li>
            <strong>Optional dual-signature security:</strong>
            Both the AS and the delegating agent can sign each delegation
            record, preventing unilateral forgery; deployments that omit
            <tt>delegator_signature</tt> rely on AS signature alone;
          </li>
          <li>
            <strong>Agent Identifier URIs:</strong> Resolvable URI-based
            identity for delegators and delegatees, supporting WIT
            and SPIFFE schemes.
          </li>
        </ul>

        <t>
          The key distinction in deployment context is scope: identity
          chaining addresses general cross-domain identity propagation
          (human users, CI/CD pipelines, SSO extension), while this
          specification profiles that transport specifically for
          agent-to-agent delegation with delegation lineage requirements.
        </t>
      </section>

      <section anchor="rel-claims-transcription" title="Relationship to Claims Transcription">
        <t>
          Section 2.5 of <xref target="I-D.ietf-oauth-identity-chaining"/>
          defines Claims Transcription — the process by which Authorization
          Servers add, change, or remove claims when producing JWT
          authorization grants or access tokens during cross-domain flows.
          That specification explicitly leaves the representation of
          transcribed claims undefined: "The representation of transcribed
          claims and their format is not defined in this specification."
        </t>

        <t>
          The <tt>delegation_chain</tt> claim provides one such
          representation.  When delegation crosses a trust domain boundary,
          each delegation record captures the transcribed policy
          (when present, <tt>delegated_policy</tt>) and the cryptographic evidence of the
          transcribing party (the AS via <tt>as_signature</tt>, and — when
          present — the delegator via <tt>delegator_signature</tt>).  This enables the receiving
          domain to verify not just <em>what</em> was transcribed but
          <em>who authorized the transcription</em> and under what
          constraints — closing the representation gap left by identity
          chaining.
        </t>

        <t>
          Implementations using identity chaining for cross-domain delegation
          SHOULD include the <tt>delegation_chain</tt> claim in the JWT
          authorization grant as a structured Claims Transcription format,
          enabling the receiving AS to validate the delegation lineage before
          issuing a local access token.
        </t>
      </section>
    </section>

    <section anchor="terminology" title="Terminology">
      <dl>
        <dt>Delegator:</dt>
        <dd>
          An agent that transfers a subset of its authorization to another agent.
        </dd>

        <dt>Delegatee:</dt>
        <dd>
          An agent that receives delegated authorization from a delegator.
        </dd>

        <dt>Delegation Hop:</dt>
        <dd>
          A single transfer of authorization from one agent to another.
        </dd>

        <dt>Delegation Chain:</dt>
        <dd>
          An ordered sequence of delegation hops from the most recent back to 
          the original authorization.
        </dd>

        <dt>Root Authorization:</dt>
        <dd>
          The original authorization granted by a human principal, from which
          all delegations derive.
        </dd>

        <dt>Workload Identity Token (WIT):</dt>
        <dd>
          A token that cryptographically attests to the identity of a workload
          or agent, typically issued by a workload identity provider. A WIT URI
          is a URI that identifies a specific agent and references the WIT
          bound to that agent's identity.
        </dd>

        <dt>Agent Identifier:</dt>
        <dd>
          A URI used to identify a delegating or delegatee agent in a
          delegation record.  This specification defines two URI schemes
          for agent identifiers: WIT URIs (<tt>wit://</tt>) and SPIFFE
          IDs (<tt>spiffe://</tt>).
          The identifier MUST be resolvable to a verifiable public key
          for signature verification when
          <tt>delegator_signature</tt> is present.
        </dd>
      </dl>
    </section>

    <section anchor="delegation-chain-claim" title="The delegation_chain Claim">
      <section title="Claim Definition">
        <dl>
          <dt>Claim Name:</dt>
          <dd>delegation_chain</dd>

          <dt>Claim Type:</dt>
          <dd>Array of Objects</dd>

          <dt>Usage:</dt>
          <dd>Access tokens (JWT format)</dd>

          <dt>Specification:</dt>
          <dd><xref target="RFC7519"/> (JWT)</dd>
        </dl>
      </section>

      <section title="Structure">
        <t>
          The <tt>delegation_chain</tt> is an ordered array of delegation records,
          from most recent to earliest. Each record represents one delegation hop.
        </t>

        <t>
          The following example shows a
          delegation record with WIT-based agent identifiers, a
          machine-enforceable structured policy, a root evidence reference,
          and dual signatures:
        </t>

        <figure>
          <artwork name="Delegation record example" type="json"><![CDATA[
{
  "delegation_chain": [
    {
      "delegator_id": "wit://agent-a.example/sha256.aaa111...",
      "delegatee_id": "wit://agent-b.example/sha256.bbb222...",
      "delegation_timestamp": 1734516900,
      "root_evidence_ref": "evidence-root-abc123",
      "delegated_policy": {
        "type": "rego",
        "content": "package agent\ndefault allow = false\n\nallow {\n  input.action == \"inventory_check\"\n  input.item_id == \"123\"\n}",
        "entry_point": "allow"
      },
      "operation_summary": "Delegate inventory check for item 123",
      "delegator_signature": "eyJhbGciOiJFUzI1NiJ9..MEYCIQD...",
      "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDx..."
    }
  ]
}
          ]]></artwork>
        </figure>
      </section>

      <section anchor="delegation-lifecycle" title="Delegation Lifecycle">
        <t>
          A delegation record transitions through four phases during its lifecycle:
        </t>

        <ol>
          <li>
            <strong>Delegation Proposal Phase:</strong> The delegating agent
            creates a delegation proposal that includes the delegatee
            identity, the delegated scope, and — when structured policy is
            used — the delegated policy and operation context.
          </li>

          <li>
            <strong>Delegation Interaction Phase (CONDITIONAL):</strong>
            When the Authorization Server determines that user interaction is
            required before the delegation can be authorized — for example,
            when delegating to a new agent for the first time, when the
            delegation involves high-risk operations, or when the delegation
            crosses trust domain boundaries — the AS returns an
            <tt>interaction_required</tt> response as defined in
            <xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>.
            The delegating agent launches the interaction URI so the user can
            review and approve the delegation.  Upon user approval, the agent
            retries the delegation request.  This phase is skipped when the AS
            determines that no additional user interaction is needed (e.g., the
            delegation is covered by a standing authorization or the policy has
            been pre-approved).  Implementations that do not require
            user interaction MAY omit this phase entirely.
          </li>

          <li>
            <strong>Delegation Enforcement Phase:</strong> The Authorization
            Server validates the delegation request, verifies the delegator's
            token, confirms that any required user interaction has been
            completed, and signs the delegation record upon successful
            validation.  For the first delegation (User to Agent A), the AS
            MAY additionally verify the user's identity using an identity
            assertion grant
            (<xref target="I-D.ietf-oauth-identity-assertion-authz-grant"/>).
          </li>

          <li>
            <strong>Chain Propagation Phase:</strong> The signed delegation
            record is embedded into an access token's
            <tt>delegation_chain</tt> claim, enabling multi-hop propagation
            within or across trust domains.
          </li>
        </ol>

        <t>
          This four-phase model ensures cryptographic binding between user
          authorization, agent identity, and policy constraints throughout
          the delegation chain, with explicit user interaction support when
          required.
        </t>
      </section>

      <section title="Field Definitions">
        <table anchor="tbl-delegation-chain-fields">
          <name>delegation_chain Record Fields</name>
          <thead>
            <tr>
              <th>Field</th>
              <th>Type</th>
              <th>Requirement</th>
              <th>Description</th>
            </tr>
          </thead>
          <tbody>

            <tr>
              <td>delegator_id</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>
                A URI identifying the delegating agent.  This
                specification defines two URI schemes:
                <tt>wit://</tt> (WIT URI) and <tt>spiffe://</tt>
                (SPIFFE ID).  The URI MUST be resolvable to a
                verifiable public key for
                <tt>delegator_signature</tt> verification.
              </td>
            </tr>
            <tr>
              <td>delegatee_id</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>
                A URI identifying the receiving agent.  The same
                URI scheme considerations as
                <tt>delegator_id</tt> apply.
              </td>
            </tr>
            <tr>
              <td>delegation_timestamp</td>
              <td>NumericDate</td>
              <td>REQUIRED</td>
              <td>When this delegation was authorized.</td>
            </tr>
            <tr>
              <td>scope</td>
              <td>string</td>
              <td>OPTIONAL</td>
              <td>
                The delegated scope at this hop, expressed as a
                space-delimited list of scope values
                (<xref target="RFC6749"/>, Section 3.3).  When present,
                this field captures the scope explicitly authorized by
                the delegator and is included in the signature
                computation to prevent scope expansion by a compromised
                AS.  When omitted, the delegated scope is conveyed
                through the access token's <tt>scope</tt> claim and
                the <tt>delegated_policy</tt> field (if present).
              </td>
            </tr>
            <tr>
              <td>delegated_policy</td>
              <td>object</td>
              <td>OPTIONAL</td>
              <td>
                A machine-readable expression of the authorization
                constraints that apply to this delegation hop.  The
                delegated policy MUST be equal to or more restrictive
                than the delegator's policy; policy or scope expansion is NOT
                allowed.  See below for deployment-specific structure.
              </td>
            </tr>
            <tr>
              <td>operation_summary</td>
              <td>string</td>
              <td>OPTIONAL</td>
              <td>Human-readable description of delegated operation.</td>
            </tr>
            <tr>
              <td>root_evidence_ref</td>
              <td>string</td>
              <td>CONDITIONAL</td>
              <td>
                An opaque identifier referencing the root authorization
                event — the original consent granted by the human
                principal from which all delegations in the chain
                derive.  This field MUST be present for the first
                delegation (User to Agent A) when structured evidence
                is used and
                SHOULD be propagated through the chain.  The format of
                the identifier and the mechanism for resolving it are
                deployment-specific: implementations using a structured
                authorization evidence model (such as the one described
                in <xref target="I-D.liu-oauth-authorization-evidence"/>)
                SHOULD set this value to the <tt>evidence.id</tt> from
                the root token; other deployments MAY use any stable,
                unique identifier (e.g., a consent record ID or an
                audit log entry reference) that enables post-hoc
                retrieval of the original authorization context.  Implementations not using structured authorization evidence MAY omit this field.
              </td>
            </tr>
            <tr>
              <td>delegator_signature</td>
              <td>string</td>
              <td>RECOMMENDED</td>
              <td>
                Cryptographic signature from the delegating agent's
                private key over this delegation record.  This provides
                dual-signature security alongside
                <tt>as_signature</tt>, preventing a malicious AS from
                forging unauthorized delegations and ensuring
                non-repudiation.  Implementations SHOULD
                include this field on every delegation record.  It MAY be
                omitted when the AS is the sole trust anchor and the
                deployment does not require independent delegator
                non-repudiation.
              </td>
            </tr>
            <tr>
              <td>as_signature</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>AS signature over this delegation record.</td>
            </tr>
          </tbody>
        </table>

        <t>
          The structure of the <tt>delegated_policy</tt> field depends
          on the deployment profile:
        </t>
        <ul>
          <li>
            <strong>Scope-based (typical):</strong> This field is typically
            absent.  The delegation is governed solely by the OAuth
            <tt>scope</tt> parameter, and the Resource Server applies
            scope-based authorization.  When this field is absent, the
            Resource Server MUST apply scope-based authorization only.
          </li>
          <li>
            <strong>Structured policy:</strong> This field carries a
            machine-enforceable policy.  The policy language and
            comparison mechanism are implementation-specific:
            implementations MAY use a Rego policy structure (with
            <tt>type</tt>, <tt>content</tt>, and
            <tt>entry_point</tt> sub-fields, as described in
            <xref target="I-D.liu-oauth-rego-policy"/>), ALFA
            (Attribute-based Logical Framework for Authorization),
            XACML, or any other policy representation agreed upon
            by the delegator and the Authorization Server.
          </li>
        </ul>

        <t>
          The <tt>delegation_timestamp</tt> MUST satisfy the following
          constraints:
        </t>
        <ul>
          <li>
            It MUST be less than or equal to the access token's
            <tt>iat</tt> (issued at) claim, since the delegation event
            occurs before or at the time the token is issued;
          </li>
          <li>
            It MUST be greater than or equal to the
            <tt>delegation_timestamp</tt> of the preceding delegation
            record (the record at the next higher array index), ensuring
            that timestamps are monotonically non-increasing from index 0
            (most recent) to index N (earliest);
          </li>
          <li>
            It MUST be within the validity period of the delegator's
            token at the time of the delegation request (i.e., greater
            than or equal to the delegator token's <tt>iat</tt> and
            less than or equal to the delegator token's <tt>exp</tt>).
          </li>
          <li>
            At the time the AS processes the delegation request, the
            timestamp SHOULD be within an acceptable freshness window
            relative to the AS's current time.  A RECOMMENDED maximum
            skew is 5 minutes in either direction.  Timestamps outside
            this window SHOULD be rejected to mitigate replay attacks
            (see <xref target="security"/>).
          </li>
        </ul>

        <t>
          The <tt>as_signature</tt>, and the <tt>delegator_signature</tt> when
          present, MUST be computed over the same set of fields using JSON
          Canonicalization Scheme 
          (JCS) as defined in <xref target="RFC8785"/>:
        </t>

        <ul>
          <li><tt>delegator_id</tt></li>
          <li><tt>delegatee_id</tt></li>
          <li><tt>delegation_timestamp</tt></li>
          <li><tt>scope</tt> (if present)</li>
          <li><tt>delegated_policy</tt> (if present)</li>
          <li><tt>operation_summary</tt> (if present)</li>
          <li><tt>root_evidence_ref</tt> (if present)</li>
        </ul>

        <t>
          Both signature fields MUST be excluded from their respective signature 
          computations. The signatures MUST use detached JWS format
          (<xref target="RFC7515"/> Appendix F) with appropriate
          algorithm identifiers (e.g., RS256, ES256).
        </t>

        <t>
          When the <tt>delegator_signature</tt> is present (RECOMMENDED),
          it uses the delegating agent's agent-identifier-bound
          private key, while <tt>as_signature</tt> uses the Authorization Server's
          signing key. This dual-signature approach, when both signatures are
          present, ensures:
        </t>

        <ul>
          <li>
            <strong>Malicious AS Prevention:</strong> A compromised AS cannot 
            unilaterally forge delegations without the delegator's consent;
          </li>
          <li>
            <strong>Non-Repudiation:</strong> The delegator cannot deny having 
            authorized the delegation;
          </li>
          <li>
            <strong>Complete Trust Chain:</strong> User → AS → Delegator → Delegatee.
          </li>
        </ul>
      </section>

      <section title="Key Resolution for Agent Identifiers">
        <t>
          The <tt>delegator_signature</tt> (and any verification of the
          delegatee's identity) requires the relying party to resolve
          the agent identifier to a verifiable public key.  The
          resolution mechanism depends on the URI scheme used in the
          <tt>delegator_id</tt> or <tt>delegatee_id</tt> field:
        </t>

        <ul>
          <li>
            <strong>wit://</strong>: The WIT URI is resolved via the
            workload identity provider's attestation bundle, which
            contains or references the agent's public key (e.g., via
            SPIFFE bundle endpoints);
          </li>
          <li>
            <strong>spiffe://</strong>: The SPIFFE ID is resolved via
            the SPIFFE Bundle Endpoint protocol, which provides the
            agent's X.509-SVID or JWT-SVID containing the public key.
          </li>
        </ul>

        <t>
          Implementations SHOULD document the supported URI schemes and
          their resolution mechanisms in deployment-specific
          configuration.  If the relying party cannot resolve the agent
          identifier to a trusted public key, it MUST treat the
          <tt>delegator_signature</tt> as unverifiable.
        </t>
      </section>

      <section title="Chain Ordering">
        <t>
          The array MUST be ordered from most recent delegation to earliest:
        </t>

        <ul>
          <li>Index 0: Most recent delegation (delegator → current token holder)</li>
          <li>Index N: Earliest delegation (first agent after human authorization)</li>
        </ul>

        <t>
          This ordering allows efficient validation starting from the immediate 
          delegator.
        </t>
      </section>
    </section>

    <section anchor="delegation-interaction" title="Delegation with User Interaction">
      <t>
        This section defines the delegation flow with explicit user
        interaction, used when the Authorization Server determines that
        user consent is required before delegation. This flow extends the
        JWT Authorization Grant Interaction Response
        (<xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>)
        to OAuth 2.0 Token Exchange requests
        (<xref target="RFC8693"/>, <tt>grant_type=token-exchange</tt>).
      </t>

      <t>
        The user interaction mechanism ensures that delegation decisions
        remain under user control even in complex multi-agent scenarios. When the Authorization Server determines
        that user interaction is required, the flow includes an explicit
        consent step before token issuance.
      </t>

      <figure>
        <artwork name="Delegation with User Interaction Flow" type="ascii-art"><![CDATA[
+--------+       +---------+       +--------+       +---------+       +---------+
|  User  |       | Agent A |       |   AS   |       | Agent B |       |   RS    |
+--------+       +---------+       +--------+       +---------+       +---------+
    |                 |                 |                |                 | 
    | (1) Initial     |                 |                |                 | 
    |  Authorization  |                 |                |                 | 
    |  (OAuth flow)   |                 |                |                 |
    |---------------> |                 |                |                 |
    |                 |                 |                |                 |
    |                 | (2) Token A     |                |                 |
    |                 |  (root, no      |                |                 | 
    |                 |   chain)        |                |                 | 
    |                 |<----------------|                |                 | 
    |                 |                 |                |                 | 
    |                 | (3) Token Exchange (delegation)  |                 | 
    |                 |---------------->|                |                 | 
    |                 |  - subject_token                 |                 | 
    |                 |  - delegatee_id                  |                 | 
    |                 |  - authorization_details         |                 | 
    |                 |                 |                |                 | 
    |                 | (4) AS determines user interaction required        | 
    |                 |     interaction_required         |                 | 
    |                 |     interaction_uri              |                 | 
    |                 |     interval=5                   |                 | 
    |                 |<----------------|                |                 | 
    |                 |                 |                |                 | 
    | (5) Launch      |                 |                |                 | 
    |  interaction    |                 |                |                 | 
    |<----------------|                 |                |                 | 
    |                 |                 |                |                 | 
    | (6) Review &    |                 |                |                 | 
    |  Approve        |                 |                |                 | 
    |  delegation     |                 |                |                 | 
    |---------------------------------->|                |                 | 
    |                 |                 |                |                 | 
    |                 | (7) Redirect    |                |                 | 
    |                 |<----------------|                |                 | 
    |                 |                 |                |                 | 
    |                 | (8) Retry Token Exchange         |                 | 
    |                 |---------------->|                |                 | 
    |                 |                 |                |                 | 
    |                 |                 | (9) Validate   |                 | 
    |                 |                 | - Interaction  |                 | 
    |                 |                 |   completed    |                 | 
    |                 |                 | - Token A valid|                 | 
    |                 |                 | - Scope subset |                 | 
    |                 |                 |                |                 | 
    |                 |                 | (10) Issue Token B               |
    |                 |                 |--------------->|                 |
    |                 |                 | with delegation_chain            |
    |                 |                 |                |                 | 
    |                 |                 |                | (11) API Request| 
    |                 |                 |                |---------------->| 
    |                 |                 |                |                 | 
    |                 |                 |                |  (12) Validate  | 
    |                 |                 |                |   chain         | 
    |                 |                 |                |<----------------| 
        ]]></artwork>
      </figure>

      <section title="Step 1-2: Initial Authorization">
        <t>
          Agent A obtains authorization from the user through a standard OAuth
          flow. The resulting token does not contain a <tt>delegation_chain</tt>
          (it is the root authorization).
        </t>
      </section>

      <section anchor="step3-delegation-request" title="Step 3: Delegation Request">
        <t>
          Agent A initiates delegation using OAuth 2.0 Token Exchange
          <xref target="RFC8693"/>. The request includes delegation-specific
          parameters to identify the delegatee and the delegated policy.
        </t>

        <t>
          The following example shows a
          delegation request with WIT-based agent identity, client
          attestation, and a structured policy carried via
          <tt>authorization_details</tt>:
        </t>

        <figure>
          <artwork name="Delegation Request (with structured policy)" type="http"><![CDATA[
POST /token HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
OAuth-Client-Attestation: eyJ0eXAiOiJ3aXQrand0IiwiYWxnIjoiRVMyNTYifQ...
OAuth-Client-Attestation-PoP: eyJ0eXAiOiJvYXV0aC1jbGllbnQtYXR0ZXN0...

grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange
&subject_token=eyJhbGciOiJSUzI1NiJ9...
&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token
&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token
&scope=cart%3Aread
&authorization_details=%5B%7B%22type%22%3A%22rego_policy%22%2C%22policy%22
  %3A%7B%22type%22%3A%22rego%22%2C%22content%22%3A%22package+agent...%22%2C
  %22entry_point%22%3A%22allow%22%7D%7D%5D
&delegatee_id=wit%3A%2F%2Fagent-b.example%2Fsha256.bbb222...
          ]]></artwork>
        </figure>

        <t>
          This specification defines the following extension parameter
          for use with Token Exchange <xref target="RFC8693"/> requests:
        </t>

        <dl>
          <dt>delegatee_id:</dt>
          <dd>
            REQUIRED for delegation requests. A URI identifying
            the agent receiving the delegated authorization.
            Implementations SHOULD use a WIT URI when workload identity
            attestation is available, but MAY use other URI schemes
            (see <xref target="tbl-delegation-chain-fields"/>). The AS
            uses this value to bind the issued token to the delegatee's
            identity and to populate the <tt>delegatee_id</tt> field
            in the <tt>delegation_chain</tt> record.
          </dd>
        </dl>

        <t>
          The standard and extension parameters in the request are:
        </t>

        <ul>
          <li>
            <tt>subject_token</tt>: Agent A's current access token;
          </li>
          <li>
            <tt>subject_token_type</tt>:
            <tt>urn:ietf:params:oauth:token-type:access_token</tt>;
          </li>
          <li>
            <tt>authorization_details</tt> (OPTIONAL): Carries the delegated
            policy in a structured format (e.g., type "rego_policy"), which
            MUST be equal to or more restrictive than Agent A's policy;
          </li>
          <li>
            <tt>delegatee_id</tt>: The agent identifier URI of the delegatee agent
            (Agent B);
          </li>
          <li>
            <tt>scope</tt> (OPTIONAL): Requested scope for the
            delegated token, which MUST be a subset of Agent A's scope.
          </li>
          <li>
            <tt>requested_token_type</tt> (OPTIONAL): Defaults to
            <tt>urn:ietf:params:oauth:token-type:access_token</tt>.
            Implementations MAY request JWT format using
            <tt>urn:ietf:params:oauth:token-type:jwt</tt>.
          </li>
          <li>
            <tt>resource</tt> (OPTIONAL): The identifier of the target
            Authorization Server when the delegation crosses a trust domain
            boundary, as defined in <xref target="I-D.ietf-oauth-identity-chaining"/>.
            When present, the AS issues a JWT authorization grant suitable for
            presentation to the target AS instead of a direct access token.
          </li>
          <li>
            <tt>audience</tt> (OPTIONAL): A well-known or logical name of
            the target Authorization Server, as an alternative to
            <tt>resource</tt> for cross-domain delegation. One of
            <tt>resource</tt> or <tt>audience</tt> is REQUIRED when the
            delegation targets an agent in a different trust domain.
          </li>
          <li>
            <tt>interaction_callback_uri</tt> (OPTIONAL): The URI to which the AS will
            redirect the user's browser after a delegation interaction is
            complete, as defined in
            <xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>.
            This parameter is used in conjunction with the
            <tt>interaction_required</tt> response to signal
            the client that user interaction has been completed.
          </li>
        </ul>
      </section>

      <section anchor="when-interaction-required" title="Step 4: User Interaction Required">
        <t>
          When the Authorization Server determines that user interaction
          is required (see
          <xref target="interaction-trigger-criteria"/> for the
          decision criteria), the AS responds with an
          <tt>interaction_required</tt> error containing:
        </t>
        <ul>
          <li><tt>interaction_uri</tt>: The URI where the user reviews and approves the delegation;</li>
          <li><tt>interval</tt>: The minimum polling interval in seconds (default: 5);</li>
          <li><tt>expires_in</tt>: The number of seconds until the interaction session expires.</li>
        </ul>

        <t>
          <xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/> defines
          the interaction response mechanism for the JWT Authorization Grant
          (RFC 7523, <tt>grant_type=jwt-bearer</tt>). This specification extends
          that interaction response to apply to OAuth 2.0 Token Exchange requests
          (<xref target="RFC8693"/>, <tt>grant_type=token-exchange</tt>) used for
          delegation. The same response semantics are applicable to Token Exchange
          requests. The AS associates the interaction session with the Token Exchange
          request parameters (including the <tt>subject_token</tt>,
          <tt>delegatee_id</tt>, and requested delegation policy) so that upon
          user approval, the same Token Exchange request can be retried to
          obtain the delegated token.
        </t>
      </section>

      <section anchor="interaction-flow" title="Steps 5-7: User Review and Approval">
        <t>
          Agent A launches the <tt>interaction_uri</tt> in the user's browser,
          where the AS presents the delegation details for user review:
        </t>
        <ul>
          <li>Identity of the delegatee agent (Agent B)</li>
          <li>Delegated policy and scope</li>
          <li>Operation summary</li>
          <li>Whether the delegation crosses trust domain boundaries</li>
        </ul>

        <t>
          The user reviews the delegation details and approves or denies
          the delegation request. If the client provided an
          <tt>interaction_callback_uri</tt>, the AS redirects the user's
          browser to that URI as a signal that the interaction is complete.
        </t>
      </section>

      <section anchor="step8-retry" title="Step 8: Retry Token Exchange">
        <t>
          Agent A retries the original Token Exchange request (with the
          same parameters). The AS recognizes the associated interaction
          session and proceeds with validation.
        </t>

        <t>
          While the interaction is pending, subsequent Token Exchange requests
          from Agent A with the same parameters SHOULD return an
          <tt>interaction_pending</tt> error. The agent MUST wait at least
          the number of seconds specified by the <tt>interval</tt> parameter
          between polling requests.
        </t>
      </section>

      <section title="Step 9: AS Validation">
        <t>
          The AS MUST perform the following validations:
        </t>

        <ol>
          <li>
            Interaction Completion (CONDITIONAL): When user interaction
            was required (see <xref target="when-interaction-required"/>),
            verify that it has been completed and approved for this
            delegation request. This step is skipped when the AS
            determines that no user interaction is needed.
          </li>
          <li>
            Token Validity: Verify Agent A's token is valid and
            not revoked.
          </li>
          <li>
            Delegation Permission: Confirm the token permits
            delegation (e.g., includes a delegation scope or flag).
          </li>
          <li>
            Scope Subset: Verify the requested scope is a subset of
            Agent A's authorized scope (equal to or narrower).
          </li>
          <li>
            Delegatee Authentication: Validate Agent B's agent
            identifier (<tt>delegatee_id</tt>) to
            confirm the delegatee is authentic and currently active.
          </li>
          <li>
            Chain Depth: Optionally enforce maximum delegation
            depth.
          </li>
          <li>
            Request Freshness: Reject the delegation request if the
            <tt>delegation_timestamp</tt> in the proposal (or the
            request time as observed by the AS) is outside an
            acceptable time window.  A RECOMMENDED maximum skew is 5
            minutes.  This prevents replay of previously captured
            delegation requests.
          </li>
        </ol>
      </section>

      <section title="Step 10: Token Issuance">
        <t>
          Upon successful validation, the AS issues a new token for Agent B with:
        </t>

        <ul>
          <li><tt>sub</tt>: The original user (unchanged)</li>
          <li><tt>act</tt>: Agent B's identity</li>
          <li><tt>delegation_chain</tt>: Extended with a new record for this hop</li>
          <li>Reduced scope (as requested)</li>
        </ul>
      </section>

      <section title="Steps 11-12: API Request and Validation">
        <t>
          Agent B uses the delegated token to access resources at the Resource
          Server (RS). The RS validates the token and verifies the
          <tt>delegation_chain</tt> as defined in
          <xref target="rs-validation"/>.
        </t>
      </section>

      <section anchor="interaction-trigger-criteria" title="When to Require Interaction">
        <t>
          The Authorization Server has discretion in determining when the
          Delegation Interaction Phase is triggered. The following guidance
          is provided to help AS implementations make consistent decisions:
        </t>

        <ul>
          <li>
            <strong>First-time delegation to a new agent:</strong> When the
            delegatee agent has not been previously authorized by the user,
            interaction SHOULD be required to ensure the user is aware of
            and consents to the new delegation relationship.
          </li>
          <li>
            <strong>High-risk operations:</strong> When the delegated policy
            includes operations classified as high-risk (e.g., financial
            transactions, data deletion, access to sensitive resources),
            interaction SHOULD be required regardless of whether the agent
            has been previously authorized.
          </li>
          <li>
            <strong>Cross-domain delegation:</strong> When a delegation hop
            crosses a trust domain boundary, interaction SHOULD be required
            unless a pre-established cross-domain trust agreement covers the
            specific delegation pattern.
          </li>
          <li>
            <strong>Standing authorization:</strong> When the user has
            previously granted a standing authorization that explicitly
            covers the delegation pattern (e.g., "Agent A may delegate
            inventory operations to any agent in the inventory.example.com
            domain"), interaction MAY be skipped.
          </li>
          <li>
            <strong>Policy pre-approval:</strong> When the delegated policy
            is equal to or more restrictive than a previously user-approved
            policy for the same delegatee, interaction MAY be skipped.
          </li>
        </ul>
      </section>
    </section>

    <section anchor="protocol-flow" title="Delegation without User Interaction">
      <t>
        In scenarios where user interaction is not required — for example, when
        the delegation is covered by a standing authorization or the policy has
        been pre-approved — the AS MAY skip the user interaction step and proceed
        directly with token issuance. This simplified flow reduces latency and
        user friction for routine delegation scenarios.
      </t>

      <t>
        When none of the conditions listed in
        <xref target="interaction-trigger-criteria"/> apply, the AS responds to the
        Token Exchange request with a success response containing the delegated
        token, bypassing the <tt>interaction_required</tt> step.
      </t>

      <figure>
        <artwork name="Simplified Delegation Flow (No User Interaction)" type="ascii-art"><![CDATA[
+--------+       +---------+       +--------+       +---------+       +---------+
|  User  |       | Agent A |       |   AS   |       | Agent B |       |   RS    |
+--------+       +---------+       +--------+       +---------+       +---------+
    |                 |                 |                |                 | 
    | (1) Initial     |                 |                |                 | 
    |  Authorization  |                 |                |                 | 
    |  (OAuth flow)   |                 |                |                 | 
    |---------------->|                 |                |                 |
    |                 |                 |                |                 |
    |                 | (2) Token A     |                |                 |
    |                 |  (root, no      |                |                 |
    |                 |   chain)        |                |                 |
    |                 |<----------------|                |                 |
    |                 |                 |                |                 |
    |                 | (3) Token Exchange (delegation)  |                 |
    |                 |---------------->|                |                 |
    |                 |  - subject_token                 |                 |
    |                 |  - delegatee_id                  |                 |
    |                 |  - authorization_details         |                 |
    |                 |                 |                |                 |
    |                 |                 | (4) Validate   |                 |
    |                 |                 | - Token A valid|                 |
    |                 |                 | - Scope subset |                 |
    |                 |                 | - Standing auth|                 |
    |                 |                 |   or pre-approved                |
    |                 |                 |                |                 |
    |                 |                 | (5) Issue Token B                |
    |                 |                 |--------------->|                 |
    |                 |                 | with delegation_chain            |
    |                 |                 |                |                 | 
    |                 |                 |                |  (6) API Request|
    |                 |                 |                |---------------->| 
    |                 |                 |                |                 | 
    |                 |                 |                |  (7) Validate   |
    |                 |                 |                |   chain         | 
    |                 |                 |                |<----------------| 
        ]]></artwork>
      </figure>

      <t>
        The Token Exchange request format, parameters, and validation rules are
        identical to those defined in <xref target="delegation-interaction"/>.
        The only difference is that the AS does not require user interaction
        before issuing the delegated token.
      </t>

      <t>
        This simplified flow is appropriate when:
      </t>
      <ul>
        <li>The delegation is covered by a standing authorization previously granted by the user;</li>
        <li>The delegated policy is equal to or more restrictive than a previously user-approved policy;</li>
        <li>The delegation does not cross trust domain boundaries;</li>
        <li>The delegation does not involve high-risk operations;</li>
        <li>No regulatory requirements mandate explicit user consent.</li>
      </ul>

      <t>
        Authorization Servers SHOULD log all decisions to skip user
        interaction as part of their audit trail.  Implementations
        using structured authorization evidence (as
        described in <xref target="I-D.liu-oauth-authorization-evidence"/>
        or a deployment-specific model) SHOULD
        record the skip decision in the <tt>audit_trail</tt> claim;
        other deployments MAY record it in an application-specific
        audit log.
      </t>
    </section>
    <section anchor="chain-extension" title="Chain Extension">
      <t>
        When the AS issues a delegated token, it extends the delegation_chain:
      </t>

      <section title="Evidence Propagation">
        <t>
          When the AS issues a delegated token within the same trust
          domain and structured authorization evidence is used, it
          SHOULD propagate the <tt>evidence</tt> and
          <tt>audit_trail</tt> claims from the subject token (or root
          token) into the newly issued delegated token.  This ensures that Resource Servers can verify the
          original user consent without needing to retrieve the root
          token separately.  When evidence is propagated, the
          <tt>root_evidence_ref</tt> field in each delegation record
          SHOULD match the <tt>evidence.id</tt> value in the propagated
          evidence claim.  For cross-domain evidence propagation, see
          <xref target="cross-domain"/>.
        </t>

        <t>
          Implementations not using structured authorization evidence
          are not required to carry <tt>evidence</tt> or
          <tt>audit_trail</tt> claims.  In
          deployments that do not use structured authorization evidence,
          the <tt>root_evidence_ref</tt> field (when present) serves as
          an opaque reference to the original authorization event,
          resolvable through deployment-specific mechanisms such as an
          audit log query or a consent management API.
        </t>
      </section>

      <section title="For First Delegation">
        <t>
          If Agent A's token has no delegation_chain (root authorization), the
          AS creates a new chain with one entry.  The following shows an
          <strong>extended</strong> first delegation record:
        </t>

        <figure>
          <artwork name="First delegation (extended)" type="json"><![CDATA[
{
  "delegation_chain": [
    {
      "delegator_id": "wit://agent-a.example/sha256.aaa111...",
      "delegatee_id": "wit://agent-b.example/sha256.bbb222...",
      "delegation_timestamp": 1734516900,
      "root_evidence_ref": "evidence-root-abc123",
      "delegated_policy": {
        "type": "rego",
        "content": "package agent\ndefault allow = false\n\nallow {\n  input.action == \"cart_op\"\n}",
        "entry_point": "allow"
      },
      "operation_summary": "Delegate cart operations",
      "delegator_signature": "eyJhbGciOiJFUzI1NiJ9..MEYCIQD...",
      "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDx..."
    }
  ]
}
          ]]></artwork>
        </figure>

        <t>
          A minimal equivalent would carry only
          <tt>delegator_id</tt>, <tt>delegatee_id</tt>,
          <tt>delegation_timestamp</tt>, <tt>operation_summary</tt>,
          and <tt>as_signature</tt>, with the delegated scope expressed
          via the token's <tt>scope</tt> claim (e.g.,
          <tt>cart:read</tt>).
        </t>
      </section>

      <section title="For Subsequent Delegations">
        <t>
          If Agent B further delegates to Agent C, the AS prepends a new
          record.  The following shows an <strong>extended</strong>
          two-hop chain:
        </t>

        <figure>
          <artwork name="Multi-hop delegation (extended)" type="json"><![CDATA[
{
  "delegation_chain": [
    {
      "delegator_id": "wit://agent-b.example/sha256.bbb222...",
      "delegatee_id": "wit://agent-c.example/sha256.ccc333...",
      "delegation_timestamp": 1734517800,
      "root_evidence_ref": "evidence-root-abc123",
      "delegated_policy": {
        "type": "rego",
        "content": "package agent\ndefault allow = false\n\nallow {\n  input.action == \"inventory_check\"\n  input.item_id == \"123\"\n}",
        "entry_point": "allow"
      },
      "operation_summary": "Check inventory for item 123",
      "delegator_signature": "eyJhbGciOiJFUzI1NiJ9..MEYCIQD...",
      "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDx..."
    },
    {
      "delegator_id": "wit://agent-a.example/sha256.aaa111...",
      "delegatee_id": "wit://agent-b.example/sha256.bbb222...",
      "delegation_timestamp": 1734516900,
      "root_evidence_ref": "evidence-root-abc123",
      "delegated_policy": {
        "type": "rego",
        "content": "package agent\ndefault allow = false\n\nallow {\n  input.action == \"cart_op\"\n}",
        "entry_point": "allow"
      },
      "operation_summary": "Delegate cart operations",
      "delegator_signature": "eyJhbGciOiJFUzI1NiJ9..MEYCIQD1...",
      "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDx..."
    }
  ]
}
          ]]></artwork>
        </figure>

        <t>
          With scope-based delegation, the same two-hop chain
          would omit <tt>delegated_policy</tt>,
          <tt>delegator_signature</tt>, and
          <tt>root_evidence_ref</tt> from each record.  The scope
          narrowing (e.g., <tt>cart:read inventory:read</tt> to
          <tt>inventory:read:item:123</tt>) is expressed solely via
          each delegated token's <tt>scope</tt> claim.
        </t>
      </section>
    </section>

    <section anchor="cross-domain" title="Cross-Domain Delegation">
      <t>
        When delegation hops span multiple trust domains — each with its own
        Authorization Server — this specification combines the
        <tt>delegation_chain</tt> mechanism with the cross-domain transport
        pattern defined in <xref target="I-D.ietf-oauth-identity-chaining"/>.
      </t>

      <section title="Cross-Domain Delegation Flow">
        <t>
          Consider an agent in Trust Domain A that needs to delegate a subset
          of its authorization to an agent in Trust Domain B:
        </t>

        <figure>
          <artwork name="Cross-Domain Delegation Flow" type="ascii-art"><![CDATA[
+-------+  +-------+  +-------+  +-------+  +-------+       +-------+
| User  |  |Agent A|  | AS-A  |  |Agent B|  | AS-B  |       | RS-B  |
+-------+  +-------+  +-------+  +-------+  +-------+       +-------+
     |          |          |          |          |              |   
     | (1) Auth |          |          |          |              |   
     |--------->|          |          |          |              |   
     |          |          |          |          |              |   
     |          | (2) Token Exchange  |          |              |   
     |          |  (delegation +      |          |              |   
     |          |   resource=AS-B)    |          |              |   
     |          |--------->|          |          |              |   
     |          |          |          |          |              |   
     |          | (3) JWT  |          |          |              |   
     |          | Authoriz |          |          |              |   
     |          | Grant    |          |          |              |   
     |          |<---------|          |          |              |    
     |          |          |          |          |              |   
     |          | (3.5) Agent A transfers JWT Grant to Agent B  |
     |          |------------------------------->|              | 
     |          |          |          |          |              |
     |          |          |          |          |(4) Present JWT Grant
     |          |          |          |          |------------->|
     |          |          |          |          |              |
     |          |          |          |          |(5) Validate  | 
     |          |          |          |          |- JWT signatur|
     |          |          |          |          |- delegation  |
     |          |          |          |          |- policy      |
     |          |          |          |          |              |   
     |          |          |          |          |(6) Access    |   
     |          |          |          |          |  Token       |   
     |          |          |          |<---------|              |   
     |          |          |          |          |              |   
     |          |          |          |(7) API Req              |   
     |          |          |          |------------------------>|   
     |          |          |          |          |              |   
          ]]></artwork>
        </figure>

        <ol>
          <li>
            Agent A obtains initial authorization from the user in Trust
            Domain A (root authorization, no <tt>delegation_chain</tt>).
          </li>
          <li>
            Agent A initiates a delegation Token Exchange with AS-A,
            including the <tt>resource</tt> parameter set to AS-B's
            identifier (as defined in
            <xref target="I-D.ietf-oauth-identity-chaining"/>). This
            signals that the delegation targets an agent in Trust Domain B.
          </li>
          <li>
            AS-A validates the delegation, creates a delegation record,
            and returns a JWT authorization grant containing the
            <tt>delegation_chain</tt> claim. If user interaction is
            required, the interaction flow described in <xref target="delegation-interaction"/> is
            used before this step.
          </li>
          <li>
            Agent A transfers the JWT authorization grant to Agent B
            through an out-of-band mechanism (e.g., a secure internal
            channel).  Agent B presents the JWT authorization grant to
            AS-B using the JWT Bearer grant type
            (<xref target="RFC7523"/>), as defined in
            <xref target="I-D.ietf-oauth-identity-chaining"/>.
          </li>
          <li>
            AS-B validates the JWT grant signature, verifies the
            <tt>delegation_chain</tt> (including AS-A's signature on
            each record), and confirms policy narrowing constraints.
          </li>
          <li>
            AS-B issues an access token to Agent B for Trust Domain B,
            preserving the <tt>delegation_chain</tt> claim from the
            JWT authorization grant.
          </li>
          <li>
            Agent B uses the access token to access resources in Trust
            Domain B.
          </li>
        </ol>
      </section>

      <section title="Cross-Domain Trust Requirements">
        <t>
          For cross-domain delegation to function, the following trust
          requirements MUST be satisfied:
        </t>

        <ul>
          <li>
            <strong>AS Trust Relationship:</strong> AS-B MUST trust AS-A's
            signing key to verify <tt>as_signature</tt> on delegation records
            issued by AS-A. This trust relationship is typically established
            through key exchange or by publishing AS-A's public keys via
            Authorization Server Metadata (<xref target="RFC8414"/>).
          </li>
          <li>
            <strong>delegation_chain Propagation:</strong> AS-B MUST propagate
            the <tt>delegation_chain</tt> claim from the JWT authorization
            grant into the access token it issues, so that Resource Servers
            in Trust Domain B can validate the full delegation lineage.
          </li>
          <li>
            <strong>Evidence Propagation:</strong> AS-B SHOULD propagate the
            <tt>evidence</tt> and <tt>audit_trail</tt> claims from the JWT
            authorization grant, enabling Resource Servers in Trust Domain B
            to verify the original user consent without contacting AS-A.
            This is a SHOULD rather than a MUST because cross-domain
            evidence propagation may be constrained by data minimization
            policies, privacy regulations, or trust agreements between
            domains. When evidence is not propagated, Resource Servers in
            Trust Domain B MUST rely on back-channel verification with AS-A
            or AS-B to validate the original user consent.
          </li>
          <li>
            <strong>Policy Enforcement:</strong> AS-B MUST enforce that
            the delegated <tt>scope</tt> is equal to or narrower than
            the scope in the JWT authorization grant; scope expansion
            across domain boundaries is NOT permitted.  When the
            <tt>delegated_policy</tt> field is present, AS-B SHOULD
            additionally verify that the policy has not been expanded.
            The mechanism for policy comparison is implementation-
            specific: for simple policy representations, a structural
            comparison may suffice; for expressive policy languages
            such as Rego or ALFA, the receiving AS MAY rely on the originating
            AS's attestation (via <tt>as_signature</tt>) rather than
            performing an independent policy-subset check, which may be
            computationally intractable for arbitrary policies.
          </li>
        </ul>
      </section>

      <section title="Multi-Domain Chain Extension">
        <t>
          When a delegation chain spans multiple domains, each domain's AS
          may add delegation records to the chain. The cross-domain transport
          uses the identity chaining pattern (Token Exchange + JWT Bearer
          Grant) at each domain boundary, while the <tt>delegation_chain</tt>
          accumulates records from all domains.
        </t>

        <t>
          Resource Servers validating a cross-domain delegation chain MUST:
        </t>

        <ul>
          <li>
            Verify <tt>as_signature</tt> on each delegation record using the
            signing key of the AS that issued that record (which may differ
            across records);
          </li>
          <li>
            Verify trust relationships between all ASes referenced in the chain;
          </li>
          <li>
            Verify chain continuity and policy narrowing across domain boundaries.
          </li>
        </ul>
      </section>

      <section title="Claims Transcription for Delegation">
        <t>
          Section 2.5 of <xref target="I-D.ietf-oauth-identity-chaining"/>
          describes Claims Transcription — the process by which Authorization
          Servers add, change, or remove claims during cross-domain token
          flows — but leaves the representation of transcribed claims
          undefined.  The <tt>delegation_chain</tt> claim provides one such
          representation: when delegation crosses a trust domain boundary,
          each delegation record captures the transcribed policy
          (when present, <tt>delegated_policy</tt>), the identity mapping (delegator and
          delegatee identifiers), and the cryptographic evidence of both the
          transcribing AS (<tt>as_signature</tt>) and — when present — the
          delegating agent (<tt>delegator_signature</tt>).
        </t>

        <t>
          This enables the receiving domain's AS (AS-B) to verify not just
          <em>what</em> claims were transcribed but <em>who authorized the
          transcription</em> and under what constraints — closing the
          representation gap left by the base identity chaining
          specification.  AS-B SHOULD validate the <tt>delegation_chain</tt>
          records from AS-A as part of its Claims Transcription processing
          before issuing a local access token.
        </t>
      </section>
    </section>

    <section anchor="rs-validation" title="Resource Server Validation">
      <t>
        Resource Servers validate the delegation_chain as follows:
      </t>

      <section title="Signature Verification">
        <t>
          For each record in the chain, verify the <tt>as_signature</tt> using 
          the AS's public key. This ensures:
        </t>

        <ul>
          <li>The delegation was authorized by the AS;</li>
          <li>The record has not been tampered with;</li>
          <li>The delegation metadata is authentic.</li>
        </ul>
      </section>

      <section title="Root Authorization Anchor">
        <t>
          The last record in the chain (highest index) represents the earliest
          delegation. Its <tt>delegator_id</tt> identifies the agent that holds
          the root authorization (the token directly authorized by the user).
        </t>

        <t>
          The Resource Server SHOULD verify the root authorization
          anchor.  Since the RS typically observes only the delegated
          token (which carries the <tt>delegation_chain</tt>), it does
          not have direct access to the root token.  Verification can
          be performed through one or more of the following means:
        </t>

        <ul>
          <li>
            Using token introspection
            (<xref target="RFC7662"/>) to confirm that the earliest
            delegator (identified by the <tt>delegator_id</tt> of
            the last chain record) holds a valid, non-revoked root
            token issued by a trusted AS;
          </li>
          <li>
            Relying on the structural integrity of the
            <tt>delegation_chain</tt> itself — the AS that issued the
            delegated token has already verified the root token's
            validity at issuance time, and the
            <tt>as_signature</tt> on each record attests to that
            verification.
          </li>
        </ul>

        <t>
          In deployments using structured authorization evidence,
          the Resource Server SHOULD additionally
          verify that the root token contains valid <tt>evidence</tt>
          and <tt>audit_trail</tt> claims (as described in
          <xref target="I-D.liu-oauth-authorization-evidence"/> or an
          equivalent structured evidence model), providing cryptographic
          proof of user consent.  Deployments that do not carry
          structured evidence MAY rely on the
          <tt>root_evidence_ref</tt> field as an opaque pointer to the
          original authorization event, resolvable through
          deployment-specific mechanisms.
        </t>

        <t>
          If the RS cannot establish confidence in the root authorization
          anchor through any available mechanism, it SHOULD reject the
          request.
        </t>
      </section>

      <section title="Dual-Signature Verification">
        <t>
          For each delegation record, the Resource Server MUST verify
          the <tt>as_signature</tt> using the Authorization Server's
          public key.  When the <tt>delegator_signature</tt> field is
          present, the Resource Server SHOULD additionally verify it
          using the delegating agent's public key (resolved as
          described in the Key Resolution section above).
        </t>

        <ul>
          <li>
            <strong>AS Signature (MUST):</strong> Confirms the
            delegation was authorized by the AS and the record has not
            been tampered with;
          </li>
          <li>
            <strong>Delegator Signature (SHOULD when present):</strong>
            Confirms the delegator explicitly consented to this
            delegation, providing non-repudiation.
          </li>
        </ul>

        <t>
          When both signatures are present and verified, the
          dual-signature mechanism prevents:
        </t>

        <ul>
          <li>
            A malicious AS from unilaterally forging delegations;
          </li>
          <li>
            Delegators from denying authorized delegations (non-repudiation);
          </li>
          <li>
            Unauthorized privilege escalation through compromised components.
          </li>
        </ul>

        <t>
          Deployments that rely solely on
          <tt>as_signature</tt> accept the AS as the single trust
          anchor for delegation records.  This is appropriate when the
          AS is operated by a trusted authority and the deployment does
          not require independent delegator non-repudiation.
        </t>
      </section>

      <section title="Agent Identifier Status Validation">
        <t>
          The Resource Server SHOULD verify the current status of all
          agent identifiers referenced in the
          <tt>delegation_chain</tt>.  The verification mechanism
          depends on the identifier scheme:
        </t>

        <ul>
          <li>
            <strong>WIT URIs (wit://, spiffe://):</strong> Check WIT
            revocation lists or status endpoints, validate expiration
            timestamps, or query the issuing identity provider for
            current status.
          </li>
        </ul>

        <t>
          If any agent identifier in the chain has been revoked or its
          associated key material has expired, the entire
          <tt>delegation_chain</tt> MUST be considered invalid, even if
          individual records remain cryptographically valid.
        </t>
      </section>

      <section title="Chain Continuity">
        <t>
          Verify the chain is continuous:
        </t>

        <ul>
          <li>
            For each record at index <tt>i</tt> (where <tt>i &gt; 0</tt>),
            <tt>record[i].delegator_id</tt> MUST equal
            <tt>record[i-1].delegatee_id</tt>, ensuring that the agent
            who received authorization in one hop is the same agent that
            delegates in the next hop;
          </li>
          <li>
            The <tt>delegatee_id</tt> of the most recent delegation record
              (index 0) matches the token's <tt>act.sub</tt>;
          </li>
          <li>
            Timestamps are in descending order.
          </li>
        </ul>
      </section>

      <section title="Scope and Policy Validation">
        <t>
          The Resource Server validates that authorization constraints
          have not been expanded along the chain:
        </t>

        <ul>
          <li>
            <strong>Scope (MUST):</strong> The <tt>scope</tt> of each
            delegated token MUST be equal to or a subset of the scope
            of the preceding token in the chain.  The final token's
            scope MUST cover the requested operation.  Scope expansion
            at any hop invalidates the chain.
          </li>
          <li>
            <strong>Policy (CONDITIONAL):</strong> When
            the <tt>delegated_policy</tt> field is present, the
            Resource Server SHOULD verify that each hop's policy is
            equal to or more restrictive than its predecessor's policy.
            The mechanism for this comparison is implementation-
            specific.  For expressive policy languages where automated
            subset checking is computationally expensive or
            undecidable, the RS MAY rely on the AS's attestation
            (<tt>as_signature</tt>) as evidence that the AS already
            performed policy narrowing validation at issuance time.
          </li>
        </ul>
      </section>
    </section>

    <section anchor="security" title="Security Considerations">
      <section title="Threat Model">
        <t>
          This section describes the threat model underlying the
          <tt>delegation_chain</tt> mechanism and the security properties it
          provides.
        </t>

        <t>
          <strong>Trusted Entities:</strong>
        </t>
        <ul>
          <li>
            The Authorization Server (AS) is trusted to correctly validate
            delegation requests, enforce policy narrowing, and sign delegation
            records with its private key. The AS is the central trust anchor
            for the delegation chain.
          </li>
          <li>
            The human principal (end user) is trusted to make informed
            authorization decisions during consent and interaction flows.
          </li>
        </ul>

        <t>
          <strong>Adversary Capabilities:</strong>
        </t>
        <ul>
          <li>
            A <strong>malicious delegatee agent</strong> may attempt to
            present a token with a forged or truncated
            <tt>delegation_chain</tt> to claim authorization it does not
            possess.
          </li>
          <li>
            A <strong>malicious delegator agent</strong> may attempt to
            delegate more authorization than it was granted (privilege
            escalation), or may deny having authorized a delegation
            (repudiation).
          </li>
          <li>
            A <strong>compromised AS</strong> may attempt to forge
            delegation records without the delegator's consent.  When
            the dual-signature mechanism (delegator + AS) is used, it
            mitigates this threat; deployments that rely solely on
            <tt>as_signature</tt> accept the AS as the sole trust anchor
            and must ensure AS compromise detection through other
            operational controls.
          </li>
          <li>
            A <strong>network attacker</strong> may attempt to intercept or
            modify delegation records in transit. Standard TLS protections
            apply to all protocol messages.
          </li>
          <li>
            A <strong>token thief</strong> may attempt to steal a
            delegated access token (e.g., by compromising an agent's
            storage, intercepting a token in transit, or exploiting a
            side-channel) and present it to a Resource Server as if it
            were the legitimate delegatee.  The thief may also attempt
            to replay a previously captured delegation request to
            obtain a new token.
          </li>
          <li>
            A <strong>credential thief</strong> may attempt to steal an
            agent's workload identity credentials (e.g., WIT signing
            key, SPIFFE SVID, or client attestation key material) and
            impersonate the agent to obtain unauthorized delegations
            from the AS.  This threat is particularly severe in
            multi-hop chains, where a single compromised agent
            identity can be used to initiate new delegation paths.
          </li>
        </ul>

        <t>
          <strong>Security Objectives:</strong> The
          <tt>delegation_chain</tt> claim provides the following security
          properties:
        </t>
        <ul>
          <li>
            <strong>Integrity:</strong> Each delegation record is
            cryptographically signed by the AS (and, when present, the
            delegator), preventing undetected modification.
          </li>
          <li>
            <strong>Non-repudiation (CONDITIONAL):</strong> When the
            <tt>delegator_signature</tt> is present, it provides
            independent evidence that the delegation was explicitly
            authorized by the delegator.  When omitted, deployments
            rely on AS audit logs for non-repudiation.
          </li>
          <li>
            <strong>Scope compliance:</strong> Mandatory scope
            narrowing at each hop prevents privilege escalation through
            the chain.  When the <tt>delegated_policy</tt> field is
            present, policy narrowing provides
            additional fine-grained enforcement.
          </li>
          <li>
            <strong>Auditability:</strong> The complete chain from the
            current actor back to the original human principal enables
            end-to-end audit trail reconstruction.
          </li>
        </ul>
      </section>

      <section title="Privilege Escalation Prevention">
        <t>
          The AS MUST ensure that delegation cannot expand privileges:
        </t>

        <ul>
          <li>Delegated scope MUST be a subset of (equal to or narrower than) delegator's scope;</li>
          <li>Delegation depth MAY be limited;</li>
          <li>Certain scopes MAY be marked non-delegatable.</li>
        </ul>
      </section>

      <section title="Chain Integrity">
        <t>
          The <tt>as_signature</tt> on each record, together with the
          token-level JWT signature, ensures chain integrity through
          the following mechanisms:
        </t>

        <ul>
          <li>
            <strong>Forgery prevention:</strong> Agents cannot forge
            delegation records because the <tt>as_signature</tt>
            requires the AS's private signing key, which agents do not
            possess.
          </li>
          <li>
            <strong>Tamper detection:</strong> Agents cannot modify
            existing records because any change to the signed fields
            (including <tt>delegator_id</tt>, <tt>delegatee_id</tt>,
            <tt>scope</tt>, and <tt>delegated_policy</tt>) invalidates
            both the record-level <tt>as_signature</tt> and the
            token-level JWT signature.
          </li>
          <li>
            <strong>Record removal detection:</strong> Agents cannot
            remove records from the chain because the token-level JWT
            signature covers the entire <tt>delegation_chain</tt>
            claim as a single unit; any modification to the array
            length or contents invalidates the token signature.
          </li>
          <li>
            <strong>Reorder detection:</strong> Agents cannot reorder
            records because the token-level JWT signature covers the
            <tt>delegation_chain</tt> array in its exact serialized
            form; any reordering invalidates the token signature.
          </li>
        </ul>

        <t>
          Additionally, the Resource Server SHOULD verify that the
          <tt>delegation_timestamp</tt> on each record falls within a
          reasonable window relative to the token's <tt>iat</tt>
          (issued-at) claim.  Timestamps that significantly predate
          the token's issuance or fall in the future may indicate
          a manipulated or replayed delegation record.
        </t>
      </section>

      <section title="Chain Stripping Prevention">
        <t>
          A malicious agent may attempt to present a token with a truncated
          or empty <tt>delegation_chain</tt> to hide intermediate delegation
          hops. For example, an agent holding a token with chain
          [A→B→C] (three records: C←B, B←A, User→A) could attempt to
          present only the most recent record [C←B] or an empty chain,
          thereby concealing the earlier hops from the Resource Server.
        </t>

        <t>
          This attack is prevented by the following mechanisms:
        </t>

        <ul>
          <li>
            <strong>Token-level signature:</strong> The AS signs the entire
            access token (including the <tt>delegation_chain</tt> claim)
            using its private key. Any modification to the
            <tt>delegation_chain</tt> claim — including removal of records
            or replacement with a shorter chain — invalidates the token's
            signature. The Resource Server MUST reject tokens whose
            signature does not verify.
          </li>
        </ul>

        <t>
          For opaque (non-JWT) access tokens, the Resource Server MUST use
          token introspection (<xref target="RFC7662"/>) to retrieve the
          authoritative <tt>delegation_chain</tt> from the AS, rather than
          trusting any client-supplied chain data.
        </t>
      </section>

      <section title="Token Protection">
        <t>
          Delegated tokens are subject to replay and theft attacks.
          The following mitigations address both threats.
        </t>

        <t>
          <strong>Sender-constrained tokens:</strong> Implementations
          SHOULD bind issued access tokens to the delegatee's key
          material using one of the following mechanisms:
        </t>

        <ul>
          <li>
            <strong>DPoP</strong> (<xref target="RFC9449"/>): The
            delegatee presents a proof-of-possession JWT alongside the
            access token.  The Resource Server verifies that the DPoP
            proof's <tt>jkt</tt> thumbprint matches the key binding in
            the access token.
          </li>
          <li>
            <strong>Mutual TLS (mTLS):</strong> The delegatee
            authenticates using a client certificate whose subject or
            SAN is bound to the <tt>delegatee_id</tt> in the
            delegation record.
          </li>
        </ul>

        <t>
          When sender-constrained tokens are not used, the
          <tt>delegatee_id</tt> field alone provides only
          application-level binding.  Deployments that accept this
          weaker binding SHOULD compensate with shorter token
          lifetimes and network-level controls.
        </t>

        <t>
          <strong>Delegation request replay:</strong> An attacker
          replays a captured Token Exchange request to the AS to
          obtain a new delegated token.  Mitigations include:
        </t>
        <ul>
          <li>
            For the initial delegation hop, the AS enforces a
            freshness window on the <tt>subject_token</tt>'s
            <tt>iat</tt> claim (RECOMMENDED skew: 5 minutes);
          </li>
          <li>
            Sender-constrained tokens on the delegating agent's
            access token (e.g., DPoP
            (<xref target="RFC9449"/>) or
            <tt>OAuth-Client-Attestation</tt>) ensure that a
            replayed request from a different endpoint fails
            client authentication at the AS;
          </li>
          <li>
            TLS protects all protocol messages from on-path
            capture.
          </li>
        </ul>

        <t>
          <strong>Token replay and theft:</strong> An attacker
          presents a stolen delegated token to a Resource Server.
          Mitigations include:
        </t>
        <ul>
          <li>
            <strong>Short token lifetimes</strong> (RECOMMENDED:
            5 to 15 minutes) limit the window during which a stolen
            or replayed token remains valid;
          </li>
          <li>
            <strong>Sender-constrained tokens</strong> (DPoP or
            mTLS) ensure that a stolen token cannot be used by a
            different party;
          </li>
          <li>
            <strong>Token introspection</strong>
            (<xref target="RFC7662"/>) enables real-time revocation
            status checking;
          </li>
          <li>
            <strong>Presenter verification:</strong> The Resource
            Server MUST verify that the presenter's authenticated
            identity matches <tt>delegatee_id</tt> of the most
            recent delegation record (index 0);
          </li>
          <li>
            <strong>Revocation propagation:</strong> When theft is
            detected, the AS SHOULD revoke the compromised
            delegation hop, invalidating all downstream tokens
            (see <xref target="delegation-revocation"/>).
          </li>
        </ul>

        <t>
          Implementations SHOULD use sender-constrained tokens for
          both the delegation request and the issued delegated
          token, especially in multi-hop chains where a stolen
          token could grant access across multiple trust
          boundaries.  The <tt>delegation_chain</tt> claim
          additionally enables post-incident forensic analysis by
          identifying the agents and timestamps at each hop.
        </t>
      </section>

      <section title="Delegation Depth Limits">
        <t>
          Implementations SHOULD enforce maximum delegation depth to:
        </t>

        <ul>
          <li>Prevent unbounded delegation chains;</li>
          <li>Limit token size growth;</li>
          <li>Simplify validation.</li>
        </ul>

        <t>
          A RECOMMENDED default maximum depth is 5 hops.
        </t>

        <t>
          When a delegation request would exceed the configured maximum
          depth, the AS MUST reject the request with an OAuth 2.0 error
          response using the error code <tt>invalid_grant</tt> and a
          human-readable <tt>error_description</tt> indicating the
          maximum delegation depth has been reached.  If a Resource
          Server receives a token whose <tt>delegation_chain</tt> length
          exceeds its locally configured maximum depth, it SHOULD reject
          the request regardless of signature validity, as excessively
          deep chains may indicate a misconfigured or malicious
          delegation path.
        </t>

        <t>
          Implementers should consider the impact of delegation chain depth
          on token size. Each delegation record typically adds 500 to 1000
          bytes to the token payload, including one or two detached JWS
          signatures (approximately 200 bytes each for ES256) and,
          when present, the structured policy
          content. A 5-hop delegation chain may therefore add 2.5 to 5 KB
          to the access token. This can cause issues with:
        </t>

        <ul>
          <li>HTTP header size limits (commonly 8 KB in default proxy configurations);</li>
          <li>TLS record size constraints;</li>
          <li>Client and server memory consumption during token parsing.</li>
        </ul>

        <t>
          To mitigate token size growth, implementations MAY use one or
          more of the following strategies:
        </t>
        <ul>
          <li>
            <strong>Short-lived tokens with introspection:</strong>
            Issue access tokens with short expiration and rely on token
            introspection (<xref target="RFC7662"/>) to retrieve the
            <tt>delegation_chain</tt> on demand;
          </li>
          <li>
            <strong>Chain by reference:</strong> Instead of embedding
            the full <tt>delegation_chain</tt> in the JWT, issue a
            compact token carrying only a <tt>delegation_chain_ref</tt>
            — a URI pointing to the full chain stored at the AS.  The
            Resource Server retrieves the chain via introspection or a
            dedicated endpoint.  This approach keeps the token payload
            constant regardless of chain depth, at the cost of an
            additional round-trip for chain retrieval;
          </li>
          <li>
            <strong>Policy references:</strong> Store policies in a
            shared policy store and embed only a reference (URI) in the
            <tt>delegated_policy</tt> field rather than the full policy
            content.
          </li>
        </ul>
      </section>

      <section title="Cross-Domain Trust">
        <t>
          When delegation chains span multiple trust domains, additional
          security considerations apply:
        </t>

        <ul>
          <li>
            <strong>AS Key Trust and Record Attribution:</strong>
            Resource Servers in each trust domain must be able to
            verify <tt>as_signature</tt> on delegation records issued
            by Authorization Servers in other trust domains.  To
            determine which AS signed each record, implementations
            SHOULD use the token's <tt>iss</tt> claim to identify the
            AS that issued the current token: during Claims
            Transcription at a domain boundary, the receiving AS
            re-signs the upstream delegation records, so the
            <tt>as_signature</tt> on all records in the chain can be
            verified using the issuing AS's signing key.
            Alternatively, deployments MAY establish a mapping from
            agent identifier domains to AS domains through
            deployment-specific configuration.  Cross-domain key
            trust relationships may be established through key
            exchange agreements, published JWKS endpoints
            (<xref target="RFC8414"/>), or a shared trust framework.
            Failure to properly verify cross-domain AS signatures
            may allow forged delegation records to be accepted.
          </li>
          <li>
            <strong>Claim Semantics Across Domains:</strong> Claims such as
            <tt>sub</tt>, <tt>scope</tt>, and policy identifiers may have
            different semantics across trust domains. Implementations MUST
            ensure that claim interpretation is consistent or explicitly
            mapped at each domain boundary, following the claims transcription
            guidance in <xref target="I-D.ietf-oauth-identity-chaining"/>.
          </li>
          <li>
            <strong>Revocation Propagation:</strong> When the root
            authorization or any intermediate delegation is revoked, all
            downstream delegated tokens SHOULD be invalidated. Within a
            single trust domain, the AS can directly revoke delegated
            tokens. Across trust domains, implementations SHOULD mitigate
            the risk of stale delegated tokens through one or more of the
            following approaches: issuing short-lived delegated tokens to
            minimize the revocation window, implementing back-channel
            revocation notifications between ASes (e.g., using Token
            Revocation <xref target="RFC7009"/> or a proprietary
            notification mechanism), or requiring Resource Servers in the
            downstream domain to perform token introspection
            (<xref target="RFC7662"/>) before accepting delegated tokens.
          </li>
          <li>
            <strong>Lateral Movement:</strong> An attacker who compromises
            an agent in one trust domain may attempt to use the delegation
            chain to move laterally to other trust domains. Cross-domain
            delegation SHOULD be restricted by policy to only the trust
            domains explicitly authorized by the original user consent.
          </li>
        </ul>
      </section>

      <section anchor="delegation-revocation" title="Delegation Revocation">
        <t>
          Revocation of delegated authorization is a critical security
          operation. This section defines the revocation semantics for
          delegation chains.
        </t>

        <t>
          <strong>Revocation Scopes:</strong>
        </t>

        <ul>
          <li>
            <strong>Root revocation:</strong> When the original user
            revokes the root authorization (the token without a
            <tt>delegation_chain</tt>), all downstream delegated tokens
            derived from that root authorization MUST be considered
            invalid. Resource Servers validating a delegation chain MUST
            verify that the root authorization remains valid, either by
            checking the root token's status directly or by using token
            introspection (<xref target="RFC7662"/>) on the root token.
          </li>
          <li>
            <strong>Intermediate hop revocation:</strong> When a
            delegating agent revokes a specific delegation hop (e.g.,
            Agent A revokes its delegation to Agent B), all tokens
            derived from that delegation — including further downstream
            delegations (Agent B → Agent C → Agent D) — MUST be
            considered invalid. Resource Servers SHOULD verify that no
            delegation record in the chain has been revoked.  Within a
            single trust domain, this can be achieved by introspecting
            the token associated with each hop.  In cross-domain or
            high-throughput deployments, performing per-hop
            introspection may be impractical; in such cases, Resource
            Servers MAY rely on short token lifetimes combined with
            back-channel revocation notifications to limit the
            window during which a revoked delegation remains effective.
          </li>
          <li>
            <strong>Delegatee token revocation:</strong> When a
            delegatee agent's own token is revoked, only that specific
            token is affected. The delegation chain record itself
            remains valid for audit purposes, but the delegatee can no
            longer use the delegated authorization.
          </li>
        </ul>

        <t>
          <strong>Revocation Detection Mechanisms:</strong> Resource
          Servers and downstream Authorization Servers MUST implement at
          least one of the following mechanisms to detect delegation
          revocation:
        </t>

        <ul>
          <li>
            <strong>Short-lived tokens:</strong> Issue delegated tokens
            with short expiration times (e.g., 5 to 15 minutes) to
            limit the window during which a revoked delegation remains
            effective;
          </li>
          <li>
            <strong>Token introspection:</strong> Perform token
            introspection (<xref target="RFC7662"/>) on each token in
            the delegation chain before accepting the delegated
            authorization, confirming that no token has been revoked;
          </li>
          <li>
            <strong>Back-channel revocation notifications:</strong>
            Subscribe to revocation events from upstream Authorization
            Servers using Token Revocation (<xref target="RFC7009"/>)
            or a proprietary notification mechanism, enabling proactive
            invalidation of downstream delegated tokens.
          </li>
        </ul>

        <t>
          <strong>Audit Trail Preservation:</strong> Revocation does not
          retroactively modify existing tokens.  Delegation records
          remain in previously issued tokens for audit trail
          reconstruction purposes.  Resource Servers MUST reject tokens
          containing revoked delegation hops (as detected through the
          mechanisms above), but the historical record of the
          delegation is preserved for forensic analysis.
        </t>
      </section>
    </section>

    <section anchor="privacy" title="Privacy Considerations">
      <t>
        In addition to the privacy considerations outlined in
        <xref target="RFC8693"/> and <xref target="RFC7519"/>, the following
        privacy considerations apply to the <tt>delegation_chain</tt>
        mechanism defined in this specification.
      </t>

      <section title="Data Minimization">
        <t>
          The <tt>delegation_chain</tt> claim carries identity and
          authorization information about the original user, all
          intermediate agents, and the delegation policies. As the chain
          grows with each hop, the amount of information embedded in the
          token increases. Implementations should apply data minimization
          principles:
        </t>

        <ul>
          <li>
            The <tt>operation_summary</tt> field is OPTIONAL and should
            contain only the minimum information necessary for
            authorization decisions, not detailed descriptions of user
            intent or behavior.
          </li>
          <li>
            The <tt>delegated_policy</tt> should be scoped to the specific
            operations being delegated, not include broader context about
            the user's overall authorization.
          </li>
          <li>
            Agent identifiers (<tt>delegator_id</tt>,
            <tt>delegatee_id</tt>) should be pseudonymous where possible,
            avoiding direct exposure of personally identifiable
            information.
          </li>
        </ul>
      </section>

      <section title="Cross-Domain Information Leakage">
        <t>
          When delegation chains cross trust domain boundaries, the
          <tt>delegation_chain</tt> claim propagates user and agent
          identity information from the originating domain to downstream
          domains. This creates the following privacy risks:
        </t>

        <ul>
          <li>
            The <tt>sub</tt> claim reveals the original user's identity in
            the originating domain to all downstream domains. Implementations
            should consider identifier mapping or pairwise pseudonymous
            identifiers, following the claims transcription guidance in
            <xref target="I-D.ietf-oauth-identity-chaining"/>.
          </li>
          <li>
            The <tt>evidence</tt> claim may contain details about the user's
            consent interaction (e.g., displayed content, session context,
            channel). Downstream domains receive this information. ASes
            should minimize the evidence payload or apply domain-specific
            filtering before cross-domain propagation.
          </li>
          <li>
            The complete delegation chain reveals the full topology of agent
            relationships, which may be sensitive in competitive or
            multi-tenant environments.
          </li>
        </ul>
      </section>

      <section title="User Consent Transparency">
        <t>
          When the Delegation Interaction Phase is triggered (as described
          in <xref target="delegation-interaction"/>), the user is presented
          with delegation details for review and approval. Implementations
          should ensure that the consent UI clearly communicates:
        </t>

        <ul>
          <li>The identity of the delegatee agent receiving the delegation;</li>
          <li>The specific operations being delegated;</li>
          <li>Whether the delegation crosses trust domain boundaries;</li>
          <li>The user's ability to revoke the delegation at any time.</li>
        </ul>
      </section>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <section title="JWT Claims Registration">
        <t>
          This specification registers the following claim in the 
          "JSON Web Token Claims" registry:
        </t>

        <dl>
          <dt>Claim Name:</dt>
          <dd>delegation_chain</dd>

          <dt>Claim Description:</dt>
          <dd>
            An ordered array of AS-signed delegation records tracing 
            agent-to-agent authorization transfers, enabling end-to-end 
            validation of delegation lineage.
          </dd>

          <dt>Change Controller:</dt>
          <dd>IETF</dd>

          <dt>Specification Document:</dt>
          <dd><xref target="delegation-chain-claim"/> of this document</dd>
        </dl>
      </section>

      <section title="OAuth Parameters Registration">
        <t>
          This specification registers the following parameters in the
          "OAuth Parameters" registry established by
          <xref target="RFC6749"/> Section 11.2:
        </t>

        <dl>
          <dt>Parameter Name:</dt>
          <dd>delegatee_id</dd>

          <dt>Parameter Usage Location:</dt>
          <dd>token request</dd>

          <dt>Change Controller:</dt>
          <dd>IETF</dd>

          <dt>Reference:</dt>
          <dd><xref target="step3-delegation-request"/> of this document</dd>
        </dl>

        <t>
          The <tt>interaction_callback_uri</tt> parameter is used in
          the delegation Token Exchange request context
          (<xref target="step3-delegation-request"/>) to receive a
          redirect callback upon completion of user interaction.  The
          parameter is defined and registered by
          <xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>;
          this specification extends its usage from the JWT
          Authorization Grant (<tt>grant_type=jwt-bearer</tt>) to the
          Token Exchange grant type
          (<tt>grant_type=token-exchange</tt>).  No additional IANA
          registration is required.
        </t>
      </section>

      <section title="OAuth Error Registration">
        <t>
          This specification defines the following error codes for use
          in delegation Token Exchange responses. These errors extend
          the OAuth 2.0 error registry established by
          <xref target="RFC6749"/> Section 11.4:
        </t>

        <dl>
          <dt>invalid_delegation_chain:</dt>
          <dd>
            The <tt>delegation_chain</tt> claim in the presented token
            fails validation (e.g., broken chain continuity, invalid
            signatures, or expired timestamps). The AS MUST reject the
            delegation request.
          </dd>
        </dl>

        <dl>
          <dt>delegation_depth_exceeded:</dt>
          <dd>
            The delegation chain has reached the maximum number of hops
            permitted by the AS policy, and the requested delegation
            would exceed this limit.
          </dd>
        </dl>

        <dl>
          <dt>policy_expansion_detected:</dt>
          <dd>
            The requested <tt>delegated_policy</tt> or <tt>scope</tt>
            is broader than the delegator's authorized policy, violating
            the policy narrowing constraint defined in
            <xref target="delegation-chain-claim"/>.
          </dd>
        </dl>
      </section>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7523.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8693.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8785.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8414.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-oauth-identity-chaining.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-parecki-oauth-jwt-grant-interaction-response.xml"/>
      </references>

      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7009.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7662.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9449.xml"/>

        <reference anchor="I-D.liu-oauth-rego-policy" target="https://maxpassion.github.io/IETF-Agent-Operation-Authorization-draft/draft-liu-oauth-rego-policy-00.html">
          <front>
            <title>Rego Policy Language for OAuth 2.0</title>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="March"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-liu-oauth-rego-policy"/>
        </reference>

        <reference anchor="I-D.ietf-oauth-identity-assertion-authz-grant">
          <front>
            <title>OAuth 2.0 Identity Assertion Authorization Grant</title>
            <author initials="K." surname="Ying"/>
            <author initials="B." surname="Campbell"/>
            <date year="2026" month="January"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-identity-assertion-authz-grant"/>
        </reference>

        <reference anchor="I-D.liu-oauth-authorization-evidence" target="https://maxpassion.github.io/IETF-Agent-Operation-Authorization-draft/draft-liu-oauth-authorization-evidence-00.html">
          <front>
            <title>Authorization Evidence for OAuth 2.0</title>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="March"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-liu-oauth-authorization-evidence"/>
        </reference>
      </references>
    </references>

    <section title="Complete Multi-Hop Example">
      <t>
        The following shows an <strong>extended</strong> token held
        by Agent C after two delegation hops
        (User → Agent A → Agent B → Agent C), using WIT-based
        identifiers, structured policies, and authorization
        evidence:
      </t>

      <figure>
        <artwork name="Complete multi-hop token" type="json"><![CDATA[
{
  "iss": "https://as.example.com",
  "sub": "user_12345",
  "aud": "https://api.shop.example",
  "exp": 1734520500,
  "iat": 1734517800,
  "act": {
    "sub": "wit://agent-c.example/sha256.ccc333..."
  },
  
  "delegation_chain": [
    {
      "delegator_id": "wit://agent-b.example/sha256.bbb222...",
      "delegatee_id": "wit://agent-c.example/sha256.ccc333...",
      "delegation_timestamp": 1734517800,
      "root_evidence_ref": "evidence-root",
      "delegated_policy": {
        "type": "rego",
        "content": "package agent\ndefault allow = false\n\nallow {\n  input.action == \"inventory_check\"\n  input.item_id == \"123\"\n}",
        "entry_point": "allow"
      },
      "operation_summary": "Check stock for item 123",
      "delegator_signature": "eyJhbGciOiJFUzI1NiJ9..MEYCIQD2...",
      "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDy..."
    },
    {
      "delegator_id": "wit://agent-a.example/sha256.aaa111...",
      "delegatee_id": "wit://agent-b.example/sha256.bbb222...",
      "delegation_timestamp": 1734516900,
      "root_evidence_ref": "evidence-root",
      "delegated_policy": {
        "type": "rego",
        "content": "package agent\ndefault allow = false\n\nallow {\n  input.action == \"cart_op\"\n}\nallow {\n  input.action == \"inventory_op\"\n}",
        "entry_point": "allow"
      },
      "operation_summary": "Delegate inventory operations",
      "delegator_signature": "eyJhbGciOiJFUzI1NiJ9..MEYCIQD1...",
      "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDx..."
    }
  ],
  
  "evidence": {
    "id": "evidence-root",
    "user_confirmation": {
      "displayed_content": "Allow shopping assistant to manage cart",
      "user_action": "confirmed_via_button_click",
      "timestamp": 1734516000,
      "interface_version": "consent-ui-v2.1"
    },
    "session_context": {
      "session_id": "session_xyz789",
      "channel": "mobile-app"
    },
    "as_signature": "eyJhbGciOiJSUzI1NiJ9..MEUCIQDw..."
  },
  
  "audit_trail": {
    "evidence_ref": "evidence-root",
    "semantic_expansion_level": "medium",
    "interpretation_notes": "User said 'manage cart', delegated to inventory operations"
  }
}
        ]]></artwork>
      </figure>

      <t>
        This token shows:
      </t>

      <ul>
        <li>Original user: user_12345</li>
        <li>Current actor: Agent C</li>
        <li>Delegation path: Agent A → Agent B → Agent C</li>
        <li>Progressive policy narrowing: cart+inventory → inventory → item:123</li>
        <li>Original user consent evidence preserved</li>
      </ul>

      <t>
        A scope-based equivalent of the same scenario
        would omit the <tt>delegated_policy</tt>,
        <tt>delegator_signature</tt>, <tt>root_evidence_ref</tt>,
        <tt>evidence</tt>, and <tt>audit_trail</tt> fields.  Each
        delegation record would carry only <tt>delegator_id</tt>,
        <tt>delegatee_id</tt>,
        <tt>delegation_timestamp</tt>, <tt>operation_summary</tt>, and
        <tt>as_signature</tt>.  The token's <tt>scope</tt> claim alone
        would express the progressively narrowing authorization
        (e.g., <tt>cart:read inventory:read</tt> → <tt>inventory:read</tt>
        → <tt>inventory:read:item:123</tt>).
      </t>
    </section>

    <section anchor="validation-mechanism" title="Validation Checklist">
      <t>
        This appendix provides a condensed checklist for implementers.
        The normative requirements are specified in
        <xref target="rs-validation"/> and
        <xref target="security"/>; this checklist is informative only.
      </t>

      <t>
        Each delegation hop is represented as a separate JWT access token
        issued and signed by the Authorization Server.  The delegating
        agent MAY additionally provide a <tt>delegator_signature</tt>
        within the <tt>delegation_chain</tt> record for dual-signature
        non-repudiation (RECOMMENDED).
      </t>

      <t>
        <strong>Token structure (per hop):</strong>
      </t>
      <ul>
        <li><tt>iss</tt> — Authorization Server identifier</li>
        <li><tt>sub</tt> — original user (preserved from root)</li>
        <li><tt>act.sub</tt> — delegatee agent identifier</li>
        <li><tt>delegation_chain</tt> — accumulated delegation records</li>
        <li>Token signed by AS private key</li>
      </ul>

      <t>
        <strong>Resource Server validation steps:</strong>
      </t>
      <ol>
        <li>Verify token-level JWT signature against <tt>iss</tt></li>
        <li>Verify <tt>as_signature</tt> on each delegation record</li>
        <li>Verify <tt>delegator_signature</tt> when present (SHOULD)</li>
        <li>Check chain continuity:
            <tt>record[i].delegator_id == record[i-1].delegatee_id</tt></li>
        <li>Check <tt>act.sub == record[0].delegatee_id</tt></li>
        <li>Check timestamp ordering (descending, within validity)</li>
        <li>Check scope narrowing (MUST); check policy narrowing when
            <tt>delegated_policy</tt> present (SHOULD)</li>
        <li>Verify root authorization anchor
            (see Section <xref target="rs-validation" format="counter"/>)</li>
        <li>Check agent identifier status (revocation / expiration)</li>
      </ol>

      <t>
        <strong>Per-hop signing benefits:</strong>
        independent non-repudiation per delegator, flexible per-hop
        revocation, incremental chain updates, and discrete audit events.
      </t>
    </section>

  </back>

</rfc>
