fix: re-authenticate when the cached SSO ID token has expired - #2
Open
carladev wants to merge 1 commit into
Open
fix: re-authenticate when the cached SSO ID token has expired#2carladev wants to merge 1 commit into
carladev wants to merge 1 commit into
Conversation
With external browser authentication the driver caches an ID token (clientStoreTemporaryCredential) so the browser is opened only once. When that token expires the driver keeps sending it instead of starting a new authentication, so every process fails with: Snowflake connection error: The provided ID Token is invalid. and the only way out was removing the credential cache file by hand. The executor now detects that failure (GS error 390195 / "ID Token is invalid"), removes the cached ID token and retries the connection once, which starts a new browser authentication. A warning is logged in the Runnerty output: warn: execute-snowflake: The cached SSO ID token has expired. Removed it and re-authenticating through the browser... Re-authentication is shared between the processes of an execution: when a chain runs several Snowflake processes in parallel they all fail at the same time, and without coordination each one would open its own browser window and the extra ones would die with "Browser action timed out". Only the first process authenticates, the rest wait for it and reuse the newly cached token. Only the external browser flow is affected: any other connection error, and the OAuth token flow, keep the previous behaviour. The snowflake-sdk internals used to drop the cached credential are required lazily so a future change in the driver cannot prevent the executor from loading. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
carladev
force-pushed
the
feat/expired-id-token-reauth
branch
from
July 30, 2026 11:09
055e9bd to
e3fdbf3
Compare
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.
No description provided.