Skip to content

feat(backend): add security headers, admin guard enforcement, stellarmilestone handler, and API versioning - #584

Merged
KuchiMercy merged 2 commits into
StayLitCodes:mainfrom
ObedChibunna:feat/issues
Aug 26, 2026
Merged

feat(backend): add security headers, admin guard enforcement, stellarmilestone handler, and API versioning#584
KuchiMercy merged 2 commits into
StayLitCodes:mainfrom
ObedChibunna:feat/issues

Conversation

@ObedChibunna

Copy link
Copy Markdown
Contributor

closes #530
closes #532
closes #533
closes #534

  • Install and configure helmet middleware with CSP, X-Frame-Options: DENY, HSTS, nosniff, referrer-policy; configure CORS via CORS_ORIGINS env var
  • Fix AuthGuard to look up user from DB and attach role to request
  • Add SuperAdminGuard for super-admin-only endpoints
  • Add promote/demote user endpoints with safety checks and audit logging
  • Implement handleMilestoneReleased in StellarEventListenerService with DB updates, WebSocket events, notifications, and audit trail
  • Implement URL-based API versioning with /v1/ prefix for all endpoints
  • Add ApiVersionMiddleware for backward-compatible unversioned URL rewriting with Sunset, X-API-Version, and Link headers (RFC 8594)
  • Scaffold v2 endpoint structure with placeholder controllers
  • Configure Swagger UI with version selector (v1 current, v2 scaffold)
  • Update frontend API client and services to use /v1/ prefix
  • Document API versioning strategy in CONTRIBUTING.md
  • Fix pre-existing test and lint issues across the backend
  • Add E2E and unit tests for all new features (28+ new tests)

… milestone handler, and API versioning

- Install and configure helmet middleware with CSP, X-Frame-Options: DENY,
  HSTS, nosniff, referrer-policy; configure CORS via CORS_ORIGINS env var
- Fix AuthGuard to look up user from DB and attach role to request
- Add SuperAdminGuard for super-admin-only endpoints
- Add promote/demote user endpoints with safety checks and audit logging
- Implement handleMilestoneReleased in StellarEventListenerService with
  DB updates, WebSocket events, notifications, and audit trail
- Implement URL-based API versioning with /v1/ prefix for all endpoints
- Add ApiVersionMiddleware for backward-compatible unversioned URL rewriting
  with Sunset, X-API-Version, and Link headers (RFC 8594)
- Scaffold v2 endpoint structure with placeholder controllers
- Configure Swagger UI with version selector (v1 current, v2 scaffold)
- Update frontend API client and services to use /v1/ prefix
- Document API versioning strategy in CONTRIBUTING.md
- Fix pre-existing test and lint issues across backend
- Add E2E and unit tests for all new features (28+ new tests)
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@ObedChibunna 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

@KuchiMercy
KuchiMercy merged commit 08928c1 into StayLitCodes:main Aug 26, 2026
5 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

3 participants