[team] Team vaults, policies, sign.request, proofs, cosign and Tauri envelopes (v0.18.0) #23

Manually merged
mnovak merged 2 commits from feature/team-vault into main 2026-11-17 12:21:50 +01:00
Owner

Team vaults for small teams (phase T1 of Fabrica's docs/32_coherence.md); docs/TEAM.md is the contract. v0.18.0.

What

  • custos-team (new, pure):
    • member keys (X25519 + Ed25519), the join code, the team key sealed per member;
    • policies per environment (canonical, signed by the team identity) and evaluate;
    • the canonical sign.request / target.request, approval statements bound to the request hash and its match code;
    • the policy proof with verify_proof, which Fabrica calls;
    • SignReply, TargetRelease, and the ExternalSigner interface.
  • custos-vault:
    • a team vault is v2 with member slots only (kind 6, 144 bytes) and a team body;
    • open_team, add a member (by join code), remove a member (a new team key and epoch);
    • policy, team keys (team-release/team-preview Ed25519, team-cosign/team-cosign-preview P-256);
    • targets (released once per signed deployment), external signers;
    • team_sign for minisign, tauri-updater, cosign, apk and authenticode (external), with a seen replay list;
    • the person's member member with rollback protection (TeamRollback).
  • custos-sign: cosign (simple-signing payload written here, ECDSA P-256, RFC 6979) and tauri_updater.
  • Docs: TEAM.md (new), FORMAT.md, FACTORS.md, SIGNING.md, CLAUDE.md.

Tests

cargo test --workspace --release: 275 passed before the format pass. After the format pass, custos-team, custos-sign and custos-vault were run again: 178 passed.

  • Policy, every combination: team sizes 1, 2, 3, 4 and 10 × 4 environments × 5 author forms × up to 7 approver sets (400+ cases), plus others, approver lists, unsatisfiable rules and the canonical text.
  • Removing a member: the old member has no slot; the old header spliced onto the new body does not open; a credential added after the removal is in no readable byte.
  • Wrong or replayed match code:
    • WrongMatch on the card's code;
    • a swapped pub;
    • forged statements;
    • Replayed after a signature, also after a save and reopen.
  • Envelopes with standard tools:
    • minisign and tauri-updater through minisign-verify (Tauri's verifier);
    • cosign through openssl dgst -sha256 -verify;
    • every format through verify_proof.
  • Targets:
    • released only for a signed deployment of the same project and environment, within 25 hours;
    • once per deployment.

Self-review

  • No custom crypto. It uses custos-seal (X25519 + XChaCha20-Poly1305 + HKDF), ed25519-dalek and p256. Every signature carries a domain prefix (policy, proof, approval).
  • Secrets print [redacted]. A test checks views, Debug output and the file bytes for a signer pin.
  • signing_sign refuses the new kinds; they go through team_sign only. Personal vaults are unchanged apart from the optional member body member.
  • Known limits, documented in TEAM.md:
    • the team identity does not rotate when a member is removed (it is what Fabrica pins);
    • credentials a removed member could see are listed for rotation at their source.
Team vaults for small teams (phase T1 of Fabrica's `docs/32_coherence.md`); `docs/TEAM.md` is the contract. v0.18.0. ## What - **`custos-team`** (new, pure): - member keys (X25519 + Ed25519), the join code, the team key sealed per member; - policies per environment (canonical, signed by the team identity) and `evaluate`; - the canonical `sign.request` / `target.request`, approval statements bound to the request hash and its match code; - the policy proof with `verify_proof`, which Fabrica calls; - `SignReply`, `TargetRelease`, and the `ExternalSigner` interface. - **`custos-vault`**: - a team vault is v2 with member slots only (kind 6, 144 bytes) and a `team` body; - `open_team`, add a member (by join code), remove a member (a new team key and epoch); - policy, team keys (`team-release`/`team-preview` Ed25519, `team-cosign`/`team-cosign-preview` P-256); - targets (released once per signed deployment), external signers; - `team_sign` for minisign, tauri-updater, cosign, apk and authenticode (external), with a `seen` replay list; - the person's `member` member with rollback protection (`TeamRollback`). - **`custos-sign`**: `cosign` (simple-signing payload written here, ECDSA P-256, RFC 6979) and `tauri_updater`. - Docs: TEAM.md (new), FORMAT.md, FACTORS.md, SIGNING.md, CLAUDE.md. ## Tests `cargo test --workspace --release`: 275 passed before the format pass. After the format pass, `custos-team`, `custos-sign` and `custos-vault` were run again: 178 passed. - Policy, every combination: team sizes 1, 2, 3, 4 and 10 × 4 environments × 5 author forms × up to 7 approver sets (400+ cases), plus `others`, approver lists, unsatisfiable rules and the canonical text. - Removing a member: the old member has no slot; the old header spliced onto the new body does not open; a credential added after the removal is in no readable byte. - Wrong or replayed match code: - `WrongMatch` on the card's code; - a swapped `pub`; - forged statements; - `Replayed` after a signature, also after a save and reopen. - Envelopes with standard tools: - minisign and tauri-updater through minisign-verify (Tauri's verifier); - cosign through `openssl dgst -sha256 -verify`; - every format through `verify_proof`. - Targets: - released only for a signed deployment of the same project and environment, within 25 hours; - once per deployment. ## Self-review - No custom crypto. It uses custos-seal (X25519 + XChaCha20-Poly1305 + HKDF), ed25519-dalek and p256. Every signature carries a domain prefix (`policy`, `proof`, `approval`). - Secrets print `[redacted]`. A test checks views, Debug output and the file bytes for a signer pin. - `signing_sign` refuses the new kinds; they go through `team_sign` only. Personal vaults are unchanged apart from the optional `member` body member. - Known limits, documented in TEAM.md: - the team identity does not rotate when a member is removed (it is what Fabrica pins); - credentials a removed member could see are listed for rotation at their source.
mnovak added 2 commits 2026-11-17 12:15:29 +01:00
mnovak added 1 commit 2026-11-17 12:15:29 +01:00
mnovak manually merged commit f95c768bfa into main 2026-11-17 12:21:50 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/CustosPublic#23