-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure tokens are cached when using browser authentication or ba…
…sic authentication with MFA (#50) The purpose of this PR is to fix the issue reported [here](#49), essentially making sure that oauth tokens are cached when using browser authentication to avoid having multiple browser windows popping in consecutive runs, even when the Snowflake account being accessed has [ALLOW_ID_TOKEN](https://docs.snowflake.com/en/sql-reference/parameters#allow-id-token) option enabled. While there, also ensured proper caching of MFA tokens (when the user account has [ALLOW_CLIENT_MFA_CACHING](https://docs.snowflake.com/en/sql-reference/parameters#allow-client-mfa-caching) enabled). ### Implementation details: - Add `secure-local-storage` extra to `snowflake-connector-python` dependency - Add `"client_request_mfa_token": True` and `"client_store_temporary_credential": True` to the connection arguments of the SQLAlchemy engine. This is mostly relevant for Linux users, as for MacOs (at least) the `secure-local-storage` extra is enough. - Fix some linting issues (done by `pre-commit` steps)
- Loading branch information
Showing
7 changed files
with
558 additions
and
340 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,4 @@ plugins: | |
variant: andyh1203 | ||
pip_url: target-jsonl | ||
environments: | ||
- name: dev | ||
- name: dev |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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