feat(oauth): re-land explicit scopes now that Code ceilings are seeded - #3974
Open
MattBro wants to merge 1 commit into
Open
feat(oauth): re-land explicit scopes now that Code ceilings are seeded#3974MattBro wants to merge 1 commit into
MattBro wants to merge 1 commit into
Conversation
Request the live scopes_supported set plus llm_gateway:read instead of "*", and bump OAUTH_SCOPE_VERSION 5 → 6 so installs re-authorize. The Jul 22 revert (#3668) was required because #3411 shipped the explicit list before US/EU OAuth app ceilings were seeded. Both Code apps are now seeded to [@default, llm_gateway:read] and *→ceiling narrowing is live, so the client change is unblocked. Regenerated from us.posthog.com scopes_supported (203 scopes, includes loop:* and post-#3411 additions); drop agents:* which left the advertised set. Comment documents the seed-before-release guardrail so it doesn't get bundled again without the ceiling.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "feat(oauth): re-land explicit scopes now..." | Re-trigger Greptile |
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.
Problem
PostHog Code still requests
scope=*at sign-in. That blocks retiring the wildcard server-side and keeps the desktop token full-privilege.#3411 shipped an explicit scope list (plus
llm_gateway:read) and bumpedOAUTH_SCOPE_VERSION, but the US/EU Code OAuth app ceilings were not seeded yet. Fresh sign-ins hitinvalid_scope, so #3668 reverted to*. Seeding +*→ceiling narrowing are now live in both regions, so the client change is unblocked.Changes
OAUTH_SCOPES: regenerate from livescopes_supportedonus.posthog.com(203 scopes, includesloop:*and scopes added after feat(desktop): Implement loops ➿ #3411) plus privilegedllm_gateway:readlast. Dropsagents:*/agent_approvals:*, which left the advertised set.OAUTH_SCOPE_VERSION5 → 6 so existing installs re-authorize onto the narrower set.OAUTH_SCOPESdocuments the deploy-order guardrail (seed ceiling in US+EU before shipping a non-*client / version bump) so this doesn't get bundled again without the seed.llm_gateway:readlast, well-formed strings) + fingerprint guard.Preconditions (already done)
#70538*→ceiling narrowing deployed US+EU["@default", "llm_gateway:read"]in US+EU*sign-in narrowed correctly in US; zeroinvalid_scopefrom this pathHow did you test this?
pnpm --filter @posthog/shared test— 767 passed, includingoauth.test.ts(fingerprint + structural guards)pnpm typecheckcleanRelated
Automatic notifications