vouch-protocol 3.1.0__tar.gz → 3.2.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 (371) hide show
  1. {vouch_protocol-3.1.0/vouch_protocol.egg-info → vouch_protocol-3.2.0}/PKG-INFO +1 -1
  2. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/pyproject.toml +1 -1
  3. vouch_protocol-3.2.0/tests/test_delegate_parent.py +104 -0
  4. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_hardening.py +12 -6
  5. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_verify.py +15 -3
  6. vouch_protocol-3.2.0/tests/test_flat_delegation.py +792 -0
  7. vouch_protocol-3.2.0/tests/test_flat_delegation_vectors.py +134 -0
  8. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fleet.py +12 -1
  9. vouch_protocol-3.2.0/tests/test_grant_chain_rules.py +1110 -0
  10. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_policy_limits.py +11 -10
  11. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_signer_vc.py +11 -5
  12. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/__init__.py +9 -1
  13. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/agent.py +11 -3
  14. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/autosign.py +21 -10
  15. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/cli.py +183 -7
  16. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/conformance.py +9 -2
  17. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/credential.py +54 -14
  18. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/fleet.py +57 -5
  19. vouch_protocol-3.2.0/vouch/grant_chain.py +614 -0
  20. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/a2a.py +4 -2
  21. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/mcp/server.py +42 -3
  22. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/mlflow.py +4 -2
  23. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/safetensors.py +4 -2
  24. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/signer.py +112 -51
  25. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trifecta.py +33 -24
  26. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/vc.py +19 -0
  27. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/verifier.py +75 -21
  28. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0/vouch_protocol.egg-info}/PKG-INFO +1 -1
  29. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/SOURCES.txt +5 -0
  30. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/LICENSE +0 -0
  31. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/MANIFEST.in +0 -0
  32. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/README.md +0 -0
  33. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/setup.cfg +0 -0
  34. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_accountability.py +0 -0
  35. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_agent_enroll.py +0 -0
  36. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ati_core.py +0 -0
  37. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_attribution.py +0 -0
  38. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_audio_bridge.py +0 -0
  39. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_audit_trail.py +0 -0
  40. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_auditor.py +0 -0
  41. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_authority_state.py +0 -0
  42. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_authority_state_vectors.py +0 -0
  43. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_autosign.py +0 -0
  44. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_behavioral_attestation.py +0 -0
  45. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_bridge.py +0 -0
  46. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_budget.py +0 -0
  47. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_c2pa_formats.py +0 -0
  48. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cache.py +0 -0
  49. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_canary.py +0 -0
  50. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_caveats.py +0 -0
  51. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ccg_demo.py +0 -0
  52. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_init.py +0 -0
  53. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_root.py +0 -0
  54. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_verify.py +0 -0
  55. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_without_server_extra.py +0 -0
  56. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_conformance.py +0 -0
  57. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_context_v1.py +0 -0
  58. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_credential_gate.py +0 -0
  59. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_data_integrity.py +0 -0
  60. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_attenuation.py +0 -0
  61. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_chain_vectors.py +0 -0
  62. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_size_guard.py +0 -0
  63. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_deliberation.py +0 -0
  64. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_disconnected_edge.py +0 -0
  65. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_dtn_pads.py +0 -0
  66. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_dx_sugar.py +0 -0
  67. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ed25519_check.py +0 -0
  68. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ed25519_strict_vector.py +0 -0
  69. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_examples_robotics.py +0 -0
  70. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fastapi_credential_gate.py +0 -0
  71. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fence.py +0 -0
  72. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fetch_hostile_documents.py +0 -0
  73. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_git_commit_binding.py +0 -0
  74. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_git_workflow.py +0 -0
  75. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_grade.py +0 -0
  76. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_grade_evidence.py +0 -0
  77. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_halos_evidence.py +0 -0
  78. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hardware_seam.py +0 -0
  79. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hasura_integration.py +0 -0
  80. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_heartbeat.py +0 -0
  81. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_heartbeat_hardening.py +0 -0
  82. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hybrid.py +0 -0
  83. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hybrid_interop.py +0 -0
  84. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_identity_file_reader.py +0 -0
  85. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_intent_recheck.py +0 -0
  86. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_intent_recheck_vector.py +0 -0
  87. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_jcs.py +0 -0
  88. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_jcs_interop.py +0 -0
  89. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_keys_post_quantum.py +0 -0
  90. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_keys_ts_interop.py +0 -0
  91. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_kms.py +0 -0
  92. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_liveness_conformance.py +0 -0
  93. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_check_trust.py +0 -0
  94. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_guard_replay.py +0 -0
  95. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_guard_revocation.py +0 -0
  96. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_server_shield.py +0 -0
  97. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_server_status_tools.py +0 -0
  98. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_media_badge.py +0 -0
  99. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_media_native.py +0 -0
  100. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_merkle.py +0 -0
  101. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mint_contributor_credential.py +0 -0
  102. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mint_delegation.py +0 -0
  103. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mldsa_check.py +0 -0
  104. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_multikey.py +0 -0
  105. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_nesting_and_precision.py +0 -0
  106. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_nonce.py +0 -0
  107. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_nonce_replay_store.py +0 -0
  108. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_onboard.py +0 -0
  109. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_orbital_accumulator.py +0 -0
  110. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_pacing.py +0 -0
  111. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_pq_verify.py +0 -0
  112. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_proof_of_integration.py +0 -0
  113. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_proof_set_vector.py +0 -0
  114. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_provenance.py +0 -0
  115. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_quorum.py +0 -0
  116. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reasoning.py +0 -0
  117. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reasoning_escrow_binding.py +0 -0
  118. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_receipts.py +0 -0
  119. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_recovery.py +0 -0
  120. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_replay_key_vector.py +0 -0
  121. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation.py +0 -0
  122. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_aggregate.py +0 -0
  123. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_disputes.py +0 -0
  124. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_ledger.py +0 -0
  125. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_policy.py +0 -0
  126. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_portability.py +0 -0
  127. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_revocation.py +0 -0
  128. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_revocation_fail_closed.py +0 -0
  129. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_access.py +0 -0
  130. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_conformance.py +0 -0
  131. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_consent.py +0 -0
  132. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_custody.py +0 -0
  133. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_embodiment.py +0 -0
  134. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_fusion.py +0 -0
  135. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_handover.py +0 -0
  136. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_handshake_blackbox_passport.py +0 -0
  137. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_identity.py +0 -0
  138. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_lease_quorum.py +0 -0
  139. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_lifecycle.py +0 -0
  140. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_liveness_revocation.py +0 -0
  141. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_odd.py +0 -0
  142. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_perception.py +0 -0
  143. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_pq.py +0 -0
  144. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_provenance_capability.py +0 -0
  145. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_root_identity.py +0 -0
  146. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_safety_record.py +0 -0
  147. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_swarm.py +0 -0
  148. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_teleop.py +0 -0
  149. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_wear.py +0 -0
  150. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_root_delegation_scripts.py +0 -0
  151. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_root_of_trust.py +0 -0
  152. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_root_of_trust_vectors.py +0 -0
  153. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ros2_action_gate.py +0 -0
  154. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_runtime_vectors.py +0 -0
  155. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_scan.py +0 -0
  156. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_secure_key_custody.py +0 -0
  157. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_security_hardening.py +0 -0
  158. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_shield_guard.py +0 -0
  159. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_shield_rules.py +0 -0
  160. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_shield_vectors.py +0 -0
  161. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_sidecar.py +0 -0
  162. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ssrf_ranges.py +0 -0
  163. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_status_list.py +0 -0
  164. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_status_list_strict.py +0 -0
  165. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_strict_time_leftovers.py +0 -0
  166. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_threshold.py +0 -0
  167. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_threshold_loader.py +0 -0
  168. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_timefmt.py +0 -0
  169. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_tool_registry.py +0 -0
  170. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transparency.py +0 -0
  171. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport.py +0 -0
  172. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport_http_rendezvous.py +0 -0
  173. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport_rendezvous.py +0 -0
  174. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport_udna_sdk.py +0 -0
  175. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trifecta.py +0 -0
  176. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trust_check.py +0 -0
  177. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trust_entropy.py +0 -0
  178. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trusted_roots.py +0 -0
  179. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trusted_roots_vector.py +0 -0
  180. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_validator_cli.py +0 -0
  181. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_validator_server.py +0 -0
  182. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_vc.py +0 -0
  183. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_vector_runners.py +0 -0
  184. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_hardening.py +0 -0
  185. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_round2.py +0 -0
  186. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_round3.py +0 -0
  187. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_vc.py +0 -0
  188. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verify_without_key.py +0 -0
  189. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_vouch_mcp.py +0 -0
  190. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/accountability.py +0 -0
  191. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/async_verifier.py +0 -0
  192. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/attenuation.py +0 -0
  193. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/attribution.py +0 -0
  194. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/attribution_cli.py +0 -0
  195. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/audio.py +0 -0
  196. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/audit_trail.py +0 -0
  197. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/auditor.py +0 -0
  198. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/authority_state.py +0 -0
  199. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/behavioral_attestation.py +0 -0
  200. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/__init__.py +0 -0
  201. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/audio_routes.py +0 -0
  202. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/config.py +0 -0
  203. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/server.py +0 -0
  204. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/budget.py +0 -0
  205. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/cache.py +0 -0
  206. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/canary.py +0 -0
  207. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/caveats.py +0 -0
  208. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/config.py +0 -0
  209. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/conformance_jcs_vectors.json +0 -0
  210. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/data_integrity.py +0 -0
  211. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/data_integrity_hybrid.py +0 -0
  212. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/deliberation.py +0 -0
  213. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/did_web.py +0 -0
  214. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/ed25519_check.py +0 -0
  215. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/fence.py +0 -0
  216. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/gate.py +0 -0
  217. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/grade.py +0 -0
  218. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/heartbeat.py +0 -0
  219. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/_common.py +0 -0
  220. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/adk.py +0 -0
  221. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/amnesia.py +0 -0
  222. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/autogen/__init__.py +0 -0
  223. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/autogpt/__init__.py +0 -0
  224. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/autogpt/commands.py +0 -0
  225. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/claude-code/settings.hooks.json +0 -0
  226. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/crewai/__init__.py +0 -0
  227. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/crewai/tool.py +0 -0
  228. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/fastapi.py +0 -0
  229. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/google.py +0 -0
  230. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/goose.py +0 -0
  231. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/hasura/__init__.py +0 -0
  232. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/hasura/webhook.py +0 -0
  233. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/langchain/__init__.py +0 -0
  234. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/langchain/tool.py +0 -0
  235. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/langgraph.py +0 -0
  236. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/mcp/__init__.py +0 -0
  237. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/n8n.py +0 -0
  238. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/openai.py +0 -0
  239. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/streamlit/__init__.py +0 -0
  240. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/streamlit/seal.py +0 -0
  241. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/vertex_ai/__init__.py +0 -0
  242. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/intent_recheck.py +0 -0
  243. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/jcs.py +0 -0
  244. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/keys.py +0 -0
  245. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/keystore.py +0 -0
  246. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/kms.py +0 -0
  247. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/liveness_conformance.py +0 -0
  248. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mcp/__init__.py +0 -0
  249. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mcp/_guard.py +0 -0
  250. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mcp_guard.py +0 -0
  251. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/__init__.py +0 -0
  252. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/badge.py +0 -0
  253. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/c2pa.py +0 -0
  254. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/native.py +0 -0
  255. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/merkle.py +0 -0
  256. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/metrics.py +0 -0
  257. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mldsa_check.py +0 -0
  258. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/multikey.py +0 -0
  259. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/nesting.py +0 -0
  260. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/nonce.py +0 -0
  261. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/onboard.py +0 -0
  262. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/__init__.py +0 -0
  263. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/_common.py +0 -0
  264. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/_pedersen.py +0 -0
  265. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/census.py +0 -0
  266. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/custody.py +0 -0
  267. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/disclosure.py +0 -0
  268. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/dissent.py +0 -0
  269. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/fuse.py +0 -0
  270. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/load_auth.py +0 -0
  271. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/oversight.py +0 -0
  272. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/pace.py +0 -0
  273. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/prereg.py +0 -0
  274. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/recursion.py +0 -0
  275. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/redline.py +0 -0
  276. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/restraint.py +0 -0
  277. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/proof_of_integration.py +0 -0
  278. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/provenance.py +0 -0
  279. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/quorum.py +0 -0
  280. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/ratelimit.py +0 -0
  281. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reasoning.py +0 -0
  282. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/receipts.py +0 -0
  283. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/recovery.py +0 -0
  284. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/registry.py +0 -0
  285. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation.py +0 -0
  286. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_aggregate.py +0 -0
  287. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_disputes.py +0 -0
  288. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_ledger.py +0 -0
  289. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_policy.py +0 -0
  290. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_portability.py +0 -0
  291. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/revocation.py +0 -0
  292. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/__init__.py +0 -0
  293. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/_signing.py +0 -0
  294. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/_verify.py +0 -0
  295. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/access.py +0 -0
  296. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/accumulator.py +0 -0
  297. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/blackbox.py +0 -0
  298. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/bundle.py +0 -0
  299. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/capability.py +0 -0
  300. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/conformance.py +0 -0
  301. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/consent.py +0 -0
  302. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/custody.py +0 -0
  303. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/dtn_revocation.py +0 -0
  304. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/edge_trust.py +0 -0
  305. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/embodiment.py +0 -0
  306. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/freshness.py +0 -0
  307. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/fusion.py +0 -0
  308. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/geoscope.py +0 -0
  309. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/halos.py +0 -0
  310. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/handover.py +0 -0
  311. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/handshake.py +0 -0
  312. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/hardware.py +0 -0
  313. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/identity.py +0 -0
  314. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/lease.py +0 -0
  315. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/lifecycle.py +0 -0
  316. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/liveness.py +0 -0
  317. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/localization.py +0 -0
  318. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/odd.py +0 -0
  319. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/orbital.py +0 -0
  320. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/passport.py +0 -0
  321. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/perception.py +0 -0
  322. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/perception_consensus.py +0 -0
  323. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/physical_quorum.py +0 -0
  324. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/pq.py +0 -0
  325. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/presence.py +0 -0
  326. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/provenance.py +0 -0
  327. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/quorum_trust.py +0 -0
  328. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/revocation.py +0 -0
  329. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/root_identity.py +0 -0
  330. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/safety_record.py +0 -0
  331. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/swarm.py +0 -0
  332. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/teleop.py +0 -0
  333. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/wear.py +0 -0
  334. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/root_of_trust.py +0 -0
  335. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/scan/__init__.py +0 -0
  336. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/scan/detector.py +0 -0
  337. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/scan/patterns.py +0 -0
  338. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/seal.py +0 -0
  339. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/__init__.py +0 -0
  340. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/demo.py +0 -0
  341. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/flight_recorder.py +0 -0
  342. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/rules.py +0 -0
  343. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/shield.py +0 -0
  344. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/trust_registry.py +0 -0
  345. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/sidecar.py +0 -0
  346. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/ssrf.py +0 -0
  347. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/status_list.py +0 -0
  348. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/status_list_fetcher.py +0 -0
  349. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/threshold.py +0 -0
  350. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/timefmt.py +0 -0
  351. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/tool_registry.py +0 -0
  352. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transparency.py +0 -0
  353. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/__init__.py +0 -0
  354. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/base.py +0 -0
  355. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/did_key.py +0 -0
  356. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/envelope.py +0 -0
  357. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/http_rendezvous.py +0 -0
  358. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/http_transport.py +0 -0
  359. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/manager.py +0 -0
  360. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/rendezvous.py +0 -0
  361. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/udna.py +0 -0
  362. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trust_check.py +0 -0
  363. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trust_entropy.py +0 -0
  364. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trusted_roots.py +0 -0
  365. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/validator_flags.py +0 -0
  366. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/validator_server.py +0 -0
  367. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/verification.py +0 -0
  368. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/dependency_links.txt +0 -0
  369. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/entry_points.txt +0 -0
  370. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/requires.txt +0 -0
  371. {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vouch-protocol
3
- Version: 3.1.0
3
+ Version: 3.2.0
4
4
  Summary: The Identity & Reputation Standard for AI Agents
5
5
  Author-email: Vouch Protocol Contributors <hello@vouch-protocol.com>
6
6
  License: Apache License 2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vouch-protocol"
7
- version = "3.1.0"
7
+ version = "3.2.0"
8
8
  description = "The Identity & Reputation Standard for AI Agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -0,0 +1,104 @@
1
+ """vouch.delegate (the one-call helper) can pass a grant on: with ``parent=``
2
+ it issues a sub-grant that names its parent by digest, and
3
+ ``vouch.grant_chain`` gives the delegatee the chain to hand on."""
4
+
5
+ from __future__ import annotations
6
+
7
+ import pytest
8
+
9
+ import vouch
10
+ from vouch import Signer, generate_identity, grant_chain, grant_digest
11
+
12
+ CAL = "https://calendar.example.com/team"
13
+
14
+
15
+ def _signer(domain: str):
16
+ kp = generate_identity(domain)
17
+ return kp, Signer(private_key=kp.private_key_jwk, did=kp.did)
18
+
19
+
20
+ def test_delegate_without_parent_is_a_root_grant():
21
+ _, root = _signer("root.example.com")
22
+ helper, _ = _signer("helper.example.com")
23
+ grant = vouch.delegate(
24
+ action="read", target="calendar", resource=CAL, to=helper.did, signer=root
25
+ )
26
+ assert "parentGrantDigest" not in grant["credentialSubject"]
27
+ assert "delegationChain" not in grant["credentialSubject"]
28
+
29
+
30
+ def test_delegate_with_parent_names_the_parent_by_digest():
31
+ _, root = _signer("root.example.com")
32
+ mid, mid_signer = _signer("mid.example.com")
33
+ leaf, _ = _signer("leaf.example.com")
34
+ top = vouch.delegate(action="read", target="calendar", resource=CAL, to=mid.did, signer=root)
35
+ sub = vouch.delegate(
36
+ action="read",
37
+ target="calendar",
38
+ resource=CAL + "/a",
39
+ to=leaf.did,
40
+ signer=mid_signer,
41
+ parent=top,
42
+ )
43
+ assert sub["credentialSubject"]["parentGrantDigest"] == grant_digest(top)
44
+ assert grant_chain(top, sub) == [top, sub]
45
+
46
+
47
+ def test_delegate_with_a_grant_chain_parent():
48
+ _, root = _signer("root.example.com")
49
+ mid, mid_signer = _signer("mid.example.com")
50
+ leaf, leaf_signer = _signer("leaf.example.com")
51
+ end, _ = _signer("end.example.com")
52
+ top = vouch.delegate(action="read", target="calendar", resource=CAL, to=mid.did, signer=root)
53
+ sub = vouch.delegate(
54
+ action="read",
55
+ target="calendar",
56
+ resource=CAL + "/a",
57
+ to=leaf.did,
58
+ signer=mid_signer,
59
+ parent=top,
60
+ )
61
+ chain = grant_chain(top, sub)
62
+ sub2 = vouch.delegate(
63
+ action="read",
64
+ target="calendar",
65
+ resource=CAL + "/a/b",
66
+ to=end.did,
67
+ signer=leaf_signer,
68
+ parent=chain,
69
+ )
70
+ assert sub2["credentialSubject"]["parentGrantDigest"] == grant_digest(sub)
71
+ assert len(grant_chain(chain, sub2)) == 3
72
+
73
+
74
+ def test_delegate_refuses_a_parent_that_names_someone_else():
75
+ _, root = _signer("root.example.com")
76
+ mid, _ = _signer("mid.example.com")
77
+ _, stranger_signer = _signer("stranger.example.com")
78
+ leaf, _ = _signer("leaf.example.com")
79
+ top = vouch.delegate(action="read", target="calendar", resource=CAL, to=mid.did, signer=root)
80
+ with pytest.raises(ValueError):
81
+ vouch.delegate(
82
+ action="read",
83
+ target="calendar",
84
+ resource=CAL,
85
+ to=leaf.did,
86
+ signer=stranger_signer,
87
+ parent=top,
88
+ )
89
+
90
+
91
+ def test_delegate_refuses_to_widen_the_parent():
92
+ _, root = _signer("root.example.com")
93
+ mid, mid_signer = _signer("mid.example.com")
94
+ leaf, _ = _signer("leaf.example.com")
95
+ top = vouch.delegate(action="read", target="calendar", resource=CAL, to=mid.did, signer=root)
96
+ with pytest.raises(ValueError):
97
+ vouch.delegate(
98
+ action="read",
99
+ target="calendar",
100
+ resource="https://calendar.example.com/other",
101
+ to=leaf.did,
102
+ signer=mid_signer,
103
+ parent=top,
104
+ )
@@ -475,19 +475,25 @@ def test_trailing_slash_parent_round_trips():
475
475
 
476
476
  def test_long_signed_chain_has_no_depth_limit():
477
477
  _now = datetime.now(timezone.utc)
478
+ from vouch import grant_chain
479
+
478
480
  signers = [_signer(f"hop-{i}")[0] for i in range(8)]
479
- cred = signers[0].sign(
480
- intent={"action": "read", "target": "c", "resource": CAL, "delegatee": signers[1].did},
481
- valid_from=_now,
482
- valid_seconds=86400,
483
- )
481
+ grants = [
482
+ signers[0].sign(
483
+ intent={"action": "read", "target": "c", "resource": CAL, "delegatee": signers[1].did},
484
+ valid_from=_now,
485
+ valid_seconds=86400,
486
+ )
487
+ ]
484
488
  resource = CAL
485
489
  for i in range(1, 8):
486
490
  resource += f"/h{i}"
487
491
  intent = {"action": "read", "target": "c", "resource": resource}
488
492
  if i < 7:
489
493
  intent["delegatee"] = signers[i + 1].did
490
- cred = signers[i].sign(intent=intent, parent_credential=cred, valid_from=_now)
494
+ cred = signers[i].sign(intent=intent, parent_credential=grants, valid_from=_now)
495
+ if i < 7:
496
+ grants = grant_chain(grants, cred)
491
497
  assert len(cred["credentialSubject"]["delegationChain"]) == 7
492
498
  assert (
493
499
  verify_delegation_chain(
@@ -19,7 +19,7 @@ from datetime import datetime, timedelta, timezone
19
19
 
20
20
  import pytest
21
21
 
22
- from vouch import Signer, generate_identity, multikey
22
+ from vouch import Signer, generate_identity, grant_chain, multikey
23
23
  from vouch.verifier import Verifier, verify_delegation_chain
24
24
 
25
25
  CAL = "https://calendar.example.com/team"
@@ -81,7 +81,7 @@ def chain(parties):
81
81
  )
82
82
  leaf = b.sign(
83
83
  intent={"action": "read", "target": "calendar", "resource": CAL + "/events"},
84
- parent_credential=a_grant,
84
+ parent_credential=grant_chain(root_grant, a_grant),
85
85
  )
86
86
  return {"root_grant": root_grant, "a_grant": a_grant, "leaf": leaf}
87
87
 
@@ -166,13 +166,25 @@ def test_tampered_root_grant_is_rejected(parties, chain):
166
166
  intent={"action": "read", "target": "calendar", "resource": CAL},
167
167
  delegation_chain=links,
168
168
  )
169
+ # a's grant names the root grant by digest, so the edited root grant is
170
+ # refused from the link fields, before any signature is checked.
169
171
  assert (
170
172
  verify_delegation_chain(forged, trusted_roots=[parties["root"].did])
171
- == "delegation_signature_invalid"
173
+ == "delegation_parent_mismatch"
172
174
  )
173
175
  assert (
174
176
  Verifier.verify(forged, public_key=_key(b), trusted_roots=[parties["root"].did])[0] is False
175
177
  )
178
+ # With a's grant left out of the picture (a one-link chain), the edited
179
+ # root grant fails its own signature.
180
+ alone = parties["a"].sign(
181
+ intent={"action": "read", "target": "calendar", "resource": CAL},
182
+ delegation_chain=links[:1],
183
+ )
184
+ assert (
185
+ verify_delegation_chain(alone, trusted_roots=[parties["root"].did])
186
+ == "delegation_signature_invalid"
187
+ )
176
188
 
177
189
 
178
190
  def test_tampered_intermediate_grant_is_rejected(parties, chain):