-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for browser authentication #204
Conversation
FYI, this is my first PR in this repo (or in any other repo from |
@dlouseiro thanks for contributing! Would you mind rebasing your branch to the latest |
Sure, will do! |
The purpose of this PR is to add a new authentication method, using SSO authentication using an external browser (documented [here](https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver-authenticate#using-single-sign-on-sso-through-a-web-browser)). While the most common setup for production-like executions on a remote machine is via user/password or RSA key-pair authentication, having browser based authentication is useful for local/dev executions using a Snowflake personal user (not a service account). ### Implementation: - Add new parameter to `meltano.yml` - Add new parameter to config dict in `target_snowflake/target.py` - Add new parameter to `README.md` - Add logic to handle browser based authentication in `target_snowflake/connector.py:get_sqlalchemy_url`
The purpose of this PR is to use the `secure-local-storage` extra in `snowflake-connector-python` for the SSO token caching to work. ### Implementation: - Add `secure-local-storage` extra to `pyproject.toml` - Update `poetry.lock`
DOne @edgarrmondragon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The purpose of this PR is to add support for SSO authentication via external browser (documented here).
As I detailed in this issue, while the most common authentication methods used for production users (Snowflake service account) are basic authentication (user/password) and RSA key-pair authentication, local executions can be done with personal users which, in some companies' Snowflake setup don't have a password, but can only authenticate via SSO (using an external browser).
Implementation details:
use_browser_authentication
, which defaults tofalse
(added toREADME.md
,meltano.yml
andtarget_snowflake/target.py
)secure-local-storage
extra to thesnowflake-connector-python
(needed for SSO tokens to be cacheable - documented here)poetry.lock
settings_group_validation
for the three possible flows: user/password, user/private_key_path and user/use_browser_authenticationCloses #203