aitp-verifier 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. aitp_verifier-0.1.0/LICENSE +201 -0
  2. aitp_verifier-0.1.0/PKG-INFO +251 -0
  3. aitp_verifier-0.1.0/README.md +221 -0
  4. aitp_verifier-0.1.0/aitp_verifier/__init__.py +55 -0
  5. aitp_verifier-0.1.0/aitp_verifier/adapter.py +291 -0
  6. aitp_verifier-0.1.0/aitp_verifier/aid.py +63 -0
  7. aitp_verifier-0.1.0/aitp_verifier/b64.py +29 -0
  8. aitp_verifier-0.1.0/aitp_verifier/crypto.py +281 -0
  9. aitp_verifier-0.1.0/aitp_verifier/delegation.py +468 -0
  10. aitp_verifier-0.1.0/aitp_verifier/envelope.py +153 -0
  11. aitp_verifier-0.1.0/aitp_verifier/errors.py +31 -0
  12. aitp_verifier-0.1.0/aitp_verifier/fields.py +240 -0
  13. aitp_verifier-0.1.0/aitp_verifier/handshake.py +226 -0
  14. aitp_verifier-0.1.0/aitp_verifier/harness.py +212 -0
  15. aitp_verifier-0.1.0/aitp_verifier/identity.py +382 -0
  16. aitp_verifier-0.1.0/aitp_verifier/jcs.py +287 -0
  17. aitp_verifier-0.1.0/aitp_verifier/jwk.py +387 -0
  18. aitp_verifier-0.1.0/aitp_verifier/jws.py +135 -0
  19. aitp_verifier-0.1.0/aitp_verifier/keys.py +49 -0
  20. aitp_verifier-0.1.0/aitp_verifier/manifest.py +249 -0
  21. aitp_verifier-0.1.0/aitp_verifier/minter.py +562 -0
  22. aitp_verifier-0.1.0/aitp_verifier/proofinput.py +29 -0
  23. aitp_verifier-0.1.0/aitp_verifier/py.typed +0 -0
  24. aitp_verifier-0.1.0/aitp_verifier/revocation.py +305 -0
  25. aitp_verifier-0.1.0/aitp_verifier/sessionbundle.py +266 -0
  26. aitp_verifier-0.1.0/aitp_verifier/sigfield.py +46 -0
  27. aitp_verifier-0.1.0/aitp_verifier/spiffe.py +436 -0
  28. aitp_verifier-0.1.0/aitp_verifier/tct.py +430 -0
  29. aitp_verifier-0.1.0/aitp_verifier/timeutil.py +15 -0
  30. aitp_verifier-0.1.0/aitp_verifier/verify.py +33 -0
  31. aitp_verifier-0.1.0/aitp_verifier/version.py +13 -0
  32. aitp_verifier-0.1.0/aitp_verifier/voucher.py +71 -0
  33. aitp_verifier-0.1.0/aitp_verifier.egg-info/PKG-INFO +251 -0
  34. aitp_verifier-0.1.0/aitp_verifier.egg-info/SOURCES.txt +56 -0
  35. aitp_verifier-0.1.0/aitp_verifier.egg-info/dependency_links.txt +1 -0
  36. aitp_verifier-0.1.0/aitp_verifier.egg-info/entry_points.txt +2 -0
  37. aitp_verifier-0.1.0/aitp_verifier.egg-info/requires.txt +5 -0
  38. aitp_verifier-0.1.0/aitp_verifier.egg-info/top_level.txt +1 -0
  39. aitp_verifier-0.1.0/pyproject.toml +74 -0
  40. aitp_verifier-0.1.0/setup.cfg +4 -0
  41. aitp_verifier-0.1.0/tests/test_adapter.py +166 -0
  42. aitp_verifier-0.1.0/tests/test_boundary_contract.py +336 -0
  43. aitp_verifier-0.1.0/tests/test_conformance.py +237 -0
  44. aitp_verifier-0.1.0/tests/test_conftest_spec_resolution.py +147 -0
  45. aitp_verifier-0.1.0/tests/test_envelope.py +483 -0
  46. aitp_verifier-0.1.0/tests/test_fields.py +498 -0
  47. aitp_verifier-0.1.0/tests/test_identity_oidc.py +1450 -0
  48. aitp_verifier-0.1.0/tests/test_issuer_side.py +144 -0
  49. aitp_verifier-0.1.0/tests/test_jws.py +284 -0
  50. aitp_verifier-0.1.0/tests/test_kat.py +307 -0
  51. aitp_verifier-0.1.0/tests/test_manifest.py +189 -0
  52. aitp_verifier-0.1.0/tests/test_p256_strict.py +179 -0
  53. aitp_verifier-0.1.0/tests/test_report.py +72 -0
  54. aitp_verifier-0.1.0/tests/test_sessionbundle.py +415 -0
  55. aitp_verifier-0.1.0/tests/test_signed_examples.py +330 -0
  56. aitp_verifier-0.1.0/tests/test_spiffe.py +574 -0
  57. aitp_verifier-0.1.0/tests/test_tct_claims.py +181 -0
  58. aitp_verifier-0.1.0/tests/test_unknown_fields.py +2852 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,251 @@
1
+ Metadata-Version: 2.4
2
+ Name: aitp-verifier
3
+ Version: 0.1.0
4
+ Summary: Independent Python implementation of the AITP verification core (second, spec-only implementation that cross-checks the reference one)
5
+ Author: AITP contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/agentidentitytrustprotocol/aitp-verifier-py
8
+ Project-URL: Source, https://github.com/agentidentitytrustprotocol/aitp-verifier-py
9
+ Project-URL: Issues, https://github.com/agentidentitytrustprotocol/aitp-verifier-py/issues
10
+ Project-URL: Changelog, https://github.com/agentidentitytrustprotocol/aitp-verifier-py/blob/main/CHANGELOG.md
11
+ Project-URL: Specification, https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol
12
+ Keywords: aitp,agent-identity,verifier,conformance,jws
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Security :: Cryptography
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: cryptography>=50.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=9.0.3; extra == "dev"
28
+ Requires-Dist: mypy>=1.18.1; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # aitp-verifier-py
32
+
33
+ An **independent Python implementation of the AITP verification core** — a
34
+ second implementation, written from the spec alone, that cross-checks the
35
+ reference one. The first implementation is
36
+ [`aitp-rs`](https://github.com/agentidentitytrustprotocol/aitp-rs); its
37
+ Python/Node bindings wrap the same Rust core and therefore do **not** count as
38
+ independent. How implementations feed RFC promotion is defined by the spec, not
39
+ here: see [`governance/RFC-PROCESS.md`](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/governance/RFC-PROCESS.md)
40
+ and [`VERSIONING.md`](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/VERSIONING.md).
41
+ Status of each RFC: [`rfcs/README.md`](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/rfcs/README.md).
42
+
43
+ **Wire freeze:** the `aitp/0.3` wire is frozen until 1.0, except for security fixes
44
+ ([what is frozen](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/VERSIONING.md#what-is-frozen-aitp03-line)).
45
+ This verifier tracks that one wire. The conformance claim it passes is `AITP v0.3` (with
46
+ `AITP v0.3 self-attestation`) at the spec commit in [`SPEC_VERSION`](SPEC_VERSION); see
47
+ [Conformance coverage](#conformance-coverage).
48
+
49
+ ## Install
50
+
51
+ ```
52
+ pip install aitp-verifier
53
+ ```
54
+
55
+ The distribution is `aitp-verifier`, the import package is `aitp_verifier`, and the
56
+ console script is `aitp-verifier-adapter`. Its version numbers are its own. They do not
57
+ follow aitp-rs's lockstep releases, and the spec commit a release passes is the one in
58
+ `SPEC_VERSION`. Releases go out from a `v*` tag through PyPI trusted publishing
59
+ ([`release.yml`](.github/workflows/release.yml)). The tag must equal the `pyproject.toml`
60
+ version, or nothing is published.
61
+
62
+ ## Independence claim
63
+
64
+ This codebase was implemented **from the RFC-AITP texts and JSON schemas only**
65
+ ([RFC-AITP-0001…0013](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/tree/main/rfcs),
66
+ `schemas/json/*`, and the conformance pack's pinned
67
+ *expectations* under `schemas/conformance/`). No algorithmic code was read
68
+ from, ported from, or shared with `aitp-rs`, and nothing shells out to any Rust
69
+ binary. The two implementations meet only at the conformance pack's byte-pinned
70
+ golden vectors (`known-answer/`) — which is the point: cross-verifying the same
71
+ vectors from two independently written codebases is what makes the check
72
+ meaningful.
73
+
74
+ ## Scope
75
+
76
+ A **verification library plus a conformance-fixture runner** — not an agent, not
77
+ an HTTP client, not a registry. No network I/O exists anywhere in this codebase.
78
+
79
+ Implemented: RFC-AITP-0001–0006, 0008, 0010, 0011. RFC-AITP-0007 (key resolution)
80
+ is covered only as far as verifying with caller-supplied keys (`jwk`, `identity`) —
81
+ nothing is fetched. RFC-AITP-0009 is a
82
+ [security RFC](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/rfcs/RFC-AITP-0009-security.md)
83
+ and has no module of its own. RFC-AITP-0012 (extensions) is honored only as the
84
+ opaque `extensions` slot (`fields`); RFC-AITP-0013 (TCT renewal) is not implemented.
85
+
86
+ | Module | Covers |
87
+ |---|---|
88
+ | `aitp_verifier.jcs` | RFC 8785 JSON canonicalization (own implementation) |
89
+ | `aitp_verifier.crypto` | Ed25519 + ECDSA-P256, the JCS-profile vs JOSE signing split (RFC-AITP-0001 §5.4) |
90
+ | `aitp_verifier.aid` | AID parsing + self-certifying key derivation (§5.3), incl. the `p256` tag |
91
+ | `aitp_verifier.jwk` | RFC 7638 JWK thumbprints for the `cnf.jkt` binding (§5.4.4) |
92
+ | `aitp_verifier.jws` | Strict compact-JWS profile: `typ`/`alg` pinning, no `alg:none`, exact-bytes verify (§5.4.5) |
93
+ | `aitp_verifier.envelope` | Envelope check order (version → member set → signature), `aitp-envelope-v2` signing input, replay controls (§5.4/§5.5) |
94
+ | `aitp_verifier.manifest` | Agent Manifest: version, expiry, PoP, signature (RFC-AITP-0003) |
95
+ | `aitp_verifier.tct` | Trust Context Token verification incl. §10.4 Manifest-expiry bound + revocation ordering (RFC-AITP-0005) |
96
+ | `aitp_verifier.voucher` | Grant-voucher verification (RFC-AITP-0005 §8) |
97
+ | `aitp_verifier.delegation` | Single-hop delegation + the multi-hop chain (hop limit, chain-hash commitment, transitive scope, per-hop revocation) (RFC-AITP-0006 / RFC-AITP-0011) |
98
+ | `aitp_verifier.revocation` | Revocation-snapshot freshness / signature / fail-mode (RFC-AITP-0008) |
99
+ | `aitp_verifier.identity` | OIDC + pinned-key identity bindings, incl. the five-field pinned-key proof (RFC-AITP-0002) |
100
+ | `aitp_verifier.handshake` | Mutual-handshake payload verification: Manifest, identity, nonce echo, round-2 PoP, embedded TCT (RFC-AITP-0004) |
101
+ | `aitp_verifier.fields` | Closed-field-set enforcement: unknown fields → `UNKNOWN_FIELD`; `extensions` contents are never inspected (RFC-AITP-0012 §1) |
102
+ | `aitp_verifier.sigfield` | Algorithm-tagged (`ed25519.`/`p256.`) JCS-profile signature fields (RFC-AITP-0001 §5.4.3) |
103
+ | `aitp_verifier.keys` | Loads the pinned known-answer keypairs for the minter / runner |
104
+ | `aitp_verifier.errors` | `AitpError` and the typed error-code vocabulary |
105
+ | `aitp_verifier.verify` | Operation registry: maps a fixture `input.operation` to its verifier |
106
+ | `aitp_verifier.minter` | Conformance-fixture minter: fills `__PLACEHOLDER__` values with the pinned KAT keys (signs; the verification core never does) |
107
+ | `aitp_verifier.b64`, `aitp_verifier.timeutil` | base64url helpers; the reference-clock constant |
108
+ | `aitp_verifier.version` | `PROTOCOL_VERSION` (`aitp/0.3`), the one revision accepted under the strict cutover |
109
+ | `aitp_verifier.sessionbundle` | Session Trust Bundle: envelope shape, expiry-before-signature, expiry-window invariant, coordinator signature, per-participant TCT, self-membership (RFC-AITP-0010) |
110
+
111
+ ## Conformance coverage
112
+
113
+ `run_conformance.py` re-derives every in-scope fixture from the pinned KAT
114
+ keypairs and runs it against this implementation:
115
+
116
+ ```
117
+ python run_conformance.py --spec-dir ../agentidentitytrustprotocol [--claim "AITP v0.3"]
118
+ ```
119
+
120
+ The run exits nonzero on any FAIL. `--claim` names one of the RFC-AITP-0001 §10 claim
121
+ strings, gated as the spec's
122
+ [conformance badge rules](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/docs/conformance-badge.md#claims)
123
+ define them, and a SKIP of any fixture behind the claim fails the run too:
124
+
125
+ | `--claim` | Gated on | Here |
126
+ |---|---|---|
127
+ | `AITP v0.3` (default) | every `status: core` fixture with `required_for_core` (a missing flag counts as required) | passes |
128
+ | `AITP v0.3 self-attestation` | every fixture with `feature: aitp-self-attestation` | passes |
129
+ | `AITP v0.3 pinned-admission` | every fixture with `feature: aitp-pinned-admission` | fails: not implemented |
130
+
131
+ There are no other claims and no named profiles. Core fixtures run with no draft feature
132
+ opted in, so `del-007`, which expects `DELEGATION_MULTIHOP_NOT_SUPPORTED`, is executed even
133
+ though this verifier implements multi-hop delegation.
134
+
135
+ Current status at the pinned spec commit (`SPEC_VERSION`, `ddec9f1`, `aitp/0.3`; the runner
136
+ prints the live number): **118 fixtures pass, 0 fail, 15 skipped**. All 94 core fixtures
137
+ pass. So do the three Draft opt-ins (`experimental-multihop-delegation`,
138
+ `experimental-session-bundle`, `experimental-spiffe-identity`), the `aitp-self-attestation` extension, and all multi-step
139
+ sequences (PoP challenge/response `tct-006`/`tct-007`, issuer-side PoP enforcement `tct-026`,
140
+ handshake replay `mh-001`). The surface — envelope, TCT (incl. `alg:none`, alg-confusion,
141
+ `typ`-confusion, expiry-after-Manifest, revocation-ordering, no revocation source, and the
142
+ issuer-side check of RFC-AITP-0005 §10.5), grant voucher, single- **and multi-hop**
143
+ delegation, Manifest, revocation snapshots, session bundles, and the full mutual-handshake /
144
+ identity family (OIDC and pinned-key bindings, the receiver's identity-type policy, nonce
145
+ echo, round-2 PoP, embedded peer-issued TCT) — is validated byte-for-byte against
146
+ `known-answer/keypairs.json`, `jwk-thumbprints.json`, `jcs-sha256.json`, the
147
+ `signed-examples/` artifacts (including both envelope KATs, `kat-envelope-001-p256` and
148
+ `kat-envelope-002-ed25519`), and the id-007 pinned-key proof vector.
149
+
150
+ The skips are reported explicitly, never as a silent pass (PLACEHOLDERS.md §"Operation key"):
151
+
152
+ - **`del-004`** — frozen in the retired v0.1 object wire shape
153
+ (`required_for_v0_1` only); a current implementation legitimately does not run it.
154
+ - **`id-013`…`id-016`, `id-019`…`id-022`** — the optional pinned-admission profile
155
+ (RFC-AITP-0002 §3.4, `feature: aitp-pinned-admission`), which this verifier does not
156
+ claim.
157
+ - **`a2a-001`…`a2a-006`** — the Draft A2A Agent Card binding (RFC-AITP-0014,
158
+ `feature: aitp-a2a-agent-card`), not implemented.
159
+
160
+ ## Running under aitp-conformance
161
+
162
+ The same verifier also runs behind aitp-rs's
163
+ [`aitp-conformance`](https://github.com/agentidentitytrustprotocol/aitp-rs/blob/main/docs/conformance.md)
164
+ runner. `aitp-verifier-adapter` is its NDJSON subprocess adapter: one request per line on
165
+ stdin, one response per line on stdout, logs on stderr only, exit 0 on EOF. aitp-rs
166
+ publishes no runner binary, so build it from an aitp-rs checkout:
167
+
168
+ ```
169
+ cargo build -p aitp-conformance --bin aitp-conformance # in aitp-rs
170
+ AITP_SPEC=../agentidentitytrustprotocol \
171
+ target/debug/aitp-conformance run \
172
+ --target "$(command -v aitp-verifier-adapter)" \
173
+ --fixtures-dir ../agentidentitytrustprotocol/schemas/conformance \
174
+ --feature aitp-self-attestation --report adapter.json
175
+ ```
176
+
177
+ `AITP_SPEC` names the spec checkout. The adapter reads two key files from it. It needs the
178
+ KAT keys to sign the per-issuer "not revoked" snapshots of a delegation fixture
179
+ (conformance README, "Revocation inputs"). Its OIDC issuer resolver needs
180
+ `known-answer/oidc-test-issuers.json`: it resolves `https://auth.openai.com` and no other
181
+ issuer.
182
+
183
+ `run_conformance.py --report native.json` writes the same report from this repo's own
184
+ runner. The `adapter-parity` CI job (aitp-rs pinned by `AITP_RS_SHA` in `ci.yml`) produces
185
+ both reports. It validates them against the spec's report schema and checker, then runs
186
+ [`scripts/parity-diff.py`](scripts/parity-diff.py), which requires the two to agree
187
+ fixture for fixture. The diff lists its allowed exceptions by name:
188
+
189
+ - `del-007` runner policy: aitp-conformance skips it once the multi-hop draft feature is
190
+ on.
191
+ - runner defects reported upstream and not yet fixed at the aitp-rs pin. A listed entry
192
+ that starts agreeing fails the diff, so the list cannot go stale.
193
+
194
+ A run with a draft feature enabled cannot pass the `AITP v0.3` gate, because the
195
+ feature-negation skip of `del-007` blocks it. For a core claim, enable extension features
196
+ only.
197
+
198
+ ## CI and the spec pin
199
+
200
+ The required checks in `ci.yml` run against the spec commit pinned in
201
+ [`SPEC_VERSION`](SPEC_VERSION), never the spec's moving `main`. A spec merge therefore
202
+ cannot turn this repo red without a PR here. On a conformance-relevant spec push, the
203
+ spec's `notify-spec-consumers.yml` dispatches `spec-released`, and
204
+ [`bump-spec.yml`](.github/workflows/bump-spec.yml) calls `aitp-ci`'s `bump-spec-ref` to
205
+ open a PR that moves the pin. The PR is held for review and its own CI runs the new
206
+ fixtures.
207
+
208
+ [`spec-canary.yml`](.github/workflows/spec-canary.yml) is the wire canary. It runs daily,
209
+ and on demand, against the spec's floating `main`. It is not a required check. When it fails
210
+ it comments on one tracking issue ("Spec canary: conformance fails against spec main"),
211
+ opening it if none is open, and a green run closes that issue.
212
+
213
+ ## Usage and error contract
214
+
215
+ Every verifier entry point returns normally on success and raises `AitpError`
216
+ (`aitp_verifier.errors`) on rejection; malformed remote input never escapes as a
217
+ raw `KeyError`/`TypeError`/`RecursionError`. Caller bugs are the exception: a
218
+ missing revocation `policy` (on `verify_tct`, also no `issuer_revocation_list.fail_mode`
219
+ fallback) or a missing required argument raises a plain `KeyError`
220
+ (see [CHANGELOG.md](CHANGELOG.md)).
221
+ `jcs` raises `JcsError` and `minter` raises `MinterError` — they are not
222
+ verifier entry points. Error codes and their meaning are defined by the spec's
223
+ [error-code registry](https://github.com/agentidentitytrustprotocol/agentidentitytrustprotocol/blob/main/registries/error-codes.md),
224
+ not restated here. Security-relevant behavior changes are tracked in
225
+ [CHANGELOG.md](CHANGELOG.md).
226
+
227
+ ## Cross-implementation checks
228
+
229
+ `aitp-rs` mints artifacts that this repo verifies, and verifies a session bundle
230
+ this repo minted (committed in aitp-rs's `tests/xcheck-fixtures/`) — see aitp-rs
231
+ [testing § cross-implementation acceptance](https://github.com/agentidentitytrustprotocol/aitp-rs/blob/main/docs/testing.md#cross-implementation-acceptance-xcheck)
232
+ and [conformance](https://github.com/agentidentitytrustprotocol/aitp-rs/blob/main/docs/conformance.md).
233
+ That job pins this repo at a specific commit (`tests/AITP_VERIFIER_PY_VERSION` in
234
+ aitp-rs), so it does not track `main` here.
235
+
236
+ ## Development
237
+
238
+ ```
239
+ pip install -e ".[dev]"
240
+ pytest # KAT re-derivation, signed-example verify, full pack has no FAIL
241
+ mypy # --strict, clean
242
+ ```
243
+
244
+ Requires Python ≥ 3.11 and `cryptography`. The runner takes `--spec-dir`; `pytest` resolves the spec checkout from
245
+ `$AITP_SPEC`, then a sibling `agentidentitytrustprotocol/` directory, and fails
246
+ loudly if neither exists (set `AITP_SPEC=none` to deliberately run only the
247
+ spec-independent subset instead).
248
+
249
+ ## License
250
+
251
+ Apache-2.0.