Skip to content

docs(security): document authentication and API security model (#189) - #299

Merged
Tybravo merged 1 commit into
SwiftChainn:mainfrom
Aboyeji-Isaac:docs/security-model
Oct 1, 2026
Merged

Tybravo merged 1 commit into
SwiftChainn:mainfrom
Aboyeji-Isaac:docs/security-model

Conversation

@Aboyeji-Isaac

Copy link
Copy Markdown
Contributor

Summary

Adds a source-grounded security reference for contributors building or reviewing protected SwiftChain API endpoints.

Closes #189

Changes

  • Document JWT issuance and expiry behavior
  • Explain the difference between payload-only token verification and DB-backed route authentication
  • Document RBAC roles and the existing authenticate / requireRole middleware order
  • Record the global and named rate-limit defaults
  • Document idempotency-key behavior, replay handling, and conflict responses
  • Document CORS behavior
  • Document Helmet protections including CSP and HSTS
  • Document PII masking and logging expectations
  • Clarify that secrets and raw passwords must not be logged
  • Document the current refresh-token reality
  • Add a checklist for implementing protected endpoints safely

Tested

Remote source-to-document verification confirms the documented controls and defaults match the current codebase.

The branch is based on current upstream main and changes only backend/docs/security.md.

No runtime code changed.

@drips-wave

drips-wave Bot commented Oct 1, 2026

Copy link
Copy Markdown

@Aboyeji-Isaac Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Tybravo

Tybravo commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

@Aboyeji-Isaac

Well-done work
Thank you for your contribution

@Tybravo
Tybravo merged commit 71a67f7 into SwiftChainn:main Oct 1, 2026
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.

[Docs] Document the authentication and security model (JWT, RBAC, rate limits, idempotency, CORS, CSP)

2 participants