feat(001)!: require a verified platform seal by default#7
Conversation
An unsealed certificate, or a sealed one with no JWKS to adjudicate it, previously verified with exit 0 and a notice; only --require-sealed made it fail. That let a factory omit the platform countersign (what binds a run to its admission contract) and still get a green verify. Flip the default to the trust-nobody posture: such a certificate is now rejected (exit 1) unless --allow-unsealed is passed. - CLI: replace --require-sealed with --allow-unsealed (the opt-out); the old flag is kept as a hidden, deprecated no-op so existing invocations still run. - Core: the seal message text now reflects the flipped default and the opt-out, and drops the stale --jwks-url reference (tenant-tail links no HTTP client). - Spec 001 Behavior amended to make the fail-closed default authoritative. - Tests: CLI exit-1-by-default + --allow-unsealed exit-0 cases, and two core parity tests over the real signed fixture (seal-required vs unsealed-allowed). - Docs (website + CLAUDE.md) updated; the getting-started quickstart now passes --allow-unsealed for the unsealed fixture.
AI Code ReviewCode ReviewBugs / LogicUnverifiable test assertion —
Deprecation notice has no test SecurityNo regressions. The change is a net security improvement: fail-closed on absent seal is the correct trust-nobody posture. No injection surface in the hard-coded error strings. Minor: error message leaks opt-out flag Spec-Spine Compliance
One observation: PerformanceNo performance concerns. All changes are in CLI argument parsing, error-message string construction, and test harness — none are on any hot path. Automated review by Claude. Diff size: 141 lines. |
First release since v0.2.0, bundling PRs #5, #6, and #7. PR #7 is a breaking change to verify-certificate, so this is a minor bump under 0.x. - Breaking (#7, spec 001): verify-certificate requires a verified platform seal by default; an unsealed or unadjudicated certificate exits 1. Restore the prior behavior with --allow-unsealed. --require-sealed is now a deprecated no-op. - Added (#6, spec 003): release builds assert the manylinux_2_17 glibc floor. - Fixed (#5): hardened the verify cores, exit-code contract, and release pipeline. Version bumped in lockstep across Cargo.toml, npm/package.json (main + five platform pins), and py/pyproject.toml; Cargo.lock and the codebase-index shard regenerated. New CHANGELOG.md carries the migration note for pinned tenants.
What
Flip the platform-seal posture to fail-closed by default. An unsealed
certificate (no platform countersign), or a sealed one with no JWKS supplied to
adjudicate it, is now rejected (exit
1) unless--allow-unsealedispassed.
Why
The platform countersign is what binds a produced run to its admission
contract. Under the old default, a factory could simply omit the countersign
and a tenant's
verify-certificatestill went green (exit0with a notice);only the opt-in
--require-sealedmade it fail. For a verifier whose wholeposture is "do not trust the producer," the safer default is to reject a
certificate that is not bound to its admission contract, and make accepting one
the explicit, visible choice.
What changed
--require-sealedis replaced by--allow-unsealed(the opt-out).The old flag is kept as a hidden, deprecated no-op (it is now the default) so
existing invocations keep running, with a one-line deprecation notice.
certificate.rs): the seal branch messages now name the flippeddefault and the
--allow-unsealedopt-out, and drop the stale--jwks-urlreference (tenant-tail links no HTTP client; spec 003 §Behavior already
forbids that flag).
(the deliberate, human-authorized product decision behind this PR).
exit-1-by-defaultand--allow-unsealed exit-0cases, plustwo core parity tests over the real signed fixture (seal-required rejects,
unsealed-allowed notices). The seal posture had no direct test before.
website/docsandCLAUDE.mdupdated; the getting-startedquickstart now passes
--allow-unsealedfor the unsealed fixture (which wouldotherwise now exit
1).Verification
cargo fmt --check,cargo clippy -D warnings,cargo test --workspaceallgreen (6 CLI tests, 6 certificate-parity tests, 87 core, 30 types).
--allow-unsealed-> exit 0 (VERIFIED, notice); deprecated--require-sealed-> notice + exit 1; both flags -> opt-out wins.
spec-spine compile/index check/lint --fail-on-warnclean;.derivedregenerated for spec 001.Spec-Drift-Waiver: crates/tenant-tail-cli/src/main.rs and crates/tenant-tail-cli/tests/cli.rs are the CLI verb-surface wiring and exit-code test that expose the platform-seal default; the authoritative behavior change is in spec 001 §Behavior, amended in this PR. Spec 003 holds certificate verdict logic explicitly out of scope and spec 000 is workspace bootstrap, so neither is the correct home for seal semantics. Waived per .claude/rules/adversarial-prompt-refusal.md: waive with a citation rather than amend an off-topic owning spec to satisfy a mechanical coupling refresh.