fix: drop ungrantable introspection scope from OAuth authorize URL#443
Draft
MattBro wants to merge 1 commit into
Draft
fix: drop ungrantable introspection scope from OAuth authorize URL#443MattBro wants to merge 1 commit into
introspection scope from OAuth authorize URL#443MattBro wants to merge 1 commit into
Conversation
The authorization server rejects `introspection` as `invalid_scope` because it isn't in `posthog/scopes.py` (the canonical scope list). Token introspection is an endpoint per RFC 7662, not a grantable scope, so it keeps working without being requested at authorize time. Generated-By: PostHog Code Task-Id: 2ba7eb25-0ba0-4c0c-9f02-7b4b35839c84
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
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.
Summary
introspectionentry from the OAuthscopesarray insrc/utils/setup-utils.ts(around line 495). It is not present inposthog/scopes.py(the canonical scope list), is not grantable, and the authorization server currently rejects the authorize request asinvalid_scope.Token introspection continues to work without it as a granted scope: introspection is an endpoint per RFC 7662, authenticated via the bearer token, not a scope that needs to be requested at authorize time.
Test plan
pnpm build(passes locally; smoke test green)invalid_scope/oauth/introspect) still succeeds for a token issued with the trimmed scope setCreated with PostHog Code