Repository navigation
feat(core): add Snowflake Cortex browser OAuth - #47139
Closed
rekram1-node wants to merge 1 commit into
Closed
rekram1-node wants to merge 1 commit into
rekram1-node wants to merge 1 commit into
Conversation
Collaborator
Author
|
Superseded by #47156, which uses native AI-package routing, session HTTP hooks, and account-aware browser/PAT authentication with local HTTP fixture coverage. |
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.
Ports Snowflake Cortex browser OAuth from V1 to the V2 plugin system, scoped to the Snowflake provider.
What
browserOAuth method on thesnowflake-cortexintegration withaccount(required) androle(optional) form prompts.https://<account>.snowflakecomputing.comusing Snowflake's built-inLOCAL_APPLICATIONclient, with a per-attempt loopback callback server on127.0.0.1(ephemeral port, closed via the attempt scope)./oauth/token-request; refresh is driven by Integration's existing expiry handling and reads the account from credentialmetadata.session:role:<ROLE>/session:role-encoded:<...>).${SNOWFLAKE_ACCOUNT}endpoint template and reloads on credential switch. Under a PAT/key connection the template is untouched, soSNOWFLAKE_ACCOUNT+SNOWFLAKE_CORTEX_PAT/SNOWFLAKE_CORTEX_TOKENkeep working as before.sdkhook andcortexFetchquirks are unchanged; the OAuth access token already reachesevt.options.apiKeyvia the model resolver.V1 behavior deliberately not ported
OAUTH_DUMMY_KEYloader — Integration owns refresh in V2.open(url)auto-launch — clients open the attempt URL, as with other providers.SNOWFLAKE_ACCOUNT.User-Agenton model requests — only set on token endpoints now.Tests
packages/core/test/plugin/provider-snowflake-cortex.test.tsextended: method registration shape, liveoauth.connect(issuer, PKCE, scope, loopback redirect, forged-state rejection through the real listener), role scope encoding, blank-account rejection, endpoint expansion under OAuth vs. key credentials, and re-expansion on credential switch. Existing PAT andcortexFetchtests unchanged and passing.bun typecheckfrompackages/corepasses.