Skip to content

Add authenticated access boundaries for sensitive API routes - #939

Merged
Nanle-code merged 2 commits into
Nanle-code:masterfrom
Noobb-byte:Add-authenticated-access-for-sensitive-server-routes
Aug 31, 2026
Merged

Add authenticated access boundaries for sensitive API routes#939
Nanle-code merged 2 commits into
Nanle-code:masterfrom
Noobb-byte:Add-authenticated-access-for-sensitive-server-routes

Conversation

@Noobb-byte

Copy link
Copy Markdown

PR Title

Add authenticated access boundaries for sensitive API routes

Summary

This PR tightens the API boundary around user-specific and operational data by enforcing explicit authentication and authorization checks before requests reach sensitive handlers.

closes #771

Changes

  • Hardened bearer-token validation and unsupported environment checks in auth.js
  • Applied auth gating to protected routes in server.js
  • Added role-based access enforcement for admin-only operational endpoints in accessControl.js and gasPrediction.js
  • Added self-or-admin enforcement for user-scoped resources in behavior.js and notificationSummaries.js
  • Added regression tests in authBoundary.test.js
  • Documented the boundary behavior in README.md

Why

Several routes exposing user or operational data were only partially protected. This change makes the boundary explicit and consistent, preventing unauthorized reads and unsafe config changes while preserving the existing mock OAuth flow used in development/test environments.

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@Noobb-byte 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

@Manuelshub

Copy link
Copy Markdown
Collaborator

@Noobb-byte Please resolve conflicts so I can merge!!!

@Nanle-code
Nanle-code merged commit ea16c80 into Nanle-code:master Aug 31, 2026
1 check failed
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.

[2026 API] Add authenticated access for sensitive server routes

3 participants