Skip to content

fix(admin): require admin role for metrics#5952

Open
vexnom wants to merge 1 commit into
SecureBananaLabs:mainfrom
vexnom:fix-admin-role-auth-743
Open

fix(admin): require admin role for metrics#5952
vexnom wants to merge 1 commit into
SecureBananaLabs:mainfrom
vexnom:fix-admin-role-auth-743

Conversation

@vexnom

@vexnom vexnom commented Jun 9, 2026

Copy link
Copy Markdown

Closes #5951

/claim #5951

Refs parent bounty #743.

Summary

  • add an admin-role gate after bearer authentication on admin routes
  • reject authenticated non-admin users from GET /api/admin/metrics with 403
  • add regression coverage for unauthenticated, non-admin, and admin requests
  • update the API test script so Node's test runner runs the existing *.test.js files

Tests

  • npm test -w apps/api

Payout: Base USDC 0x42430d6ade79041f569dc5e28153052ccef82ea6

github-actions Bot added a commit that referenced this pull request Jun 9, 2026
@vexnom vexnom force-pushed the fix-admin-role-auth-743 branch 9 times, most recently from 7362230 to e2b894e Compare June 9, 2026 12:39
@vexnom vexnom force-pushed the fix-admin-role-auth-743 branch from e2b894e to 5127222 Compare June 9, 2026 12:57
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.

Admin metrics should require admin role authorization

1 participant