Skip to content
This repository was archived by the owner on Oct 17, 2026. It is now read-only.

feat(execute): optional Cloud issuer seal_signature on ExecuteEvidenceReceiptV1 - #44

Merged
abrichr merged 1 commit into
mainfrom
agent/seal-signature-field
Oct 15, 2026
Merged

abrichr merged 1 commit into
mainfrom
agent/seal-signature-field

Conversation

@abrichr

@abrichr abrichr commented Oct 15, 2026

Copy link
Copy Markdown
Member

Security-sensitive (Seal verification contract): left for Richard's review.

  • New module openadapt_types/seal.py:
    • SealSignatureV1 (openadapt.seal-signature/v1, Ed25519, issuer openadapt-cloud).
    • parse_key_registry (active/revoked keys).
    • verify_seal_signature and verify_sealed_receipt, which refuse with a closed reason: unsigned, malformed, receipt_mismatch, unknown_key, revoked_key, bad_signature, or verifier_unavailable.
  • ExecuteEvidenceReceiptV1.seal_signature: SealSignatureV1 | None = None. The field is optional and additive. Existing receipts still validate and count as unsigned. The OpenAPI doc is regenerated.
  • The receipt hash is the sha256 of the canonical (sorted, compact) JSON of the receipt without seal_signature.
  • Byte-compatible with Cloud src/lib/sealSignature.ts (OpenAdaptAI/openadapt-cloud#399). tests/fixtures/cloud-seal-signature-vector.json was generated by the TS signer with a fixed test seed and verifies in Python.
  • cryptography is not added as a dependency, so the lock is unchanged. Verification refuses without it. CI runs tests/test_seal.py with --with cryptography.

Tests: 5 new, 671 total passing locally.

…eReceiptV1

Adds openadapt_types.seal: SealSignatureV1 (openadapt.seal-signature/v1),
key registry parsing, and fail-closed verify_seal_signature /
verify_sealed_receipt, byte-compatible with Cloud's sealSignature.ts (a
TypeScript-generated test vector verifies in Python). The receipt gains an
optional seal_signature; existing receipts stay valid and are unsigned.
Verification needs cryptography and refuses without it.

Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
@abrichr

abrichr commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Self-review.

  • seal_signature is optional with a null default, so existing receipts still validate. The OpenAPI schema is regenerated.
  • The verifier refuses on every failure: unsigned, malformed (extra fields forbidden), receipt_mismatch, unknown_key, revoked_key (only for Seals issued at or after revoked_at), and bad_signature. Without cryptography it returns verifier_unavailable and never passes.
  • The Cloud TypeScript test vector verifies in Python, so the signing payload and canonical form match across languages.
  • Merging releases automatically: semantic-release on main, feat gives 0.20.0.

@abrichr
abrichr merged commit 0de097a into main Oct 15, 2026
1 check passed
@abrichr
abrichr deleted the agent/seal-signature-field branch October 15, 2026 02:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant