Skip to content

feat(keyless): sign-don't-store egress bridge + kit doctor posture (Pillar 2 keyless step 2) - #323

Merged
sandstream merged 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a
Jul 10, 2026
Merged

sandstream merged 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Wires the pure RFC 9421 core (#322) to kit's identity + signed scope, so an agent can prove itself to a host by signing each request instead of carrying a stored bearer token.

What

  • profile schema — [scope].sign: hosts that require a signed request. Rides inside the signed [scope], so a host can't be marked keyless without re-signing.

  • exec-broker/profile-policy — surfaces signHostsDeclared (from the declaration, any sign status) and signHosts (effective only when the scope verifies). An unverified sign list grants nothing — fail-closed, mirroring the existing null-policy rule.

  • src/keyless/sign-request.ts — signOutbound() decides and mints Signature-Input/Signature from signWithIdentity, never fabricating auth:

    • not-required — host not keyless (caller uses its normal credential path)
    • denied — host keyless but scope unverified, or no/revoked identity, or a hardware mandate refuses the file key
    • signed — verified sign host + usable, non-revoked identity

    verifyInbound() is the symmetric kit-peer verifier (rejects revoked signers). This is the only keyless file that imports identity — http-sig.ts stays pure.

  • kit doctor — new "keyless credentials" row: skip (none declared) / fail (declared but unverified, or no usable identity) / pass (verified + identity ready, no stored bearer).

Verification

  • npx tsc --noEmit clean · npx eslint src 0 errors (124 pre-existing warnings)
  • 12 new tests (host matching, verified-vs-declared sign hosts, sign/verify round-trip, tamper/unverified/revoked denials, doctor skip/fail/pass)
  • node scripts/test.mjs — 2770/2770 pass, 0 fail · prettier applied

This completes the keyless build-out: design note (kit-research #39) → pure RFC 9421 core (#322) → identity bridge + doctor posture (this PR).

🤖 Generated with Claude Code


Generated by Claude Code

…illar 2 keyless step 2)

Wire the pure RFC 9421 core to kit's identity + signed scope so an agent can
prove itself to a host by SIGNING each request instead of carrying a stored
bearer token.

- profile schema: [scope].sign — hosts that require a signed request (RFC 9421)
  instead of a stored token. Rides inside the signed [scope], so it cannot be
  marked keyless without re-signing.
- profile-policy: surface signHostsDeclared (from the declaration, any sign
  status) and signHosts (EFFECTIVE only when the scope verifies) — an unverified
  sign list grants nothing (fail-closed), mirroring the null-policy rule.
- src/keyless/sign-request.ts: signOutbound() decides + mints Signature-Input/
  Signature from signWithIdentity; never fabricates auth. not-required (host not
  keyless) / denied (declared-but-unverified, no/ revoked identity, or a hardware
  mandate refusing the file key) / signed. verifyInbound() is the symmetric
  kit-peer verifier (rejects revoked signers). The only keyless file that imports
  identity — http-sig.ts stays pure.
- kit doctor: "keyless credentials" row — skip (none declared) / fail (declared
  but unverified, or no usable identity) / pass (verified + identity ready).

12 new tests (host matching, verified-vs-declared sign hosts, sign/verify
round-trip, tamper/unverified/revoked denials, doctor skip/fail/pass). Full
suite 2770/2770.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit 89a6995 into main Jul 10, 2026
18 checks passed
@sandstream
sandstream deleted the claude/web-kit-status-sync-p6fg9a branch July 10, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants