<?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-authorization-evidence-00"
  ipr="trust200902"
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="OAuth Authorization Evidence">Authorization Evidence and Audit Trail for OAuth 2.0 Access Tokens</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-oauth-authorization-evidence-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"/>
    <area>Security</area>
    <workgroup>Web Authorization Protocol</workgroup>

    <keyword>OAuth</keyword>
    <keyword>Evidence</keyword>
    <keyword>Audit</keyword>
    <keyword>Consent</keyword>
    <keyword>User Confirmation</keyword>

    <abstract>
      <t>
        This specification defines JWT claims for including authorization evidence 
        and audit trail information in OAuth 2.0 access tokens. These claims enable 
        cryptographic proof of user consent, supporting accountability, compliance, 
        and dispute resolution in scenarios where autonomous agents act on behalf 
        of users.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>
        In traditional OAuth 2.0 <xref target="RFC6749"/> flows, the Authorization Server records user consent
        internally, but this information is not typically conveyed to Resource Servers
        or included in access tokens. For many use cases, this is sufficient. However,
        emerging scenarios, particularly those involving AI agents
        acting autonomously on behalf of users, require stronger
        guarantees about user intent and consent.
      </t>

      <t>
        This specification addresses the need for:
      </t>

      <ul>
        <li>
          Verifiable consent: Cryptographic proof that a user 
          explicitly authorized a specific operation;
        </li>
        <li>
          Audit trails: Traceable records linking user intent to 
          system actions;
        </li>
        <li>
          Dispute resolution: Evidence that can be examined if 
          questions arise about what was authorized;
        </li>
        <li>
          Regulatory compliance: Documentation required by 
          regulations in finance, healthcare, and other domains.
        </li>
      </ul>

      <t>
        This specification defines two JWT claims: <tt>evidence</tt> for user
        confirmation records, and <tt>audit_trail</tt> for semantic traceability
        metadata.
      </t>

      <t>
        Unless otherwise noted, all data types and serialization rules
        follow the JSON data interchange format as defined in
        <xref target="RFC8259"/>.
      </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 title="Applicability">
        <t>
          This specification defines general-purpose JWT claims that 
          MAY be used with various OAuth 2.0 authorization flows, 
          including but not limited to:
        </t>

        <ul>

          <li>
            JWT Authorization Grant with Interaction Response
            <xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>;
          </li>

          <li>
            Authorization Code Grant (with or without PAR
            <xref target="RFC9126"/>);
          </li>
          
          <li>
            Client Credentials Grant;
          </li>
          
          <li>
            Token Exchange <xref target="RFC8693"/>;
          </li>

          <li>
            Any other OAuth 2.0 grant type that involves user
            authorization.
          </li>
        </ul>

        <t>
          Different authorization flows may have different security 
          considerations when using this specification. Implementations 
          SHOULD carefully evaluate the security implications based on 
          their specific deployment scenario.
        </t>
      </section>
    </section>

    <section anchor="terminology" title="Terminology">
      <dl>
        <dt>User Confirmation:</dt>
        <dd>
          An explicit action by the user (e.g., clicking "Allow") to approve an 
          authorization request.
        </dd>

        <dt>Displayed Content:</dt>
        <dd>
          The human-readable description of the operation shown to the user during 
          the consent flow.
        </dd>

        <dt>Evidence:</dt>
        <dd>
          A cryptographically signed record of user confirmation, including what was 
          displayed and how the user responded.
        </dd>

        <dt>Audit Trail:</dt>
        <dd>
          Metadata that enables tracing from user intent through system interpretation 
          to final authorized action.
        </dd>

        <dt>Semantic Expansion:</dt>
        <dd>
          The process of translating user intent (e.g., natural language) into 
          concrete system operations.
        </dd>
      </dl>
    </section>

    <section anchor="evidence-claim" title="The evidence Claim">
      <t>
        The <tt>evidence</tt> claim contains a record of the user's confirmation
        action during the authorization process. It is included in JWT access
        tokens <xref target="RFC7519"/> to provide verifiable proof of user consent.
      </t>

      <section title="Claim Definition">
        <dl>
          <dt>Claim Name:</dt>
          <dd>evidence</dd>

          <dt>Claim Type:</dt>
          <dd>Object</dd>

          <dt>Usage:</dt>
          <dd>Access tokens</dd>
        </dl>
      </section>

      <section title="Structure">
        <figure>
          <artwork name="evidence structure" type="json"><![CDATA[
{
  "evidence": {
    "id": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "user_confirmation": {
      "displayed_content": "Add items under $50 to cart",
      "user_action": "confirmed_via_button_click",
      "timestamp": 1731320595
    },
    "as_signature": "eyJhbGciOiJFUzI1NiJ9..MEUCIQDx..."
  }
}
          ]]></artwork>
        </figure>
      </section>

      <section title="Field Definitions">
        <table anchor="tbl-evidence-fields">
          <name>evidence Claim Fields</name>
          <thead>
            <tr>
              <th>Field</th>
              <th>Type</th>
              <th>Requirement</th>
              <th>Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>id</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>Unique identifier for this evidence record. The value
                MUST use a URI or URN format with at least 128 bits
                of collision resistance.  UUID URNs (e.g.,
                "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6")
                are RECOMMENDED.</td>
            </tr>
            <tr>
              <td>user_confirmation</td>
              <td>object</td>
              <td>REQUIRED</td>
              <td>Details of the user's confirmation action.</td>
            </tr>
            <tr>
              <td>as_signature</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>AS signature over the confirmation record.</td>
            </tr>
          </tbody>
        </table>

        <section title="user_confirmation Object">
          <table anchor="tbl-user-confirmation-fields">
            <name>user_confirmation Fields</name>
            <thead>
              <tr>
                <th>Field</th>
                <th>Type</th>
                <th>Requirement</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>displayed_content</td>
                <td>string</td>
                <td>REQUIRED</td>
                <td>The text shown to user for confirmation.</td>
              </tr>
              <tr>
                <td>user_action</td>
                <td>string</td>
                <td>REQUIRED</td>
                <td>How the user confirmed the operation.  The value
                  is a free-form string, but implementations SHOULD
                  use values from the following set for
                  interoperability: <tt>button_click</tt>,
                  <tt>biometric_confirmation</tt>,
                  <tt>pin_entry</tt>, <tt>voice_confirmation</tt>,
                  <tt>hardware_key</tt>, <tt>implicit_consent</tt>.
                  Custom values MAY be used for deployment-specific
                  confirmation mechanisms.</td>
              </tr>
              <tr>
                <td>timestamp</td>
                <td>NumericDate</td>
                <td>REQUIRED</td>
                <td>When the confirmation occurred.</td>
              </tr>
            </tbody>
          </table>
        </section>

      </section>

      <section title="AS Signature">
        <t>
          The <tt>as_signature</tt> field contains a cryptographic signature from 
          the Authorization Server over the evidence record. This signature:
        </t>

        <ul>
          <li>Proves the AS witnessed the user's consent;</li>
          <li>Ensures the evidence has not been tampered with;</li>
          <li>Provides strong evidence of user consent for dispute
            resolution (subject to trust in the AS, as discussed
            in <xref target="security"/>).</li>
        </ul>

        <t>
          The signature MUST be computed over the following fields of the 
          <tt>evidence</tt> object:
        </t>

        <ul>
          <li><tt>id</tt></li>
          <li><tt>user_confirmation</tt> (entire object)</li>
        </ul>

        <t>
          The <tt>as_signature</tt> field itself MUST be excluded from the
          signature computation. The signature format MUST be a detached
          JWS <xref target="RFC7515"/> in Compact Serialization using the AS's signing key.
          In detached Compact Serialization (see RFC 7515 Appendix F), the
          payload portion is omitted, resulting in the format
          "header..signature".
        </t>

        <t>
          The signature input is constructed using the following
          deterministic algorithm:
        </t>

        <ol>
          <li>
            Create a new JSON object containing only the
            <tt>id</tt> and <tt>user_confirmation</tt> fields
            copied from the <tt>evidence</tt> object.  No other
            fields from the <tt>evidence</tt> object are included.
          </li>
          <li>
            Apply the JSON Canonicalization Scheme (JCS) as defined
            in <xref target="RFC8785"/> to the JSON object from the
            previous step, producing a deterministic byte string.
          </li>
          <li>
            Compute a detached JWS (Compact Serialization) over
            the JCS output from Step 2 using the AS's private
            signing key.  The resulting value
            (<tt>header..signature</tt>) is stored in the
            <tt>as_signature</tt> field of the <tt>evidence</tt>
            object.
          </li>
        </ol>

        <t>
          To verify an <tt>as_signature</tt>, the verifier
          reconstructs the JCS input by performing Steps 1 and 2 above
          on the received <tt>evidence</tt> object (excluding the
          <tt>as_signature</tt> field), then verifies the detached
          JWS using the AS's public key.  Any extension fields
          present in the <tt>evidence</tt> object beyond
          <tt>id</tt>, <tt>user_confirmation</tt>,
          and <tt>as_signature</tt>
          MUST NOT be included in the JCS input and therefore
          are not covered by the signature.
        </t>

        <t>
          Note: In examples throughout this document, the
          <tt>as_signature</tt> value is shown in abbreviated form for
          readability. Actual values MUST use the detached JWS Compact
          Serialization format described above.
        </t>

        <t>
          The key used to sign the evidence record MAY be the same key
          used to sign the access token, or it MAY be a separate
          dedicated key.  When a separate key is used, implementations
          MUST ensure that the evidence signing key is associated with
          the AS through a verifiable mechanism (e.g., published in the
          AS's JWKS endpoint as defined in <xref target="RFC7517"/>).
          Using a dedicated evidence signing key enables independent key
          rotation for evidence records without affecting token
          validation, which is RECOMMENDED for deployments where evidence
          records have longer retention periods than access tokens.
        </t>
      </section>
    </section>

    <section anchor="audit-trail-claim" title="The audit_trail Claim">
      <t>
        The <tt>audit_trail</tt> claim provides metadata for semantic traceability, 
        enabling analysis of how user intent was interpreted and translated into 
        authorized operations.
      </t>

      <section title="Claim Definition">
        <dl>
          <dt>Claim Name:</dt>
          <dd>audit_trail</dd>

          <dt>Claim Type:</dt>
          <dd>Object</dd>

          <dt>Usage:</dt>
          <dd>Access tokens</dd>
        </dl>
      </section>

      <section title="Structure">
        <figure>
          <artwork name="audit_trail structure" type="json"><![CDATA[
{
  "audit_trail": {
    "evidence_ref": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "semantic_expansion_level": "medium",
    "proposal_ref": "urn:uuid:proposal-xyz"
  }
}
          ]]></artwork>
        </figure>
      </section>

      <section title="Field Definitions">
        <table anchor="tbl-audit-trail-fields">
          <name>audit_trail Claim Fields</name>
          <thead>
            <tr>
              <th>Field</th>
              <th>Type</th>
              <th>Requirement</th>
              <th>Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>evidence_ref</td>
              <td>string</td>
              <td>OPTIONAL</td>
              <td>Reference to the evidence record by ID.</td>
            </tr>
            <tr>
              <td>semantic_expansion_level</td>
              <td>string</td>
              <td>OPTIONAL</td>
              <td>Degree of interpretation applied (none, low, medium, high).</td>
            </tr>
            <tr>
              <td>proposal_ref</td>
              <td>URI</td>
              <td>OPTIONAL</td>
              <td>Reference to the original authorization proposal,
                the agent's initial request describing the intended
                operation before the AS applied policy evaluation,
                scope reduction, or user consent modifications.
                The value is an opaque URI assigned by the AS for
                internal correlation; no protocol for retrieving
                the proposal content via this URI is defined by
                this specification.  This enables post-hoc
                comparison between what the agent originally
                requested and what was ultimately authorized.</td>
            </tr>
          </tbody>
        </table>
      </section>

      <section title="Semantic Expansion Levels">
        <t>
          The <tt>semantic_expansion_level</tt> field indicates how much the system
          interpreted or expanded the user's original intent.  The
          following four values form a closed set; implementations
          MUST NOT use values outside this set:
        </t>

        <dl>
          <dt>none:</dt>
          <dd>
            No interpretation; user specified exact parameters.
            Example: User explicitly sets "transfer $100 to account X".
          </dd>

          <dt>low:</dt>
          <dd>
            Minor defaults applied.
            Example: User says "add to cart" and the system defaults
            quantity to 1 and selects the user's saved shipping address.
          </dd>

          <dt>medium:</dt>
          <dd>
            Significant interpretation of qualitative terms.
            Example: User says "buy cheap headphones" and the system
            maps "cheap" to a price ceiling of $50 and selects a
            specific product category.
          </dd>

          <dt>high:</dt>
          <dd>
            Substantial expansion from a high-level goal into a
            multi-step plan.
            Example: User says "plan my trip to Tokyo" and the agent
            derives flight search, hotel booking, and itinerary
            creation as separate authorized operations.
          </dd>
        </dl>
      </section>

      <section title="Minimum Content Guidance">
        <t>
          When the <tt>audit_trail</tt> claim is included, the 
          <tt>evidence_ref</tt> field SHOULD be present to link 
          the audit record to its corresponding evidence. Including 
          at least <tt>evidence_ref</tt> and 
          <tt>semantic_expansion_level</tt> is RECOMMENDED for 
          meaningful audit capability.
        </t>
      </section>
    </section>

    <section anchor="purposes" title="Audit Trail Purposes">
      <t>
        The evidence and audit trail claims serve several important purposes:
      </t>

      <table anchor="tbl-purposes">
        <name>Purposes of Authorization Evidence</name>
        <thead>
          <tr>
            <th>Purpose</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Intent Provenance</td>
            <td>
              Records what the user intended, preventing disputes about 
              authorization scope.
            </td>
          </tr>
          <tr>
            <td>Action Interpretation</td>
            <td>
              Documents how the system translated intent into operations, 
              showing the reasoning process.
            </td>
          </tr>
          <tr>
            <td>Semantic Transparency</td>
            <td>
              Reveals any expansions or defaults applied, enabling users to 
              understand what was authorized.
            </td>
          </tr>
          <tr>
            <td>User Confirmation</td>
            <td>
              Provides timestamped proof that the user reviewed and approved 
              the operation.
            </td>
          </tr>
          <tr>
            <td>Accountability Support</td>
            <td>
              Enables post-hoc analysis to determine responsibility for 
              erroneous transactions.
            </td>
          </tr>
        </tbody>
      </table>
    </section>

    <section anchor="as-processing" title="Authorization Server Processing">
      <section anchor="evidence-collection" title="Evidence Collection from User Interaction">
        <t>
          The <tt>evidence</tt> claim records the outcome of a user
          consent interaction.  Before the AS can generate a signed
          evidence record, it must first present a consent interface
          to the user and capture the user's response.  This section
          describes the general consent-to-evidence pattern and provides
          a concrete example using the JWT Grant Interaction Response
          flow.
        </t>

        <section title="General Consent-to-Evidence Pattern">
          <t>
            Regardless of the specific OAuth grant type, evidence
            collection follows a common pattern:
          </t>

          <ol>
            <li>
              The AS receives an authorization request from a client
              (which may be acting on behalf of an AI agent).
            </li>
            <li>
              The AS determines that user consent is required and
              presents a consent interface to the user.  The consent
              interface displays a human-readable description of the
              requested operation (the <tt>displayed_content</tt>).
            </li>
            <li>
              The user reviews the displayed content and performs a
              confirmation action (e.g., clicking an "Allow" button,
              providing biometric input, entering a PIN).
            </li>
            <li>
              The AS captures the interaction details (what was
              displayed, what action the user took, when, and in
              what session context) and constructs the
              <tt>evidence</tt> object as defined in
              <xref target="evidence-claim"/>.
            </li>
            <li>
              The AS signs the evidence record and includes it in
              the issued access token.
            </li>
          </ol>

          <t>
            The following diagram illustrates this pattern:
          </t>

          <figure>
            <artwork type="ascii-art"><![CDATA[
Client/Agent          Authorization Server              User
    |                         |                          |
    |-- authorization req --->|                          |
    |                         |                          |
    |                         |--- consent UI ---------->|
    |                         |    (displayed_content)   |
    |                         |                          |
    |                         |<-- user action ----------|
    |                         |    (button_click, etc.)  |
    |                         |                          |
    |                         |  [capture evidence]      |
    |                         |  [sign with as_signature]|
    |                         |                          |
    |<-- access token --------|                          |
    |    (with evidence)      |                          |
    |                         |                          |
            ]]></artwork>
          </figure>
        </section>

        <section title="Consent UI to Evidence Field Mapping">
          <t>
            Each field in the <tt>evidence</tt> claim corresponds to
            a specific event during the consent interaction:
          </t>

          <table anchor="tbl-consent-mapping">
            <name>Consent UI Event to Evidence Field Mapping</name>
            <thead>
              <tr>
                <th>Consent UI Event</th>
                <th>Evidence Field</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>AS renders consent page</td>
                <td><tt>displayed_content</tt></td>
                <td>The text shown to the user describing the
                  requested operation</td>
              </tr>
              <tr>
                <td>User confirms or denies</td>
                <td><tt>user_action</tt></td>
                <td>How the user responded (button click, biometric,
                  PIN, etc.)</td>
              </tr>
              <tr>
                <td>Confirmation timestamp</td>
                <td><tt>timestamp</tt></td>
                <td>Server-side time when the user's action was
                  received</td>
              </tr>
            </tbody>
          </table>
        </section>

        <section title="Example: JWT Grant Interaction Response Flow">
          <t>
            The JWT Grant Interaction Response
            (<xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>)
            defines a mechanism for AI agents to obtain user consent
            from an external Authorization Server.  The following
            sequence shows how evidence is collected during this flow:
          </t>

          <ol>
            <li>
              An AI agent sends a token request to the AS using a
              JWT authorization grant
              (<xref target="RFC7523"/>), including the requested
              scope and <tt>authorization_details</tt>.
            </li>
            <li>
              The AS validates the agent's identity and determines
              that user interaction is required.  It responds with
              an <tt>interaction_required</tt> error containing an
              <tt>interaction_uri</tt> (a URL hosted by the AS for
              the consent interface) and a polling
              <tt>interval</tt>.
            </li>
            <li>
              The agent opens the <tt>interaction_uri</tt> in the
              user's browser.  The AS presents a consent page
              showing the interpreted operation (e.g., "Add items
              under $50 to cart on your behalf").
            </li>
            <li>
              <t>
                The user reviews the displayed content and clicks
                "Allow".  The AS captures:
              </t>
              <ul>
                <li>
                  <tt>displayed_content</tt>: the operation
                  description shown on the consent page;
                </li>
                <li>
                  <tt>user_action</tt>: <tt>button_click</tt>;
                </li>
                <li>
                  <tt>timestamp</tt>: the server time of the
                  click.
                </li>
              </ul>
            </li>
            <li>
              The AS constructs the <tt>evidence</tt> object,
              computes the <tt>as_signature</tt> per
              <xref target="evidence-claim"/>, and stores the
              evidence record.
            </li>
            <li>
              The agent polls the token endpoint.  Upon detecting
              that the user has completed interaction, the AS
              issues an access token containing the signed
              <tt>evidence</tt> claim.
            </li>
          </ol>

          <figure>
            <artwork type="ascii-art"><![CDATA[
AI Agent          External AS                      User
   |                   |                            |
   |-- token request ->|                            |
   |                   |                            |
   |<- interaction_    |                            |
   |   required        |                            |
   |   (interaction_   |                            |
   |    uri, interval) |                            |
   |                   |                            |
   |-- open interaction_uri in browser ------------>|
   |                   |                            |
   |                   |--- consent UI ------------>|
   |                   |    "Add items under $50    |
   |                   |     to cart on your behalf"|
   |                   |                            |
   |                   |<-- user clicks [Allow] ----|
   |                   |                            |
   |                   |  [capture evidence fields] |
   |                   |  [compute as_signature]    |
   |                   |                            |
   |-- poll token  --->|                            |
   |   endpoint        |                            |
   |                   |                            |
   |<- access token ---|                            |
   |   (with evidence) |                            |
   |                   |                            |
            ]]></artwork>
          </figure>
        </section>

        <section title="Applicability to Other Flows">
          <t>
            The consent-to-evidence pattern described above applies
            to any OAuth flow that involves user interaction.  For
            example:
          </t>

          <ul>
            <li>
              <strong>Authorization Code Grant</strong>: The AS
              presents a consent screen during the
              <tt>/authorize</tt> redirect.  Evidence is collected
              when the user approves or denies the request.
            </li>
            <li>
              <strong>CIBA (Client-Initiated Backchannel
              Authentication)</strong>: The AS delivers a consent
              request to the user's authentication device (e.g.,
              push notification).  Evidence captures the user's
              out-of-band confirmation action.
            </li>
            <li>
              <strong>Consent-Only Flow</strong>: When the user
              already holds a valid session and the AS determines
              that only operation-specific consent is needed (not
              re-authentication), the AS presents a targeted
              consent prompt.  Evidence records the scoped
              approval.
            </li>
          </ul>

          <t>
            Flows that do not involve user interaction (e.g.,
            Client Credentials Grant without user context) cannot
            produce <tt>evidence</tt> claims, since there is no
            user confirmation to record.  Such flows MAY still use
            the <tt>audit_trail</tt> claim
            (<xref target="audit-trail-claim"/>) for semantic
            traceability without user confirmation evidence.
          </t>
        </section>
      </section>

      <section title="Evidence Generation">
        <t>
          When issuing an access token with evidence, the AS MUST:
        </t>

        <ol>
          <li>
            Record the exact content displayed to the user during consent;
          </li>
          <li>
            Capture the user's confirmation action and timestamp;
          </li>
          <li>
            Generate a unique evidence identifier;
          </li>
          <li>
            Sign the evidence fields (id and user_confirmation)
            with the AS's private key using JCS canonicalization;
          </li>
          <li>
            Include the evidence claim in the access token.
          </li>
        </ol>
      </section>

      <section title="Storage Requirements">
        <t>
          The AS SHOULD retain evidence records for a configurable period to support:
        </t>

        <ul>
          <li>Dispute resolution;</li>
          <li>Regulatory compliance;</li>
          <li>Audit requests;</li>
          <li>Token introspection with evidence details.</li>
        </ul>

        <t>
          The retention period SHOULD be at least as long as the
          longest-lived token that references the evidence record,
          plus a configurable grace period for post-expiration
          disputes.  For regulated industries (e.g., financial
          services under PCI-DSS, healthcare under HIPAA), the
          retention period MUST comply with the applicable regulatory
          minimums, which typically range from 1 to 7 years.
          Implementations SHOULD support per-deployment configuration
          of retention periods and provide automated purging of
          expired evidence records.
        </t>
      </section>

      <section anchor="evidence-token-exchange" title="Evidence in Token Exchange">
        <t>
          When a token carrying an <tt>evidence</tt> claim is used as
          the <tt>subject_token</tt> in a Token Exchange request
          (<xref target="RFC8693"/>), the AS issuing the exchanged token
          MUST decide how to handle the original evidence.  Three
          strategies are defined:
        </t>

        <dl>
          <dt>Propagate:</dt>
          <dd>
            Copy the original <tt>evidence</tt> claim into the new
            token.  This preserves the direct link to the original
            user consent.  The original AS signature remains valid
            because the evidence fields are not re-signed.  This
            strategy is RECOMMENDED when the exchanged token's scope
            is a subset of the original token's scope.  When the
            exchanging AS is different from the original AS, the
            exchanging AS MUST verify the original
            <tt>as_signature</tt> before propagating, and MAY
            re-sign the evidence with its own key to establish a
            direct trust chain with the target RS.
          </dd>

          <dt>Reference:</dt>
          <dd>
            Replace the embedded <tt>evidence</tt> object with an
            <tt>audit_trail</tt> claim containing only the
            <tt>evidence_ref</tt> pointing to the original evidence
            record.  This reduces token size while maintaining
            traceability.  Implementations using this strategy MUST
            ensure the referenced evidence record is retrievable by
            the target RS (e.g., via introspection).
          </dd>

          <dt>Omit:</dt>
          <dd>
            Do not include evidence in the exchanged token.  This is
            appropriate only when the exchanged token's scope does not
            require consent evidence (e.g., service-to-service calls
            within the originally authorized boundary).
          </dd>
        </dl>

        <t>
          When using the Propagate strategy with delegation chains
          (<xref target="I-D.liu-oauth-chain-delegation"/>), the
          <tt>root_evidence_ref</tt> in the delegation chain entry
          SHOULD reference the same evidence record, creating an
          unbroken audit trail from the original user consent through
          all delegation hops.
        </t>
      </section>

      <section title="Evidence in Token Refresh">
        <t>
          When an access token carrying an <tt>evidence</tt> claim
          expires and the client obtains a new access token using a
          refresh token, the AS MUST decide whether to include
          evidence in the refreshed token.  The same three strategies
          defined in <xref target="evidence-token-exchange"/>
          (Propagate, Reference, Omit) apply, with the following
          additional considerations:
        </t>

        <ul>
          <li>
            The <tt>user_confirmation.timestamp</tt> in the
            propagated evidence reflects the original consent time,
            which may be significantly earlier than the refreshed
            token's <tt>iat</tt> claim.  The RS SHOULD evaluate
            evidence freshness
            (<xref target="security"/>) against the original
            consent time, not the refresh time.
          </li>
          <li>
            If the refresh request narrows the token's scope, the
            Propagate strategy is RECOMMENDED to maintain the
            audit trail.  If the refresh request broadens the
            scope beyond what the original consent covered, the AS
            MUST NOT propagate the evidence and SHOULD initiate a
            new consent interaction instead.
          </li>
          <li>
            When the refresh token itself was issued alongside the
            original access token, the evidence record remains
            valid for the lifetime of the refresh token.  The AS
            SHOULD retain the evidence record (per the Storage
            Requirements) for at least as long as any refresh
            token that references it.
          </li>
        </ul>
      </section>
    </section>

    <section anchor="rs-processing" title="Resource Server Processing">
      <section title="Evidence Verification">
        <t>
          Resource Servers MAY verify the evidence claim by:
        </t>

        <ol>
          <li>
            Extracting the <tt>as_signature</tt> from the evidence;
          </li>
          <li>
            Verifying the signature using the AS's public key;
          </li>
          <li>
            Confirming that the evidence <tt>id</tt> and timestamp are
            consistent with the token's <tt>iat</tt> claim (i.e., the
            user confirmation occurred before or at token issuance);
          </li>
          <li>
            Checking the timestamp is within acceptable bounds based on
            the deployment's evidence freshness policy.
          </li>
        </ol>

        <t>
          Note: The <tt>displayed_content</tt> field records what was
          shown to the user during consent.  The RS typically does not
          have direct knowledge of the consent interaction and therefore
          cannot independently verify this field.  Instead, the RS
          relies on the AS signature as proof that the AS witnessed the
          user's consent to the described operation.
        </t>
      </section>

      <section title="Audit Logging">
        <t>
          Resource Servers SHOULD log evidence information for audit purposes, 
          including:
        </t>

        <ul>
          <li>Evidence ID;</li>
          <li>User confirmation timestamp;</li>
          <li>Displayed content summary;</li>
          <li>Operation performed;</li>
          <li>Outcome (success/failure).</li>
        </ul>
      </section>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>
        This section discusses security considerations specific to
        authorization evidence in OAuth 2.0.  General OAuth 2.0
        security considerations, including token threats and
        countermeasures, are described in <xref target="RFC6819"/>.
      </t>

      <section title="Signature Verification">
        <t>
          The AS signature over the evidence fields (id and
          user_confirmation) is critical for evidence integrity.
          Implementations MUST:
        </t>

        <ul>
          <li>Use strong cryptographic algorithms (e.g., RS256, ES256);</li>
          <li>Protect AS signing keys appropriately;</li>
          <li>Rotate keys periodically with proper key management.</li>
        </ul>
      </section>

      <section title="Evidence Tampering and Trust in the AS">
        <t>
          The evidence claim is protected by the access token's signature. However,
          the <tt>as_signature</tt> field provides an additional layer of protection
          specifically for the user confirmation record.
        </t>

        <t>
          It is important to understand the trust boundary of the
          evidence mechanism: the <tt>as_signature</tt> provides
          cryptographic proof that the AS <strong>recorded</strong> a
          user confirmation.  It does not independently prove that
          the user <strong>actually</strong> consented.  The AS
          controls both the consent interaction and the signing key,
          so a compromised or malicious AS could fabricate evidence
          records.  Trust in the evidence record therefore depends
          on trust in the AS and its operational security.
          Deployments requiring stronger non-repudiation guarantees
          SHOULD supplement this mechanism with user-side signatures
          or independent consent auditing.
        </t>
      </section>

      <section title="Replay Attacks">
        <t>
          Evidence records are bound to specific access tokens. The evidence ID and 
          timestamp help detect attempts to reuse evidence across different 
          authorization contexts.
        </t>
      </section>

      <section title="Token Size Considerations">
        <t>
          Including evidence and audit_trail claims increases access token size.
          Implementations SHOULD consider:
        </t>

        <ul>
          <li>HTTP header size limits when tokens are passed in Authorization headers;</li>
          <li>Using token introspection <xref target="RFC7662"/> to retrieve evidence
              details rather than embedding all data in the token;</li>
          <li>Limiting displayed_content length to essential information.</li>
        </ul>
      </section>

      <section title="Token-Evidence Binding">
        <t>
          The <tt>evidence</tt> claim is embedded in a signed access
          token (<xref target="RFC9068"/>), which provides
          integrity protection at the token level.  The inner
          <tt>as_signature</tt> provides a second, independent integrity
          layer specifically over the user confirmation record.  This
          dual-signature design ensures that:
        </t>

        <ul>
          <li>
            Evidence cannot be moved from one token to another without
            detection (the token signature would not cover the new
            evidence);
          </li>
          <li>
            Evidence fields cannot be modified within a valid token
            (the inner AS signature would be invalidated);
          </li>
          <li>
            Evidence can be independently verified even when extracted
            from the token (e.g., via introspection) using the
            <tt>as_signature</tt>.
          </li>
        </ul>

        <t>
          Implementations MUST NOT copy an <tt>evidence</tt> claim from
          one access token into another without re-validating the
          <tt>as_signature</tt> and confirming that the evidence
          <tt>id</tt> and <tt>timestamp</tt> are consistent with the
          new token's context.
        </t>

        <t>
          The dual-signature design described above applies to signed
          JWT access tokens (<xref target="RFC9068"/>).  When opaque
          (reference) tokens are used, the <tt>evidence</tt> claim is
          not embedded in the token itself and MUST be retrieved by
          the RS via token introspection (<xref target="RFC7662"/>)
          or a dedicated evidence retrieval endpoint.  In this case,
          the <tt>as_signature</tt> provides the sole integrity
          protection for the evidence record, and implementations
          MUST ensure that the transport between the RS and the
          introspection or retrieval endpoint is protected with TLS.
        </t>
      </section>

      <section title="Evidence Freshness">
        <t>
          An evidence record captures user consent at a specific point
          in time.  Deployments SHOULD define an evidence freshness
          policy that specifies:
        </t>

        <ul>
          <li>
            The maximum acceptable age of an evidence record (measured
            from the <tt>user_confirmation.timestamp</tt> to the
            current time);
          </li>
          <li>
            Whether evidence freshness is evaluated relative to the
            token's <tt>iat</tt> claim or the current request time;
          </li>
          <li>
            Actions to take when evidence is stale (e.g., reject the
            request, require re-consent).
          </li>
        </ul>

        <t>
          For high-sensitivity operations (e.g., financial transactions),
          a short freshness window (e.g., minutes) is RECOMMENDED.  For
          lower-sensitivity operations, a longer window (e.g., hours)
          may be acceptable.
        </t>
      </section>

      <section title="Cross-Domain Evidence Verification">
        <t>
          In cross-domain scenarios where the RS is in a different
          trust domain than the AS, the RS must be able to verify the
          <tt>as_signature</tt> using the AS's public key.
          Implementations SHOULD:
        </t>

        <ul>
          <li>
            Publish the AS's evidence signing keys at a well-known
            JWKS endpoint (<xref target="RFC7517"/>) accessible to
            the RS;
          </li>
          <li>
            Include a <tt>kid</tt> (Key ID) in the JWS header of
            the <tt>as_signature</tt> to enable key selection;
          </li>
          <li>
            Support key caching at the RS with appropriate cache
            invalidation to balance performance and key freshness.
          </li>
        </ul>

        <t>
          When the AS and RS belong to different administrative domains,
          trust establishment for the evidence signing key MAY be
          facilitated through a trust framework, federation agreement,
          or explicit key distribution mechanism.
        </t>
      </section>
    </section>

    <section anchor="privacy" title="Privacy Considerations">
      <t>
        The privacy considerations in this section are informed by the
        Internet protocol privacy analysis framework described in
        <xref target="RFC6973"/>.
      </t>

      <section title="Displayed Content">
        <t>
          The <tt>displayed_content</tt> field may contain sensitive information about 
          the user's intent. Implementations SHOULD:
        </t>

        <ul>
          <li>Minimize information in displayed_content to what is necessary;</li>
          <li>Avoid including personal data unless required;</li>
          <li>Consider encryption for highly sensitive content.</li>
        </ul>
      </section>

      <section title="Evidence Retention">
        <t>
          Evidence records may be subject to data protection regulations.
          Implementations MUST:
        </t>

        <ul>
          <li>Define retention periods appropriate to regulatory requirements;</li>
          <li>Provide mechanisms for evidence deletion when required;</li>
          <li>Limit access to evidence records to authorized parties.</li>
        </ul>
      </section>

      <section title="Right to Erasure and Audit Retention">
        <t>
          Data protection regulations such as GDPR and CCPA grant
          individuals the right to request deletion of their personal
          data.  Evidence records, which may contain
          <tt>displayed_content</tt> reflecting user intent,
          can constitute personal data.
        </t>

        <t>
          However, evidence records also serve as audit artifacts
          required by financial, healthcare, and other regulated
          industries.  Implementations SHOULD resolve this tension by:
        </t>

        <ul>
          <li>
            Minimizing personal data in evidence fields at creation
            time (e.g., using operation identifiers rather than
            natural-language descriptions that may contain PII);
          </li>
          <li>
            Defining separate retention policies for the evidence
            record (which may be retained longer for audit) and the
            personal data within it (which may need to be redacted
            earlier).
          </li>
        </ul>

        <t>
          Note on redaction and signature integrity: The
          <tt>as_signature</tt> covers the <tt>id</tt> and
          <tt>user_confirmation</tt>
          fields as an inseparable unit.  Redacting any field within
          these objects (e.g., removing <tt>displayed_content</tt>)
          invalidates the <tt>as_signature</tt>.  Implementations
          that require redaction of personal data from evidence
          records SHOULD use the Reference strategy defined in
          <xref target="evidence-token-exchange"/> (Evidence in Token Exchange):
          issue tokens that carry only an <tt>audit_trail</tt> claim
          with the <tt>evidence_ref</tt>, and perform redaction in
          the AS's evidence store.  The RS then retrieves the
          (potentially redacted) evidence record via token
          introspection (<xref target="RFC7662"/>) rather than
          reading it directly from the token.
        </t>
      </section>
    </section>

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

        <dl>
          <dt>Claim Name:</dt>
          <dd>evidence</dd>
          <dt>Claim Description:</dt>
          <dd>
            User confirmation evidence with AS signature for authorization 
            proof and audit purposes.
          </dd>
          <dt>Change Controller:</dt>
          <dd>IETF</dd>
          <dt>Specification Document:</dt>
          <dd><xref target="evidence-claim" format="counter"/> of this document</dd>
        </dl>

        <dl>
          <dt>Claim Name:</dt>
          <dd>audit_trail</dd>
          <dt>Claim Description:</dt>
          <dd>
            Semantic traceability metadata linking user intent to authorized
            operations.
          </dd>
          <dt>Change Controller:</dt>
          <dd>IETF</dd>
          <dt>Specification Document:</dt>
          <dd><xref target="audit-trail-claim" format="counter"/> of this document</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.6749.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.7515.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7517.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6819.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6973.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.8259.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9068.xml"/>
      </references>

      <references>
        <name>Informative References</name>
        <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.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.9126.xml"/>

        <reference anchor="I-D.liu-oauth-rego-policy">
          <front>
            <title>Rego Policy Language for OAuth 2.0</title>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-liu-oauth-rego-policy-00"/>
        </reference>

        <reference anchor="I-D.liu-oauth-chain-delegation">
          <front>
            <title>Chain Delegation for OAuth 2.0</title>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-liu-oauth-chain-delegation-01"/>
        </reference>

        <reference anchor="I-D.parecki-oauth-jwt-grant-interaction-response">
          <front>
            <title>JWT Authorization Grant with Interaction Response</title>
            <author initials="A." surname="Parecki"/>
            <author initials="B." surname="Campbell"/>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-parecki-oauth-jwt-grant-interaction-response-00"/>
        </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>
      </references>
    </references>

    <section title="Complete Example">
      <t>
        The following shows a complete access token with both evidence and
        audit_trail claims:
      </t>

      <t>
        This example also illustrates how the <tt>evidence</tt> claim
        complements the <tt>rego_policy</tt> authorization data type
        (<xref target="I-D.liu-oauth-rego-policy"/>).  While the Rego
        policy defines <strong>what operations are permitted</strong>
        (the behavioral constraint contract), the evidence claim records
        <strong>why those operations were authorized</strong> (the user's
        explicit consent).  Together, they enable a Resource Server to
        enforce fine-grained policy while maintaining a verifiable audit
        trail linking each authorized action back to user intent.
      </t>

      <t>
        The <tt>act.sub</tt> value uses the <tt>wit://</tt> URI scheme
        to identify the acting agent by its workload identity, as
        defined in the Identity Assertion Authorization Grant
        (<xref target="I-D.ietf-oauth-identity-assertion-authz-grant"/>).
        The hash suffix provides a collision-resistant binding between
        the URI and the agent's attestation evidence.
      </t>

      <figure>
        <artwork name="Complete Access Token Example" type="json"><![CDATA[
{
  "iss": "https://as.example.com",
  "sub": "user_12345",
  "aud": "https://api.shop.example",
  "exp": 1731369540,
  "iat": 1731320700,
  "jti": "urn:uuid:token-abc-123",
  
  "act": {
    "sub": "wit://myassistant.example/sha256.abc123..."
  },
  
  "evidence": {
    "id": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "user_confirmation": {
      "displayed_content": "Add items under $50 to cart",
      "user_action": "confirmed_via_button_click",
      "timestamp": 1731320595
    },
    "as_signature": "eyJhbGciOiJFUzI1NiJ9..MEUCIQDx..."
  },
  
  "audit_trail": {
    "evidence_ref": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "semantic_expansion_level": "medium",
    "proposal_ref": "urn:uuid:proposal-xyz"
  },
  
  "authorization_details": [
    {
      "type": "rego_policy",
      "policy": {
        "type": "rego",
        "uri": "https://as.example.com/policies/policy-cart-50",
        "entry_point": "allow"
      }
    }
  ]
}
        ]]></artwork>
      </figure>
    </section>

    <section title="Acknowledgments" numbered="false">
      <t>
        The authors would like to thank Brian Campbell for his valuable 
        feedback and insightful discussions during the development of this 
        specification. His contributions helped shape key design decisions.
      </t>
    </section>
  </back>

</rfc>
