You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the tap with use_browser_authentication=True, I noticed that the browser auth tokens are not being cached, even if one's Snowflake account has token caching enabled.
From my experience, this can be achieved by applying two simple changes:
Use , extras = ["secure-local-storage"] when declaring the snowflake-connector-python as a project dependency (pyproject.toml)
Pass client_store_temporary_credential in connection arguments (mostly important for linux users, as documented here):
# Enable temporary credential file for Linux users
# For Linux users, since there are no OS-key-store, an unsecure temporary credential for SSO can be enabled by this option. The default value for this option is False.
# client_store_temporary_credential = True
The text was updated successfully, but these errors were encountered:
…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)
When using the tap with
use_browser_authentication=True
, I noticed that the browser auth tokens are not being cached, even if one's Snowflake account has token caching enabled.From my experience, this can be achieved by applying two simple changes:
, extras = ["secure-local-storage"]
when declaring thesnowflake-connector-python
as a project dependency (pyproject.toml
)client_store_temporary_credential
in connection arguments (mostly important for linux users, as documented here):The text was updated successfully, but these errors were encountered: