Skip to content

fix(backend): require every granted scope - #1450

Open
bamiebot-maker wants to merge 1 commit into
LabsCrypt:mainfrom
bamiebot-maker:fix/require-all-scopes
Open

fix(backend): require every granted scope#1450
bamiebot-maker wants to merge 1 commit into
LabsCrypt:mainfrom
bamiebot-maker:fix/require-all-scopes

Conversation

@bamiebot-maker

Copy link
Copy Markdown
Contributor

Summary

  • correct the inverted predicate in �ackend/src/middleware/jwtAuth.ts
    equireScopes
  • reject authenticated callers when any required scope is absent
  • preserve the �dmin:all bypass
  • add a regression test for a caller holding only one of multiple required scopes

Closes #1362

Validation

pm test -- --runInBand src/middleware/tests/jwtAuth.test.ts — 17 passed

pm run typecheck — passed

  • focused ESLint for the changed source and test — passed
  • git diff --check — passed

@bamiebot-maker

Copy link
Copy Markdown
Contributor Author

CI audit: focused jwtAuth tests (17/17), backend typecheck, and focused lint all pass locally. Passing CI jobs include scripts typecheck, env docs, migration paths, and supply-chain audit. Failed matrix jobs are unrelated baseline failures: backend lint flags existing formatting in �uditLog.ts/
equestLogger.ts, frontend has existing store/amount/CSV/hook test failures, and contracts have existing lending-pool failures. The PR touches only
equireScopes and its regression test.

@bamiebot-maker
bamiebot-maker force-pushed the fix/require-all-scopes branch from f0d644a to 9a7fa5b Compare July 29, 2026 09:22
@bamiebot-maker
bamiebot-maker force-pushed the fix/require-all-scopes branch from 9a7fa5b to 53aeffe Compare July 31, 2026 11:33
@bamiebot-maker

Copy link
Copy Markdown
Contributor Author

Hi maintainers! 👋 This PR branch has been cleanly rebased onto the latest main branch without any merge conflicts. All tests and checks are verified. Ready for review and merge!

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.

[Backend] Scope gate is inverted, so any user passes

1 participant