Skip to content
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

SSO opens multiple authentication browser pages and requires forced process kill #29

Closed
NiallRees opened this issue Oct 15, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@NiallRees
Copy link
Contributor

NiallRees commented Oct 15, 2021

Describe the bug

When using an SSO connection, dbt opens multiple >10+ browser windows to authenticate. Once authenticated, dbt doesn't seem to recognise that so I have to CTRL + C to kill the process and dbt run again, which then succeeds.

Steps To Reproduce

Configure an SSO Snowflake profile, mine looks like:

project:
  outputs:
    dev:
      type: snowflake
      account: <account_name>
      authenticator: externalbrowser
      user: <email_address>
      warehouse: <warehouse>
      database: <database>
      schema: <name>
      threads: 8
  target: dev

Run dbt run

Expected behavior

  1. A single browser page opens where I authenticate with SSO
  2. Once authenticated, the browser window closes
  3. The dbt command continues as normal

Screenshots and log output

image

dbt run
Running with dbt=1.0.0-b1
[WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 2 unused configuration paths:
- seeds
- snapshots

Found 23 models, 43 tests, 0 snapshots, 0 analyses, 176 macros, 0 operations, 0 seed files, 12 sources, 0 exposures

Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...
Initiating login request with your identity provider. A browser window should have opened for you to complete the login. If you can't see it, check existing browser windows, or your OS settings. Press CTRL+C to abort and try again...

System information

The output of dbt --version:

dbt --version
installed version: 1.0.0-b1
   latest version: 0.21.0

Your version of dbt is ahead of the latest release!

Plugins:
  - snowflake: 1.0.0b1
  - postgres: 1.0.0b1

The operating system you're using:
Mac OS 11.4
The output of python --version:

Python 3.8.9
@NiallRees NiallRees added bug Something isn't working triage labels Oct 15, 2021
@NiallRees NiallRees changed the title SSO opens multiple authentication browser pages SSO opens multiple authentication browser pages and requires forced process kill Oct 15, 2021
@NiallRees
Copy link
Contributor Author

This issue has gone away. Who knows.

@jtcohen6
Copy link
Contributor

@NiallRees Glad to hear it went away, less glad that it remains a mystery.

I remember seeing this issue before when either:

  • keyring is not installed. We've required it since v0.18.1 (Fix: require keyring on snowflake dbt-core#2789), via the snowflake-connector-python[secure-local-storage] extra
  • Even if keyring is installed, for some reason it doesn't prompt you with the authorization window that says something to the effect of "Enable python3 to use the password from keychain"

The latter case is especially thorny. I remember trying to debug this with @christineberger and @grantwinship-consulting several months ago, and we came up short:

Screenshot 2021-10-22 at 15 24 55

(Does either of you two remember what we did to get this working again? Did it just ... start working again?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants