Skip to content

[RELIABILITY][AUTH AUDIT] Make authentication-event persistence observable and durable #193

Description

@Obiajulu-gif

Summary

Authentication events are written fire-and-forget and every database error is swallowed. Incident-response history can silently disappear even though the request path logs success.

Repository evidence

  • lib/auth/auth-event-log.ts:82-103 documents and implements an unawaited AuthEventModel.create(...).catch(() => {}).
  • lib/auth/auth-event-log.ts:114-116 relies on that collection for incident review.

Scope

  • Queue auth events through a durable bounded path or await critical event classes.
  • Emit metrics/alerts for dropped events and validate field-size limits before logging.

Acceptance criteria

  • Critical auth events are not acknowledged without durable acceptance.
  • Dropped noncritical events are counted with redacted diagnostics.

Tests

  • Inject database outages, queue saturation, restart, duplicate delivery, and oversized headers.

Non-goals

  • Replacing the broader financial audit trail.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions