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.
- {vouch_protocol-3.1.0/vouch_protocol.egg-info → vouch_protocol-3.2.0}/PKG-INFO +1 -1
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/pyproject.toml +1 -1
- vouch_protocol-3.2.0/tests/test_delegate_parent.py +104 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_hardening.py +12 -6
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_verify.py +15 -3
- vouch_protocol-3.2.0/tests/test_flat_delegation.py +792 -0
- vouch_protocol-3.2.0/tests/test_flat_delegation_vectors.py +134 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fleet.py +12 -1
- vouch_protocol-3.2.0/tests/test_grant_chain_rules.py +1110 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_policy_limits.py +11 -10
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_signer_vc.py +11 -5
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/__init__.py +9 -1
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/agent.py +11 -3
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/autosign.py +21 -10
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/cli.py +183 -7
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/conformance.py +9 -2
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/credential.py +54 -14
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/fleet.py +57 -5
- vouch_protocol-3.2.0/vouch/grant_chain.py +614 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/a2a.py +4 -2
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/mcp/server.py +42 -3
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/mlflow.py +4 -2
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/safetensors.py +4 -2
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/signer.py +112 -51
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trifecta.py +33 -24
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/vc.py +19 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/verifier.py +75 -21
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0/vouch_protocol.egg-info}/PKG-INFO +1 -1
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/SOURCES.txt +5 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/LICENSE +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/MANIFEST.in +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/README.md +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/setup.cfg +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_accountability.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_agent_enroll.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ati_core.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_attribution.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_audio_bridge.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_audit_trail.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_auditor.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_authority_state.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_authority_state_vectors.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_autosign.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_behavioral_attestation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_bridge.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_budget.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_c2pa_formats.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cache.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_canary.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_caveats.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ccg_demo.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_init.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_root.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_verify.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_cli_without_server_extra.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_conformance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_context_v1.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_credential_gate.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_data_integrity.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_attenuation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_chain_vectors.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_delegation_size_guard.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_deliberation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_disconnected_edge.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_dtn_pads.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_dx_sugar.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ed25519_check.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ed25519_strict_vector.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_examples_robotics.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fastapi_credential_gate.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fence.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_fetch_hostile_documents.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_git_commit_binding.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_git_workflow.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_grade.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_grade_evidence.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_halos_evidence.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hardware_seam.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hasura_integration.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_heartbeat.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_heartbeat_hardening.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hybrid.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_hybrid_interop.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_identity_file_reader.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_intent_recheck.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_intent_recheck_vector.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_jcs.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_jcs_interop.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_keys_post_quantum.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_keys_ts_interop.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_kms.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_liveness_conformance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_check_trust.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_guard_replay.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_guard_revocation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_server_shield.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mcp_server_status_tools.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_media_badge.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_media_native.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_merkle.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mint_contributor_credential.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mint_delegation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_mldsa_check.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_multikey.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_nesting_and_precision.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_nonce.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_nonce_replay_store.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_onboard.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_orbital_accumulator.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_pacing.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_pq_verify.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_proof_of_integration.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_proof_set_vector.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_provenance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_quorum.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reasoning.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reasoning_escrow_binding.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_receipts.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_recovery.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_replay_key_vector.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_aggregate.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_disputes.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_ledger.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_policy.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_reputation_portability.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_revocation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_revocation_fail_closed.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_access.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_conformance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_consent.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_custody.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_embodiment.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_fusion.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_handover.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_handshake_blackbox_passport.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_identity.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_lease_quorum.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_lifecycle.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_liveness_revocation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_odd.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_perception.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_pq.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_provenance_capability.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_root_identity.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_safety_record.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_swarm.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_teleop.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_robot_wear.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_root_delegation_scripts.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_root_of_trust.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_root_of_trust_vectors.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ros2_action_gate.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_runtime_vectors.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_scan.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_secure_key_custody.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_security_hardening.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_shield_guard.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_shield_rules.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_shield_vectors.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_sidecar.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_ssrf_ranges.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_status_list.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_status_list_strict.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_strict_time_leftovers.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_threshold.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_threshold_loader.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_timefmt.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_tool_registry.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transparency.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport_http_rendezvous.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport_rendezvous.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_transport_udna_sdk.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trifecta.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trust_check.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trust_entropy.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trusted_roots.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_trusted_roots_vector.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_validator_cli.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_validator_server.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_vc.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_vector_runners.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_hardening.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_round2.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_round3.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verifier_vc.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_verify_without_key.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/tests/test_vouch_mcp.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/accountability.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/async_verifier.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/attenuation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/attribution.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/attribution_cli.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/audio.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/audit_trail.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/auditor.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/authority_state.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/behavioral_attestation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/audio_routes.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/config.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/bridge/server.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/budget.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/cache.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/canary.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/caveats.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/config.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/conformance_jcs_vectors.json +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/data_integrity.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/data_integrity_hybrid.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/deliberation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/did_web.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/ed25519_check.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/fence.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/gate.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/grade.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/heartbeat.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/_common.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/adk.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/amnesia.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/autogen/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/autogpt/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/autogpt/commands.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/claude-code/settings.hooks.json +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/crewai/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/crewai/tool.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/fastapi.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/google.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/goose.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/hasura/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/hasura/webhook.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/langchain/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/langchain/tool.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/langgraph.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/mcp/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/n8n.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/openai.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/streamlit/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/streamlit/seal.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/integrations/vertex_ai/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/intent_recheck.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/jcs.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/keys.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/keystore.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/kms.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/liveness_conformance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mcp/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mcp/_guard.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mcp_guard.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/badge.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/c2pa.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/media/native.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/merkle.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/metrics.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/mldsa_check.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/multikey.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/nesting.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/nonce.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/onboard.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/_common.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/_pedersen.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/census.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/custody.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/disclosure.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/dissent.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/fuse.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/load_auth.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/oversight.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/pace.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/prereg.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/recursion.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/redline.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/pacing/restraint.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/proof_of_integration.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/provenance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/quorum.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/ratelimit.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reasoning.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/receipts.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/recovery.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/registry.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_aggregate.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_disputes.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_ledger.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_policy.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/reputation_portability.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/revocation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/_signing.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/_verify.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/access.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/accumulator.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/blackbox.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/bundle.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/capability.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/conformance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/consent.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/custody.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/dtn_revocation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/edge_trust.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/embodiment.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/freshness.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/fusion.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/geoscope.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/halos.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/handover.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/handshake.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/hardware.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/identity.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/lease.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/lifecycle.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/liveness.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/localization.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/odd.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/orbital.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/passport.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/perception.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/perception_consensus.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/physical_quorum.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/pq.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/presence.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/provenance.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/quorum_trust.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/revocation.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/root_identity.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/safety_record.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/swarm.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/teleop.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/robotics/wear.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/root_of_trust.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/scan/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/scan/detector.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/scan/patterns.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/seal.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/demo.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/flight_recorder.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/rules.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/shield.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/shield/trust_registry.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/sidecar.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/ssrf.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/status_list.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/status_list_fetcher.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/threshold.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/timefmt.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/tool_registry.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transparency.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/__init__.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/base.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/did_key.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/envelope.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/http_rendezvous.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/http_transport.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/manager.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/rendezvous.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/transport/udna.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trust_check.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trust_entropy.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/trusted_roots.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/validator_flags.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/validator_server.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch/verification.py +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/dependency_links.txt +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/entry_points.txt +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/requires.txt +0 -0
- {vouch_protocol-3.1.0 → vouch_protocol-3.2.0}/vouch_protocol.egg-info/top_level.txt +0 -0
|
@@ -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
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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=
|
|
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
|
-
== "
|
|
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):
|