Audit passkey enrollment with durable Security activity #513

Closed
opened 2026-08-10 20:50:14 +00:00 by timmy · 0 comments
Owner

Problem

Passkey enrollment creates a durable sign-in credential without creating a Security activity event. If the journal is unavailable, enrollment still succeeds, leaving operators without a trustworthy record of newly established access.

User outcome

Every successful passkey enrollment appears in Security activity with a bounded device label. Enrollment fails closed before credential creation when the journal cannot reserve an event; a finalization outage leaves a truthful pending event while preserving successful enrollment.

Acceptance criteria

  • A successful enrollment records exactly one completed passkey_enrolled event.
  • Reservation failure returns sanitized 503 and stores no credential.
  • Verification or registry failure discards the reservation.
  • Finalization failure still returns 201 and leaves the event pending.
  • Persisted/API event data excludes credential IDs, keys, challenges, attestation, session IDs, CSRF values, and recovery tokens.
  • Security activity renders “Passkey enrolled” safely, including on mobile.
  • Behavioral focused tests and the full suite pass.

Non-duplication evidence

No open issue or PR covers passkey enrollment auditing. Historical #485/#486 added enrollment, #493/#494 added Security activity, and #497/#498 added reserve/finalize semantics for destructive actions; repository history has no passkey_enrolled event. This issue closes the remaining credential-creation audit gap.

## Problem Passkey enrollment creates a durable sign-in credential without creating a Security activity event. If the journal is unavailable, enrollment still succeeds, leaving operators without a trustworthy record of newly established access. ## User outcome Every successful passkey enrollment appears in Security activity with a bounded device label. Enrollment fails closed before credential creation when the journal cannot reserve an event; a finalization outage leaves a truthful pending event while preserving successful enrollment. ## Acceptance criteria - A successful enrollment records exactly one completed `passkey_enrolled` event. - Reservation failure returns sanitized 503 and stores no credential. - Verification or registry failure discards the reservation. - Finalization failure still returns 201 and leaves the event pending. - Persisted/API event data excludes credential IDs, keys, challenges, attestation, session IDs, CSRF values, and recovery tokens. - Security activity renders “Passkey enrolled” safely, including on mobile. - Behavioral focused tests and the full suite pass. ## Non-duplication evidence No open issue or PR covers passkey enrollment auditing. Historical #485/#486 added enrollment, #493/#494 added Security activity, and #497/#498 added reserve/finalize semantics for destructive actions; repository history has no `passkey_enrolled` event. This issue closes the remaining credential-creation audit gap.
timmy self-assigned this 2026-08-10 20:50:14 +00:00
timmy closed this issue 2026-08-10 20:58:08 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#513
No description provided.