Refactor route authorization around scopes - #544
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
zpan | d4641e7 | Commit Preview URL Branch Preview URL |
Jul 30 2026, 03:07 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #544 +/- ##
==========================================
+ Coverage 93.43% 93.45% +0.02%
==========================================
Files 277 277
Lines 15369 15328 -41
Branches 4383 4355 -28
==========================================
- Hits 14360 14325 -35
+ Misses 1009 1003 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
accessclassification and credential allowlistsx-zpan-authand fail tests when an OpenAPI operation omits itWhy
The authorization layer mixed route categories, credential types, roles, and scopes. That made the scope contract incomplete and prevented newly granted Agent capabilities from being controlled solely by scopes. The new model branches by authentication method: user sessions use role checks, while delegated credentials use scope checks.
Validation
pnpm lintpnpm typecheckpnpm lint:httppnpm lint:archpnpm lint:specpnpm openapi:client:checkpnpm test— 5309 passedpnpm test:cf— 79 passedpnpm exec playwright test e2e/agent-access.spec.ts— 4 passedpnpm build