Repository navigation
Description
Problem
Stage 2 of the gated passthrough (PR #29) holds a write until the owner approves it. The notification channel (a self-hosted ntfy server) is one-way: it can only wake the phone and open a link. The approval itself happens on a separate approval page protected by HTTP Basic auth plus a per-page CSRF token, which the design accepted for the pilot (open question 7: "WebAuthn stays the later replacement; the approval API stays client-agnostic").
What is missing is a biometric step at the moment of approval. On the owner's phone there is no Face ID / Touch ID confirmation tied to the specific request being approved, and the approver credential is a password that can be typed, replayed or autofilled.
Do not do this
Do not put an approve button (an ntfy http action or a link that approves on GET) inside the notification: a notification can be tapped from a lock screen, would carry or imply a credential, and would approve something the approver has not looked at. Approval must happen on a page that shows the full canonical request, the upstream authority and the entry id.
Proposal
- Add WebAuthn (passkey) as an approver authentication method on the approval plane, with
userVerification: requiredso the platform authenticator asks for Face ID or Touch ID, and the credential is hardware-bound and not replayable. - Bind each assertion to what the approver saw: the challenge is derived from the held entry id, the canonical request digest, the upstream authority and a server nonce, so a signature cannot be reused for another request or another entry (approve-what-you-see; this keeps the spirit of the hash-bound approval in FR: require_approval policy action — human-in-the-loop approval for gated requests #5 and Design: hash-bound single-use approval for PTY injection (not only outbound HTTP) #31 without a durable store).
- One-time enrolment ceremony started from the host console (an enrolment token created locally, expiring quickly), registering the owner's device; store only the public credential; support more than one credential and revocation by removing it from the configuration; sign-count and replay checks; the relying-party id and origin fixed in configuration to the private-network TLS name.
- Keep Basic auth plus CSRF as an explicit fallback mode selectable by configuration (default off once WebAuthn is enrolled); keep the approval API client-agnostic as already required.
- Security review points: no new dependency without review (state which WebAuthn library, its audit status and size), the approval plane stays a separate loopback listener on its own port, the agent and the caller path have no route to it, failure of the WebAuthn step never approves, and nothing about the credential appears in logs, audit or notifications.
Open questions
- Library choice and whether a minimal verifier for the
none/packedattestation formats that Apple platform authenticators use is acceptable versus a full library. - Origin and RP id when the front is the private-network TLS name: confirm Safari on iOS accepts passkeys for it and that the page is a secure context.
- Recovery when the only device is lost (re-enrol from the host console).
- Whether to also support a native approver client later (the API is client-agnostic).
Acceptance
- An approval can be given only after a user-verified WebAuthn assertion over the request-bound challenge; a replayed, cross-request or unverified assertion is refused.
- Enrolment, revocation and fallback are tested; the matrix has rows for each refusal.
- Needs the standing design review before implementation.
Related: #5, #31, PR #29, docs/design/muse-gated-passthrough.md (approval plane and open question 7).
Activity
design: WebAuthn approval for the Muse approval plane (#38)