<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.43 (Ruby 2.7.5) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-davliatshin-oauth-attenuation-chains-report-00" category="info" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="Attenuation Chains Analysis">Independent Implementation and Formal Analysis of Attenuating Delegation Chains for AI Agents</title>

    <author initials="A." surname="Davliatshin" fullname="Azat Davliatshin">
      <organization></organization>
      <address>
        <email>ardavlyatshin@gmail.com</email>
      </address>
    </author>

    <date year="2026" month="November" day="02"/>

    <area>Security</area>
    <workgroup>Web Authorization Protocol</workgroup>
    <keyword>OAuth</keyword> <keyword>delegation</keyword> <keyword>attenuation</keyword> <keyword>agents</keyword> <keyword>formal verification</keyword> <keyword>interoperability</keyword>

    <abstract>


<?line 83?>

<t>This document reports an independent implementation and formal analysis of
two individual Internet-Drafts that propose offline-verifiable, attenuating
delegation chains for AI agents: Attenuating Authorization Tokens (AATs),
in revisions -01 and -02, and the Agent Delegation Chain of
draft-asor-wimse-agent-delegation-chain-02. It describes a minimal verifier
written from each draft's text, with profiles for AAT -01, AAT -02 and
asor-02, and a ProVerif model of the chain structures of AAT -01 and
asor-02. The AAT -02 profile, written from the text and then run against
the author's 229-vector test suite, agrees with it on all 229 vectors. Of
25 observations recorded on AAT -01, the -02 text resolves 19 (16 closed,
3 closed as intended design); one is partly resolved, one no longer arises,
and four remain open. The report lists ten points where -02 leaves an
implementer more than one conforming behaviour. Two properties raised in
public review are checked on both chain structures. The author of this
report is not an author of either draft. The report specifies nothing; it
follows the shape of RFC 7942.</t>



    </abstract>

    <note title="About This Document" removeInRFC="true">
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-davliatshin-oauth-attenuation-chains-report/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Web Authorization Protocol Working Group mailing list (<eref target="mailto:oauth@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/oauth/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/oauth/"/>.
      </t>
    </note>


  </front>

  <middle>


<?line 102?>

<section anchor="introduction"><name>Introduction</name>

<!-- What goes here: what was done, what was not, who did it. -->

<t>Several individual Internet-Drafts propose chains of signed tokens in which
each link can only narrow the authority of the one before it, so that a
verifier can check an agent's authority offline. This report covers two of
them, <xref target="AAT-01"/> with its revision <xref target="AAT-02"/>, and <xref target="ASOR-02"/>. Other
individual drafts propose related mechanisms (a delegation header over HTTP
message signatures; an issuer-per-hop chain anchored in a trust registry);
they are outside this report.</t>

<t>The work began against AAT-01. AAT-02 appeared on 26 October 2026, with
changes that its Appendix F describes as breaking -01 implementations, and
with a byte-exact test-vector suite and a procedure for comparing results.
The verifier gained a separate profile for -02. This report covers both
versions and says which of its observations on -01 the -02 text resolves
(<xref target="findings-aat"/>).</t>

<t>What was done:</t>

<t><list style="symbols">
  <t>A minimal TypeScript verifier for the chain checks of both drafts,
written as an executable specification (see <xref target="verifier"/>).</t>
  <t>A separate verifier profile for AAT-02, written from the -02 text and
then run against the author's 229-vector suite: 229 of 229 verdicts
agree, with the expected -02 Section 8 step on every denial.</t>
  <t>A ProVerif model <xref target="PROVERIF"/> of the shared chain structure (parent-hash
linkage, depth, lifetime and capability monotonicity, holder binding and
proof of possession), instantiated for both drafts (see <xref target="model"/>).</t>
  <t>This report.</t>
</list></t>

<t>What was not done: no minting or issuing service, no CBOR encoding, no
revocation or status-list handling. The AAT-02 profile was run against the
author's published vectors; it has not exchanged tokens with another running
implementation.</t>

<t>Who did it: an individual, not an author of either draft. The shape and
tone of this report follow <xref target="AGNIHOTRI-02"/>. The drafts are
the object of study; the mechanisms described here are theirs.</t>

<t>Source code, model and vectors: <eref target="https://github.com/azatdavliatshin/aat"></eref>
(verifier: <eref target="https://github.com/azatdavliatshin/aat/tree/main/verifier"></eref>;
model: <eref target="https://github.com/azatdavliatshin/aat/tree/main/model"></eref>).</t>

</section>
<section anchor="conventions"><name>Conventions and Terminology</name>

<!-- What goes here: BCP 14 boilerplate, terms, short names, label scheme. -->

<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" 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, as shown here.</t>

<?line -18?>

<t>This document uses the following terms, informally, across both drafts.</t>

<dl>
  <dt>chain:</dt>
  <dd>
    <t>An ordered list of tokens, the first a root minted by a trust anchor or
issuer and each later one a link attenuating its predecessor.</t>
  </dd>
  <dt>link:</dt>
  <dd>
    <t>A token in a chain other than the root.</t>
  </dd>
  <dt>holder:</dt>
  <dd>
    <t>The party named by a token's confirmation claim (<xref target="RFC7800"/>) as able to
present it; in AAT-01 and AAT-02 also the only party able to derive from
it (I1).</t>
  </dd>
  <dt>issuer:</dt>
  <dd>
    <t>The party whose key signs a token. In asor-02 this is the <spanx style="verb">iss</spanx> of an
access token (<xref target="RFC9068"/>); in AAT-01 and AAT-02 the root issuer signs
the root, and a derived token is signed by its parent's holder, whose
key thumbprint is its <spanx style="verb">iss</spanx>.</t>
  </dd>
  <dt>attenuation:</dt>
  <dd>
    <t>Producing a link whose authority (capabilities, depth, lifetime) is no
greater than its parent's.</t>
  </dd>
  <dt>PoP:</dt>
  <dd>
    <t>Proof of possession of the key a token is bound to, for example a DPoP
proof <xref target="RFC9449"/>.</t>
  </dd>
</dl>

<t>"AAT-01" is <xref target="AAT-01"/>; "AAT-02" is <xref target="AAT-02"/>; "asor-02" is <xref target="ASOR-02"/>.</t>

<t>Related documents used below: <xref target="RFC8785"/> (JSON Canonicalization Scheme:
asor-02 requires the JWS header and payload of every token to be its
output, Section 3, and compares a constraint it cannot evaluate by its
bytes, Section 4.3; AAT-01 requires it for the PoP JWT payload and for
comparing <spanx style="verb">hta</spanx> with the invocation arguments, Sections 5.2 and 7; -02
drops the payload requirement and compares constraint values and
arguments by it, -02 Section 3.4), <xref target="RFC9278"/> (JWK thumbprint URI, the
<spanx style="verb">iss</spanx> of a derived AAT; asor-02 binds the holder by a <xref target="RFC7638"/>
thumbprint in <spanx style="verb">cnf</spanx> instead) and <xref target="RFC9396"/> (rich authorization
requests; both drafts carry authority as <spanx style="verb">authorization_details</spanx>).</t>

<t>Finding labels A1 to A7 (asor-02), B1 to B25 (AAT-01), C1 to C10 (AAT-02)
and M1, M2 (the two properties of <xref target="model-properties"/>) are this document's
own numbering. They
are not used by the drafts or by the reviews cited here.</t>

</section>
<section anchor="drafts"><name>Reported Drafts</name>

<!-- What goes here: one subsection per draft; what it proposes, at the
level needed to read sections 4 to 8. No evaluation. -->

<section anchor="drafts-aat"><name>AAT-01 and AAT-02</name>

<t><xref target="AAT-01"/> (Niyikiza) defines Attenuating Authorization Tokens: JWTs whose
<spanx style="verb">authorization_details</spanx> (<xref target="RFC9396"/>) list the tools a holder may invoke and
typed constraints on each argument. A root token is issued by a root issuer
and verified under a configured trust anchor key. Each later token is
derived offline by the holder of its parent: it is signed by the key the
parent names in <spanx style="verb">cnf.jwk</spanx>, its <spanx style="verb">iss</spanx> is that key's JWK thumbprint URI
(<xref target="RFC9278"/>), and its <spanx style="verb">par_hash</spanx> is the SHA-256 hash of the parent's JWS
signing input (Section 4.6). The invariants I1 to I6 (Section 4) let a
derived token only narrow tools, argument constraints (by a per-type
subsumption relation, Section 4.5), delegation depth and lifetime. At each
tool invocation the leaf holder presents a proof-of-possession (PoP) JWT
over the tool and its arguments (Section 5); an enforcement point checks
the chain and the proof in one algorithm (Section 7).</t>

<t><xref target="AAT-02"/> (26 October 2026) keeps this structure and makes normative
changes that, by its Appendix F, break -01 implementations. The JWS
algorithm is the fully-specified <spanx style="verb">Ed25519</spanx> (<xref target="RFC9864"/>) in place of
<spanx style="verb">EdDSA</spanx>, and <spanx style="verb">typ</spanx> is required and explicit (<spanx style="verb">aat+jwt</spanx> for tokens,
<spanx style="verb">aat-pop+jwt</spanx> for the PoP JWT). The PoP JWT carries <spanx style="verb">aat_hash</spanx>, the hash of
the leaf's signing input. Trust anchors are (issuer, public key) pairs, and
the root's <spanx style="verb">iss</spanx> must equal the issuer of the anchor whose key verified it.
Parsing rules are strict: duplicate member names are rejected (<xref target="RFC8259"/>),
NumericDates and depths have no fraction or exponent part, <spanx style="verb">crit</spanx> is
processed, and numbers in arguments and constraints must be admissible
(-02 Section 3.4). Constraint maps gain <spanx style="verb">optional</spanx> arguments and a <spanx style="verb">"*"</spanx>
entry for arguments they do not name (-02 Section 3.3). The subsumption
relation is written as a table of valid (parent, derived) pairs, every
other pair invalid (-02 Section 4.5). MAX_DELEGATION_DEPTH is at least 8.
A presentation object with members <spanx style="verb">aat_chain</spanx> and <spanx style="verb">aat_pop</spanx> is defined
(-02 Section 7.4). The verification algorithm is -02 Section 8; this report
names its steps by number and letter (for example, step 3k). -02 publishes
a byte-exact JWS test-vector suite and lists implementations in its
Appendix E. Both versions are implemented; the model is of -01 (see
<xref target="model"/>).</t>

</section>
<section anchor="asor-02"><name>asor-02</name>

<t><xref target="ASOR-02"/> (Asor) defines the Agent Delegation Chain, a profile of OAuth
2.0 JWT access tokens (<xref target="RFC9068"/>). Each Delegation Token carries its
authority as <spanx style="verb">authorization_details</spanx> (<xref target="RFC9396"/>), the principal in <spanx style="verb">sub</spanx>
(the same value in every token of the chain), the acting agent in
<spanx style="verb">client_id</spanx>, a <spanx style="verb">del_depth</spanx> that grows by one per hop and is bounded by
<spanx style="verb">del_max_depth</spanx>, and, below the root, a <spanx style="verb">par_hash</spanx>: the SHA-256 hash of
the parent's JWS signing input. Tokens are verified under keys configured
at the verifier (Section 6, step 1). The leaf is bound to its holder by
<spanx style="verb">cnf</spanx> (<xref target="RFC7800"/>) and a DPoP proof (<xref target="RFC9449"/>). The offline
verification algorithm (Section 6) enforces monotonic attenuation, bounded
depth, monotonic expiry and the same principal throughout. Modelled and
implemented.</t>

</section>
</section>
<section anchor="verifier"><name>The Verifier</name>

<!-- What goes here: layout, what is checked, what is not, vectors. Facts
live in verifier/README.md; point at it, do not restate. -->

<t>The verifier is a minimal TypeScript implementation, not a product. It
verifies a chain under one of three profiles, <spanx style="verb">aat-01</spanx>, <spanx style="verb">aat-02</spanx> and
<spanx style="verb">asor-02</spanx>, with a shared chain walk and a profile that supplies the named,
section-tagged checks of the draft. Layout, inputs, failure codes and
options are documented in <spanx style="verb">verifier/README.md</spanx>
(<eref target="https://github.com/azatdavliatshin/aat/blob/main/verifier/README.md"></eref>).</t>

<t>The <spanx style="verb">aat-02</spanx> profile is a separate set of files that follows -02 Section 8
step by step; every failure carries the step at which it occurs (for
example, <spanx style="verb">3a</spanx> or <spanx style="verb">4p2</spanx>). The <spanx style="verb">aat-01</spanx> profile is kept unchanged next to it,
as the implementation the AAT-01 findings of <xref target="findings-aat"/> refer to.</t>

<t>It checks, for asor-02, the steps of its verification procedure up to the
action check; for AAT-01, the root, link and leaf checks of its verification
algorithm and the proof of possession; for AAT-02, every step of -02
Section 8, including the PoP JWT, with PoP <spanx style="verb">jti</spanx> tracking and nonces taken
from state the caller supplies. It does not implement:</t>

<t><list style="symbols">
  <t>asor-02: status lists (a token carrying a <spanx style="verb">status</spanx> claim is denied with
the distinct code <spanx style="verb">not_implemented</spanx>), holder binding for <spanx style="verb">x5t#S256</spanx>
(mTLS) confirmation and for ES256 proofs, or a DPoP <spanx style="verb">jti</spanx> replay cache;
cumulative running totals are taken from the caller.</t>
  <t>AAT-01: keys other than Ed25519 (OKP), HS256 (never accepted), a PoP
<spanx style="verb">jti</spanx> replay cache, or extension constraint types (denied); and it parses
every token before verifying any signature, which is not the order of
Section 7.</t>
  <t>AAT-02: algorithms other than <spanx style="verb">Ed25519</spanx> (<spanx style="verb">EdDSA</spanx> is denied, -02
Section 9.11), <spanx style="verb">cnf.jwk</spanx> keys other than OKP Ed25519 (denied at steps 3l
and 4b2), any <spanx style="verb">crit</spanx> parameter (denied whenever present, since no
extension parameter is understood), or extension constraint types
(denied).</t>
</list></t>

<t>The complete list is in <spanx style="verb">verifier/README.md</spanx>.</t>

<t>Vectors:</t>

<t><list style="symbols">
  <t>asor-02: the 35 offline-verification vectors published with the
<spanx style="verb">attenu-guard</spanx> 0.20.0 source distribution, Apache License 2.0, copied
unchanged; all 35 produce the outcome they name.</t>
  <t>AAT-01: 41 vectors of this work's own, written from its reading of -01,
which publishes none. They are not the author's vectors.</t>
  <t>AAT-02: the author's JWS test-vector suite, 229 vectors (54 permit,
175 deny), copied byte for byte from <eref target="https://github.com/tenuo-ai/tenuo"></eref>,
commit 99fb00994d8d66b213cd12967d6e8eef45025672, file
<spanx style="verb">tests/vectors/aat-jws-vectors.json</spanx> (SHA-256
b7a42e9dfdce7fbc1f623670bf060f90e6d6b25f64384cbab1bd79363e82209b),
Apache License 2.0. Result: 229 of 229 verdicts agree on the first run,
0 skipped, and the expected -02 Section 8 step on all 175 denials. No
check was adjusted to a vector. Results were compared with the suite's
own <spanx style="verb">compare_results.py</spanx>, following its <spanx style="verb">INTEROP.md</spanx>.</t>
</list></t>

</section>
<section anchor="model"><name>The Model</name>

<!-- What goes here: abstractions, bound, attacker, properties, results,
limits. Facts live in model/README.md. -->

<t>The model is a symbolic (Dolev-Yao) model in ProVerif's typed applied
pi-calculus. Its roles, abstractions, bound (chains of at most four tokens,
depth and expiry bounded by 3, tool sets over a three-tool alphabet) and
attacker (controls the network, may compromise any holder key, never the
trust anchor's key) are described in <spanx style="verb">model/README.md</spanx>
(<eref target="https://github.com/azatdavliatshin/aat/blob/main/model/README.md"></eref>).</t>

<section anchor="model-properties"><name>Properties</name>

<t>For both profiles:</t>

<dl>
  <dt>P1a:</dt>
  <dd>
    <t>Every root of a chain that passes the link checks was minted by the anchor.</t>
  </dd>
  <dt>P1b:</dt>
  <dd>
    <t>Every link whose parent names an honest holder key was derived from that
parent by that holder, unless the key was compromised. For asor-02, the
variant P1b' states the same with "some uncompromised configured key"
in place of the parent's holder (see A7).</t>
  </dd>
  <dt>P2:</dt>
  <dd>
    <t>The invoked tool was granted at the root.</t>
  </dd>
  <dt>P3:</dt>
  <dd>
    <t>Leaf depth, maximum depth and expiry are bounded by the root's.</t>
  </dd>
  <dt>P4:</dt>
  <dd>
    <t>A leaf naming an honest key is used only by that key's holder
(non-injective).</t>
  </dd>
  <dt>M1:</dt>
  <dd>
    <t>Parent validity after derivation: a parent is still accepted after its
holder has derived a child from it, with no compromise at all.</t>
  </dd>
  <dt>M2:</dt>
  <dd>
    <t>Intermediate links carry no proof of possession of their own. Variants
(a) an attacker derives a child of a token it merely observed,
(b) a request is accepted under such a link, (c) a token is usable
without its holder's key.</t>
  </dd>
</dl>

<t>M1 and M2 are the two points of <xref target="MADDEN-REVIEW"/>.</t>

</section>
<section anchor="model-results"><name>Results</name>

<!-- What goes here: the results table, copied from model/out/SUMMARY.md
(query text abbreviated to its label; full queries are in SUMMARY.md),
ProVerif 2.05, seconds of CPU per model file. -->

<texttable title="ProVerif results (version 2.05)" anchor="tbl-results">
      <ttcol align='left'>Model</ttcol>
      <ttcol align='left'>Seconds</ttcol>
      <ttcol align='left'>Query</ttcol>
      <ttcol align='left'>Result</ttcol>
      <c>aat01</c>
      <c>42</c>
      <c>P1a</c>
      <c>true</c>
      <c>aat01</c>
      <c>42</c>
      <c>P1b</c>
      <c>true</c>
      <c>aat01</c>
      <c>42</c>
      <c>P2</c>
      <c>true</c>
      <c>aat01</c>
      <c>42</c>
      <c>P3</c>
      <c>true</c>
      <c>aat01</c>
      <c>42</c>
      <c>P4</c>
      <c>true</c>
      <c>aat01-no-i5</c>
      <c>16</c>
      <c>P1a</c>
      <c>true</c>
      <c>aat01-no-i5</c>
      <c>16</c>
      <c>P1b</c>
      <c>false</c>
      <c>aat01-no-i6</c>
      <c>12</c>
      <c>P4</c>
      <c>false</c>
      <c>aat01-p4-inj</c>
      <c>23</c>
      <c>P4 injective</c>
      <c>false</c>
      <c>aat01-p4-inj</c>
      <c>23</c>
      <c>P4</c>
      <c>true</c>
      <c>aat01-m1</c>
      <c>1</c>
      <c>M1</c>
      <c>reached</c>
      <c>aat01-m2</c>
      <c>39</c>
      <c>M2 (a)</c>
      <c>true</c>
      <c>aat01-m2</c>
      <c>39</c>
      <c>M2 (b)</c>
      <c>true</c>
      <c>aat01-m2</c>
      <c>39</c>
      <c>M2 (c) = P4</c>
      <c>true</c>
      <c>asor02</c>
      <c>197</c>
      <c>P1a</c>
      <c>true</c>
      <c>asor02</c>
      <c>197</c>
      <c>P1b'</c>
      <c>true</c>
      <c>asor02</c>
      <c>197</c>
      <c>P2</c>
      <c>true</c>
      <c>asor02</c>
      <c>197</c>
      <c>P3 (depth, expiry)</c>
      <c>true</c>
      <c>asor02</c>
      <c>197</c>
      <c>P3 (maximum depth)</c>
      <c>true</c>
      <c>asor02</c>
      <c>197</c>
      <c>P4</c>
      <c>true</c>
      <c>asor02-p1b</c>
      <c>37</c>
      <c>P1b</c>
      <c>false</c>
      <c>asor02-nodpop</c>
      <c>113</c>
      <c>P1a</c>
      <c>true</c>
      <c>asor02-nodpop</c>
      <c>113</c>
      <c>P1b</c>
      <c>false</c>
      <c>asor02-nodpop</c>
      <c>113</c>
      <c>P1b'</c>
      <c>true</c>
      <c>asor02-nodpop</c>
      <c>113</c>
      <c>P2</c>
      <c>true</c>
      <c>asor02-nodpop</c>
      <c>113</c>
      <c>P3 (depth, expiry)</c>
      <c>true</c>
      <c>asor02-nodpop</c>
      <c>113</c>
      <c>P4</c>
      <c>false</c>
      <c>asor02-m1</c>
      <c>139</c>
      <c>M1</c>
      <c>reached</c>
      <c>asor02-m2 (DPoP on)</c>
      <c>475</c>
      <c>M2 (a)</c>
      <c>false</c>
      <c>asor02-m2 (DPoP on)</c>
      <c>475</c>
      <c>M2 (b)</c>
      <c>false</c>
      <c>asor02-m2 (DPoP on)</c>
      <c>475</c>
      <c>M2 (c) = P4</c>
      <c>true</c>
      <c>asor02-nodpop-m2</c>
      <c>120</c>
      <c>M2 (a)</c>
      <c>false</c>
      <c>asor02-nodpop-m2</c>
      <c>120</c>
      <c>M2 (b)</c>
      <c>false</c>
      <c>asor02-nodpop-m2</c>
      <c>120</c>
      <c>M2 (c) = P4</c>
      <c>false</c>
      <c>asor02-holder-signs-m2 (DPoP on, <spanx style="verb">hs</spanx>)</c>
      <c>350</c>
      <c>M2 (a)</c>
      <c>true</c>
      <c>asor02-holder-signs-m2</c>
      <c>350</c>
      <c>M2 (b)</c>
      <c>true</c>
      <c>asor02-holder-signs-m2</c>
      <c>350</c>
      <c>M2 (c) = P4</c>
      <c>true</c>
      <c>asor02-nodpop-holder-signs-m2 (<spanx style="verb">hs</spanx>)</c>
      <c>143</c>
      <c>M2 (a)</c>
      <c>true</c>
      <c>asor02-nodpop-holder-signs-m2</c>
      <c>143</c>
      <c>M2 (b)</c>
      <c>true</c>
      <c>asor02-nodpop-holder-signs-m2</c>
      <c>143</c>
      <c>M2 (c) = P4</c>
      <c>false</c>
</texttable>

<t>Each row is one query of one model file. A file without a suffix is a
profile with every check in place, and every query of it is expected
true. A <spanx style="verb">.expectfalse</spanx> file is a variant with one check removed
(<spanx style="verb">no-i5</spanx>, <spanx style="verb">no-i6</spanx>, <spanx style="verb">nodpop</spanx>) or asks for a property the profile does not
claim (<spanx style="verb">p4-inj</spanx>, <spanx style="verb">asor02-p1b</spanx>, the asor-02 M2 files), and at least one of
its queries is expected false; a <spanx style="verb">.reachable</spanx> file asks whether an event
occurs in a run of honest roles only, and "reached" is the expected
answer. A "false" in a variant is therefore the expected outcome of that
variant, not a failed proof; each is accompanied by a ProVerif derivation
and trace in <spanx style="verb">model/out/</spanx>, summarized in <spanx style="verb">model/README.md</spanx>. <spanx style="verb">hs</spanx> is the
holder-signs flag of the asor-02 model (<xref target="cross"/>). A "true" is a
ProVerif proof for an unbounded number of sessions of the bounded model
(<xref target="model-limits"/>), not a statement about the draft text. Seconds are
wall-clock per model file on one machine under <spanx style="verb">make -j6</spanx>, from
<spanx style="verb">model/out/SUMMARY.md</spanx>; they are indicative.</t>

</section>
<section anchor="model-limits"><name>What the Model Does Not Say</name>

<t>Nothing about constraint semantics below the tool level, time (freshness,
skew, lifetimes; only expiry order), revocation, the trust anchor's key,
size and algorithm checks, or chains longer than four tokens. A "true" is
a ProVerif proof for unbounded sessions of the bounded model, not for the
draft text.</t>

</section>
</section>
<section anchor="findings-aat"><name>Findings on AAT-01 and Their Status in -02</name>

<!-- What goes here: one entry per finding, label, section of AAT-01,
argument. Section numbers are those of -01. Kinds: gap, inconsistency,
redundancy, implementation choice. -->

<t>Section numbers in this section are those of AAT-01 unless marked "-02
Section". Each finding B1 to B25 has a status line, starting "-02:", that
gives how the -02 text relates to it:</t>

<dl>
  <dt>closed:</dt>
  <dd>
    <t>The -02 text decides the point.</t>
  </dd>
  <dt>closed as design:</dt>
  <dd>
    <t>-02 keeps the behaviour and says it is intended.</t>
  </dd>
  <dt>partly:</dt>
  <dd>
    <t>-02 decides part of the point.</t>
  </dd>
  <dt>moot:</dt>
  <dd>
    <t>The question no longer arises in -02.</t>
  </dd>
  <dt>open:</dt>
  <dd>
    <t>Unchanged in -02.</t>
  </dd>
</dl>

<t>Where a vector of the author's suite pins the point, the status line names
it by its identifier (J.x.y). Step numbers such as 3k are those of -02
Section 8.</t>

<section anchor="aat-constraints"><name>Constraints (B1 to B8)</name>

<t><list style="symbols">
  <t>B1 (Section 4.5): cross-type subsumption is an allow-list. Section 4.5
of -01 defines subsumption as a fixed list of per-type rules over
(derived, parent) constraint-type pairs and declares every other pair
invalid (-02 writes the same list as a table). The list leaves out some
pairs whose narrowing is decidable from the values alone.
For a composite parent the list loses nothing of its own: an <spanx style="verb">exact</spanx>
under an <spanx style="verb">any</spanx> can be written as a one-clause <spanx style="verb">any</spanx> (see B2). Two pairs
are lost outright: a <spanx style="verb">one_of</spanx> whose members all fall inside a parent
<spanx style="verb">range</spanx>, and an <spanx style="verb">exact</spanx> under a <spanx style="verb">not_one_of</spanx>, have no equivalent in the
parent's type.
This implementation follows the list and rejects all of them. -02 keeps
the pairs and names the choice: the verifier compares types, not values,
so that every verifier gives the same verdict.  <vspace blankLines='1'/>
-02: closed as design -- -02 Section 4.5 lists every valid (parent,
derived) pair and says "Every other pair is invalid"; J.19.1, J.19.4 to
J.19.7 and J.8.4 deny semantically narrower pairs, and their notes call
this conservative by design.</t>
  <t>B2 (Section 4.5): non-composite child under a composite parent. Section
4.5 of -01 gives rules for <spanx style="verb">all</spanx> and <spanx style="verb">any</spanx> only against a parent of the
same type, so a plain constraint under a composite parent falls under the
closing sentence and is invalid. This implementation rejects it. Nothing
is lost beyond B1, because the child can be written in the parent's
type. Under an <spanx style="verb">any</spanx>, a one-clause <spanx style="verb">any</spanx> is valid when the child narrows
one of the parent's clauses. Under an <spanx style="verb">all</spanx>, the child has to narrow
every parent clause: -01 matches each parent clause to a distinct
derived clause, so the child is repeated once per clause, while -02 lets
one derived clause satisfy several. Each step goes through the pairs, so
the rewrite fails exactly where a clause meets one of the two pairs of
B1, and an <spanx style="verb">all</spanx> with more clauses meets them more often.  <vspace blankLines='1'/>
-02: closed as design -- J.8.4 (range under all) and J.19.1 (exact under
any) are denied; J.18.1 denies all under any.</t>
  <t>B3 (Section 4.5): empty composite constraints. Section 4.5 of -01 says
only that a derived <spanx style="verb">any</spanx> must contain at least one clause. An empty
<spanx style="verb">all</spanx> is satisfied by every value and an empty <spanx style="verb">any</spanx> by none, so an empty
parent <spanx style="verb">all</spanx> grants the argument without limit and an empty parent <spanx style="verb">any</spanx>
forbids it; -01 addresses neither. This implementation treats an empty
clause list as malformed for both types, in either position.  <vspace blankLines='1'/>
-02: closed -- -02 Section 4.5 makes an empty all or any invalid in both
the parent and the derived position; it is denied at steps 3n and 4o
(J.21.7, J.16.3).</t>
  <t>B4 (Section 4.5): range corner cases. Section 4.5 of -01 compares the
bounds of a derived <spanx style="verb">range</spanx> with the parent's, one bound at a time. It
does not say what a range that no number satisfies means (<spanx style="verb">min</spanx> greater
than <spanx style="verb">max</spanx>, or equal bounds with an exclusive side), nor what an
inclusivity flag without its bound means. This implementation applies
the bound rules literally, which never widens authority. An empty
derived range whose bounds lie inside the parent's is accepted and
denies every value; one whose bounds lie outside is rejected, although
an empty set narrows anything. Under an empty parent every derived range
that passes the bound rules is itself empty. A flag without its bound
has no effect. A verifier that rejects empty ranges as malformed
therefore denies more than this one, never less, and neither grants
anything the parent does not.  <vspace blankLines='1'/>
-02: partly -- -02 Section 3.4 well-formedness requires min not greater
than max and inclusivity flags only with their bound (J.8.6, J.8.21,
J.8.24). An empty range with equal bounds and an exclusive side (min
equal to max, min_inclusive false) is still well-formed.</t>
  <t>B5 (Section 3.4): value model and equality. -01 says only that
<spanx style="verb">exact.value</spanx> is "any scalar" and must be equal "exactly"; it does not
say whether null is a scalar, whether <spanx style="verb">1</spanx> equals <spanx style="verb">"1"</spanx> or <spanx style="verb">1.0</spanx>, or what
happens to a number a parser cannot hold exactly. This implementation
takes string, number and boolean, compares by JCS, and refuses integers
beyond 2^53-1 so that a constraint and the tool see the same value. That
refusal covers integers only: a fraction such as 1.00000000000000001 is
still read as 1.  <vspace blankLines='1'/>
-02: closed -- <spanx style="verb">exact.value</spanx> may be a string, number, boolean or null,
equality is by JCS, and the admissibility rule of -02 Section 3.4
replaces this implementation's refusal of integers above 2^53-1 (J.8.8
permit; J.8.7, J.8.10, J.8.14 deny).</t>
  <t>B6 (Section 3.4): arrays as sets. -01 does not say whether order or
duplicates matter in the arrays of <spanx style="verb">contains</spanx> and <spanx style="verb">subset</spanx>, so two
verifiers can disagree on the same argument. This implementation treats
both arrays as sets.  <vspace blankLines='1'/>
-02: closed -- -02 Section 3.4: contains and subset "treat their arrays
as sets" (J.26.11, J.26.12).</t>
  <t>B7 (Section 3.4): unknown members of a core constraint type. -01
specifies what to do with an unknown constraint type and says that
unknown top-level claims are ignored, but not what to do with an unknown
member of a known type. Ignoring it would be unsafe: a misspelt bound
such as <spanx style="verb">maximum</spanx> for <spanx style="verb">max</spanx> would leave the argument unbounded. This
implementation rejects such a constraint as malformed.  <vspace blankLines='1'/>
-02: closed -- well-formedness allows "no members other than" those of
the type (J.21.12, <spanx style="verb">maximum</spanx>). The strict reading of -01 taken by this
implementation is now the text.</t>
  <t>B8 (Sections 3.6.2, 4.5): key-set rule and tool omission. Under a
non-empty constraint map -01 fixes the shape of an invocation: every
named argument must be present and no other may appear. A derived token
may drop a whole tool (Section 3.6.2) but must keep exactly the parent's
argument keys, because adding or dropping a key yields invocations the
parent would reject. The rules are consistent; the cost is rigidity. A
holder cannot forbid one argument while keeping the tool, and an
argument the issuer wants to leave optional cannot be constrained at
all; only a parent with an empty map lets a child choose keys. This
implementation follows the rules as written.  <vspace blankLines='1'/>
-02: moot -- <spanx style="verb">optional</spanx> and <spanx style="verb">"*"</spanx> (-02 Section 3.3, the key rules of -02
Section 4.5, steps 4p2 and 4p3) give the means the closed-world key rule
lacked (J.22.*).</t>
</list></t>

</section>
<section anchor="aat-chain"><name>Chain (B9 to B19)</name>

<t><list style="symbols">
  <t>B9 (Section 4, Section 7): redundant checks (I2e, step 5). Some checks
of -01 Section 7 follow from others. <spanx style="verb">child.del_depth &lt;=
parent.del_max_depth</spanx> (4e) follows from 4g and 4m, <spanx style="verb">child.del_depth &lt;=
MAX_DELEGATION_DEPTH</spanx> (4f) from 3i, 4g and 4m, and the "defense in depth"
step 5 from 3c and 4d. No input fails one of them alone; this
implementation keeps all of them, and its property tests reach 4e only
together with 4g or 4m. Redundant checks are harmless, but a test suite
cannot cover them as single faults.  <vspace blankLines='1'/>
-02: open -- unchanged in -02 Section 8. The suite's README names "steps
4e, 4f and 5" among the checks that can never be the only fault. J.10.c
reaches 4e only as the first of two faults (4m also fails).</t>
  <t>B10 (Section 4.4): MAX_TOKEN_LIFETIME is redundant by construction. A
child cannot outlive its parent, so a lifetime bound checked on the root
holds for every link; the note to step 4l of -01 says as much. This
implementation checks it on every token anyway.  <vspace blankLines='1'/>
-02: closed -- the notes to -02 Section 8 say the bound holds by
induction (steps 3h, 4h and 4j); -02 has no per-child lifetime step.</t>
  <t>B11 (Section 7): which anchor key verifies the root and what <spanx style="verb">iss</spanx>
means. In -01 the trust anchors are "a set of public keys" without
issuer names; the root verifies under any of them (step 3b), and step 3k
requires only that <spanx style="verb">root.iss</spanx> be a URI. Section 3.2 says that <spanx style="verb">iss</spanx>
identifies the root issuer, but nothing ties it to the key that
verified the signature. When an enforcement point trusts more than one
issuer, any of them can sign a root that names another as <spanx style="verb">iss</spanx>, and the
chain verifies. Within -01 this does not change a verdict, since nothing
else reads <spanx style="verb">root.iss</spanx>; it matters as soon as audit or local policy relies
on the issuer. The <spanx style="verb">aat-01</spanx> profile follows -01 and accepts the root
under any anchor; the <spanx style="verb">aat-02</spanx> profile implements the new step 3k.  <vspace blankLines='1'/>
-02: closed -- trust anchors are (issuer, key) pairs; step 3k compares
the root's <spanx style="verb">iss</spanx> with the issuer of the anchor that verified the
signature (J.21.6, J.21.22, J.21.23).</t>
  <t>B12 (Section 4.2): I1 comparison of a URN as a string. I1 requires
<spanx style="verb">child.iss</spanx> to equal <spanx style="verb">jwk_thumbprint_uri(parent.cnf.jwk)</spanx>, a URN.
<xref target="RFC8141"/> makes parts of a URN case-insensitive, so "equals" can be
read as a string or as a URN comparison. This implementation compares
strings exactly; it computes the thumbprint for OKP keys only, with the
member order of <xref target="RFC7638"/>. An exact comparison can only deny more, never
less.  <vspace blankLines='1'/>
-02: open -- step 4c still says "equals"; -02 says nothing about
case-insensitive comparison of the URN (<xref target="RFC8141"/>). J.27.6 pins only
the thumbprint members.</t>
  <t>B13 (Sections 3.2, 7, 8.13): algorithms and thumbprints. -01 Section 3.2
requires support for Ed25519, while Section 8.13 admits the DPoP
algorithm list, including ES256 and RS256, and the closing note of
Section 7 mentions Ed448; I1 would
then need thumbprints for those key types as well. This implementation
accepts only <spanx style="verb">EdDSA</spanx> with an OKP Ed25519 key and always refuses
symmetric algorithms (Section 8.13).  <vspace blankLines='1'/>
-02: closed -- the fully-specified <spanx style="verb">Ed25519</spanx> (<xref target="RFC9864"/>); -02 forbids
accepting <spanx style="verb">EdDSA</spanx> and requires <spanx style="verb">alg</spanx> to be consistent with the key's
<spanx style="verb">kty</spanx> and <spanx style="verb">crv</spanx> (J.7.5, J.7.8, J.7.10, J.14.b).</t>
  <t>B14 (Section 7): parse before verify. -01 Section 7 forbids reading
claims before the signature is verified, but step 4b needs the parent's
parsed <spanx style="verb">cnf.jwk</spanx>, and step 2c lets <spanx style="verb">jti</spanx> be extracted first. This
implementation checks the size limits (2a, 2b), parses every token, and
then verifies. The verdict is the same either way; only the reported
code for a forged malformed token differs (<spanx style="verb">malformed</spanx> rather than
<spanx style="verb">signature_invalid</spanx>).  <vspace blankLines='1'/>
-02: closed -- steps 3b, 4b and 7b fix the order per token. With pairs
walked in order, the parent's <spanx style="verb">cnf.jwk</spanx> is parsed before the child's
signature is needed. The <spanx style="verb">aat-02</spanx> profile follows the order literally;
<spanx style="verb">aat-01</spanx> keeps parse-first.</t>
  <t>B15 (Sections 3.2, 3.4): <spanx style="verb">sub</spanx>. -01 Section 3.2 "intentionally omits"
<spanx style="verb">sub</spanx>, and Section 3.4 says a token must not be rejected solely for
claims outside those defined. Rejecting a token with <spanx style="verb">sub</spanx> is therefore
not required, and arguably not allowed. This implementation rejects it
by default and has an option to accept it.  <vspace blankLines='1'/>
-02: open -- -02 still "intentionally omits the sub claim" and requires
unrecognized top-level claims to be ignored. The <spanx style="verb">aat-02</spanx> profile does
not reject <spanx style="verb">sub</spanx> by default (<spanx style="verb">rejectSub</spanx> false). No vector carries <spanx style="verb">sub</spanx>
(J.27.1 covers other unrecognized claims).</t>
  <t>B16 (Section 3.2): <spanx style="verb">jti</spanx> format. -01 says <spanx style="verb">jti</spanx> <bcp14>SHOULD</bcp14> be a UUIDv7 and,
when a UUID is used, <bcp14>MUST</bcp14> be lowercase and hyphenated, but steps 3j and
4b1 check only for a non-empty string. This implementation accepts any
non-empty string and rejects a UUID-shaped value with upper-case
letters.  <vspace blankLines='1'/>
-02: closed -- the notes to -02 Section 8 say the lowercase UUID form
"binds producers and has no verification step". The <spanx style="verb">aat-02</spanx> profile
checks only for a non-empty string (<spanx style="verb">aat-01</spanx> still rejects upper-case
UUIDs).</t>
  <t>B17 (Section 7): limits without defaults. MAX_DELEGATION_DEPTH has no
recommended value in -01; the other limits (MAX_IAT_SKEW 30 s,
MAX_TOKEN_LIFETIME 90 days, MAX_CONSTRAINT_DEPTH 32, MAX_TOKEN_SIZE
64 KiB, MAX_STACK_SIZE 256 KiB) are <bcp14>RECOMMENDED</bcp14>. Whether a chain is
valid then depends on local configuration, and a test vector has to
state the limits it assumes. This implementation uses 16 for the depth.  <vspace blankLines='1'/>
-02: closed -- MAX_DELEGATION_DEPTH is at least 8 (J.10.f, J.21.15,
J.21.19); the suite states every parameter.</t>
  <t>B18 (Section 4.6): <spanx style="verb">par_hash</spanx> covers the signing input, not the
signature. Two JWS with the same signing input and different signature
bytes are therefore the same parent for I5. With Ed25519 and strict
verification this cannot be exploited; the choice is still worth stating
in the draft, since a profile with a malleable signature algorithm would
inherit it.  <vspace blankLines='1'/>
-02: open -- unchanged design; <spanx style="verb">aat_hash</spanx> is computed the same way.</t>
  <t>B19 (Sections 4.2, 4.7, 8.9): the review's points as AAT-01 answers
them. <xref target="MADDEN-REVIEW"/>, posted on the OAuth list the day -01 appeared,
makes two technical points about the chain, apart from the comparison
with HMAC-chained Macaroons and SPKI/SDSI: a parent token stays valid
after a child has been derived from it, so the design lacks the
re-keying of Macaroons; and only the leaf proves possession, so an agent
that sees the bytes of an intermediate or root token could use them.
The author's reply on the list called additive derivation intended and
every token holder-bound. This report names the points M1 and M2
(<xref target="model-properties"/>) and checks them in the model rather than in the
reply.
The second point -01 answers in its text. Section 4.2 (I1) requires the
derived token to be signed by the holder of the parent, Section 4.6 (I5)
commits it to that parent's bytes, and Section 4.7 (I6) requires the
presenter to prove possession of the leaf key. A token observed in
transit can therefore neither be extended, since derivation needs its
holder's key, nor presented as a leaf, nor moved under another parent.
The model confirms this for -01: against an attacker who sees every
token and may hold any holder key other than that of the token in
question, no link is derived from it (M2 a, P1b), no request is accepted
through such a link (M2 b), and no request is accepted with it (M2 c,
P4).
The first point -01 does not state. Nothing in the text says that a
parent remains valid after derivation; Section 8.9 puts revocation out
of scope and recommends short lifetimes, and Sections 8.1.2 and 8.4
give the consequence, that a compromised holder key exercises the full
authority of every token bound to it until expiry, without the property
behind it. The model shows M1 as a run of honest roles alone: a holder
derives a child from its token and is then accepted with that same
token, with no key compromised. It is how the design works, not an
attack on it. This implementation checks I1, I5 and I6 and keeps no
state that would retire a parent after derivation, since -01 defines
none.  <vspace blankLines='1'/>
-02: closed as design -- -02 Section 9.1.1 says that derivation is
additive, that every token in a chain carries a holder key, and that a
sub-agent holding its parent's bytes cannot invoke with them; -02
Section 9.4 says that AATs do not re-key, that a compromised holder key
exposes every token bound to it, and gives deriving to a fresh key and
destroying the parent's key as the approximation (-02 Section 9.4,
with the fresh holder key of -02 Section 9.10).
M1 and M2 (<xref target="model-properties"/>) are this report's independent check of
it; the vectors do not bear on it.</t>
</list></t>

</section>
<section anchor="aat-pop"><name>Proof of Possession (B20 to B23)</name>

<t><list style="symbols">
  <t>B20 (Section 5.2): PoP header and <spanx style="verb">typ</spanx>. -01 specifies no <spanx style="verb">typ</spanx>, <spanx style="verb">kid</spanx>
or <spanx style="verb">jwk</spanx> header parameter for the PoP JWT, so nothing distinguishes it
from another JWT signed by the same key. This implementation looks only
at <spanx style="verb">alg</spanx>.  <vspace blankLines='1'/>
-02: closed -- <spanx style="verb">typ</spanx> is <spanx style="verb">aat-pop+jwt</spanx> (J.7.1, J.7.2); a <spanx style="verb">jwk</spanx> header
parameter is ignored as a key source (J.7.14).</t>
  <t>B21 (Sections 5.2, 7): JCS of the whole PoP payload. -01 Section 5.2
requires the holder to serialize the whole PoP payload with JCS, but
step 7f compares only <spanx style="verb">hta</spanx>, and nothing says whether an enforcement
point must reject a payload that is not canonical. This implementation
rejects it: the payload bytes must equal their JCS re-serialization.  <vspace blankLines='1'/>
-02: closed (requirement dropped) -- -02 Appendix F: "PoP payloads no longer
need to be JCS-canonical". Only <spanx style="verb">hta</spanx> is compared (step 7f).</t>
  <t>B22 (Section 7): clock tolerance. -01 recommends a PoP window of 30
seconds either side, and separately a one-sided MAX_IAT_SKEW of 30
seconds for tokens; it does not say whether the two are the same
parameter. This implementation keeps them apart: the PoP window is its
own option, symmetric, with inclusive bounds.  <vspace blankLines='1'/>
-02: closed -- -02 Section 9.9 separates the one-sided MAX_IAT_SKEW from
the bilateral PoP window (J.20.4, J.20.15, J.20.16).</t>
  <t>B23 (Section 5): PoP binds the leaf only. In -01 the PoP JWT names the
leaf by <spanx style="verb">aat_id</spanx>, which must equal the leaf's <spanx style="verb">jti</spanx> (Section 5.3), a
value chosen by whoever derived the leaf; neither the leaf's bytes nor
the chain enter the PoP signature. Which chain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      