Skip to content

feat(auth): force password reset for seeded default accounts#1

Closed
jescalada wants to merge 5 commits intomainfrom
cursor/proxy-service-security-audit-5df7
Closed

feat(auth): force password reset for seeded default accounts#1
jescalada wants to merge 5 commits intomainfrom
cursor/proxy-service-security-audit-5df7

Conversation

@jescalada
Copy link
Copy Markdown
Owner

@jescalada jescalada commented Mar 14, 2026

Summary

  • keep seeded local admin/admin and user/user bootstrap accounts available, including in production
  • in production, mark seeded default local accounts with mustChangePassword=true at creation time
  • add login hardening so if a default credential is successfully used in production (including legacy records), the account is flagged for forced password change
  • add backend enforcement to block protected API usage with HTTP 428 until password is changed
  • add POST /api/auth/change-password endpoint for authenticated local accounts
  • expose mustChangePassword in auth/profile responses when applicable
  • add frontend forced-reset UX on the login screen with an inline "change password now" flow
  • route users with pending password change back to /login until reset is completed

Security behavior

This preserves development/test convenience while preventing long-term use of default credentials in production.

Testing

  • npm test -- test/services/passport/local.test.ts test/services/routes/auth.test.ts test/testLogin.test.ts
Open in Web Open in Cursor 

@github-actions github-actions Bot added the fix label Mar 14, 2026
@cursor cursor Bot changed the title fix(auth): disable default local credentials in production feat(auth): force password reset for seeded default accounts Mar 14, 2026
@jescalada jescalada closed this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants