Skip to content

docs: add authentication security patterns to DEVELOPMENT.md#192

Merged
hoiekim merged 1 commit intohoiekim:mainfrom
moltboie:docs/anti-timing-attack-pattern
Mar 26, 2026
Merged

docs: add authentication security patterns to DEVELOPMENT.md#192
hoiekim merged 1 commit intohoiekim:mainfrom
moltboie:docs/anti-timing-attack-pattern

Conversation

@moltboie
Copy link
Copy Markdown
Contributor

Summary

Documents anti-timing-attack patterns for login routes, based on patterns established in PR #136.

Added

Authentication Security section covering:

  • Dummy bcrypt hash technique to prevent timing-based username enumeration
  • Generic error messages to avoid revealing user existence

e2e Testing

Documentation-only change. Verified DEVELOPMENT.md renders correctly and content is accurate against the actual implementation in src/server/routes/users/post-login.ts.

@moltboie
Copy link
Copy Markdown
Contributor Author

Self-Review

Discussion thread status:

  • New PR. No prior feedback.

Checked:

  • Content accuracy: Documents the dummy bcrypt hash technique matching the implementation in PR security/ux: fix username enumeration and add login error feedback #136. The pattern (run bcrypt.compare even for non-existent users) is correct and mitigates timing-based username enumeration.
  • Generic error message guidance: Correct — never reveal whether the username or password was wrong; always return "Invalid credentials.".
  • Placement: New "Authentication Security" section in DEVELOPMENT.md. Logical location next to other auth-related patterns.
  • No code changes: Documentation-only PR. No functional risk.
  • CI: build ✓, test ✓

E2E Testing:

  • Documentation-only change. No app testing needed.

Issues found:

  • None

Confidence: High

@moltboie
Copy link
Copy Markdown
Contributor Author

Self-Review

Discussion thread status:

  • New PR. No prior feedback. Documentation-only change.

Checked:

E2E Testing:

  • N/A (documentation only).

Issues found:

  • None

Confidence: High

Document anti-timing-attack pattern (dummy bcrypt hash) and generic
error messages for login routes. Based on patterns from PR hoiekim#136.
@moltboie moltboie force-pushed the docs/anti-timing-attack-pattern branch from 1299fd3 to dca3cbb Compare March 21, 2026 16:50
@hoiekim hoiekim merged commit 0396cf4 into hoiekim:main Mar 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants