Skip to content

3.0.0

Choose a tag to compare

@KhaledSaeed18 KhaledSaeed18 released this 09 Oct 21:23
· 51 commits to main since this release

Passkeys, a transactional outbox, ES256 access tokens with a public JWKS, an account activity log with security alerts, OpenTelemetry, security automation in CI, and design documents (architecture, ADRs, threat model).

Breaking changes

  • Access tokens are signed with ES256 instead of HS256. JWT_SECRET is no longer used and can be removed. Access tokens issued before the upgrade stop working; clients get a new one through POST /auth/refresh-token (refresh tokens are unaffected).

Added

  • OpenTelemetry: traces for HTTP, Express, Prisma and SQL, business metrics, trace ids in logs; enabled with OTEL_EXPORTER_OTLP_ENDPOINT. compose.observability.yaml adds a Grafana stack.

  • Account activity log (GET /users/me/activity, and GET /users/:userId/activity for admins) recording security-relevant changes, plus email alerts for sign-ins from a new browser/OS, account lockouts, refresh token reuse and recovery code use. New setting SECURITY_EVENT_RETENTION_DAYS.

  • Security automation: CodeQL, a container build that is smoke tested and scanned with Trivy (with an SBOM), dependency review on pull requests. The runtime image no longer contains npm or yarn.

  • ES256 signing keys stored encrypted in the database, rotated automatically (SIGNING_KEY_ROTATION_DAYS), and published at /.well-known/jwks.json so other services can verify access tokens.

  • Passkeys (WebAuthn): usernameless passwordless sign-in, registration and management (list, rename, remove). New settings WEBAUTHN_RP_ID and WEBAUTHN_ORIGINS.

  • Transactional outbox: emails and security notices are written as jobs in the same database transaction as the change that triggers them, then delivered by a worker with retries and exponential backoff. The worker runs inside the API (OUTBOX_WORKER_ENABLED) or separately (node dist/scripts/worker.js).

  • Community files: code of conduct, security policy with private vulnerability reporting, support guide, issue forms and a detailed contributing guide.

Changed

  • Run yarn db:deploy for the new OutboxMessage, Passkey, WebAuthnChallenge, SigningKey and SecurityEvent tables.
  • forgot-password and resend-verification now enqueue a job instead of sending directly.