-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Indefinite Snowflake auth loop when using browser authentication #2689
Comments
Hey @eugene-nikolaev, thanks for opening this issue. Which MFA mechanism are you using for your Snowflake account? dbt connects to Snowflake via its python connector, which uses Duo Push by default. That's how I've done dbt CLI + Snowflake + MFA in the past. It's helpful to know that reverting to v0.17.1 fixes the issue. We made two relevant changes in v0.17.2:
I'm guessing that the latter is at issue, and the former may help us troubleshoot what's going on. |
@jtcohen6 thanks for reply. |
It's definitely going to be the latter. Fixing this is going to be a bit involved, unfortunately. Instead of closing everything we'll have to go back to the old way of not calling |
@eugene-nikolaev Got it, I think your best bet for now is to use v0.17.1 @beckjake Let's pull this into v0.18.0, if possible |
I think instead of reverting that change (which is still on the table, though I would rather avoid it) we may be able to fix this by implementing #2613. It appears to me that on Linux, the token cache is global to the executing user (in Is that a reasonable approach? |
@beckjake We still have the same issue after upgrading to 0.18. The latest working version is 0.17.1 |
@tonyqiu2020 are you on windows/mac? Does |
@beckjake we have this issue as well (appeared when upgrading from 0.17.2 to 0.18.0). We're running okta, snowflake and a variety of pc and mac configs. We first changed |
|
I followed the steps above but I still have this issue. I'm using dbt 0.18.0 on Mac. When I execute |
Hey @Plamen8780, I'm thinking that may be a different issue? The issue here is an infinite loop of How many threads are you running dbt with against Snowflake? Last time I did this, I recall needing to authenticate in Duo Mobile once for each thread at the start of a run. |
@jtcohen6 , you are right it is slightly different - I'm using password authentication and I have MFA turned on but it still results in an infinite Duo authentication loop. I forgot to mention that I don't have this issue when running In the meantime I've turned off MFA and everything works fine. But it will be nice to have the option to use dbt with MFA turned on. |
@Plamen8780 Got it. Could you try watching the dbt logs (e.g. |
@jtcohen6 , this is how the log looks like before I installed keyring:
And this is after keyring:
So it seems like it tries to acquire connection for each model. But not sure why keyring doesn't work here. |
@Plamen8780 When are you seeing the Duo pushes? Is it before/after every single one of those |
The issues is not fixed @jtcohen6. We are still facing it and probably will use a different auth method then. :/ cc @pecigonzalo |
@feluelle Are you using the latest versions of |
Yes, I am using the latest version of all three. But it might be still related to the connector and has nothing to do with dbt. See snowflakedb/snowflake-connector-python#349 WDYT Jeremy? :) |
I am experiencing this issue in dbt 1.1.0 with Snowflake and OKTA on a macbook. So it seems OKTA is returning the token but dbt core is not accepting it. I have keyring installed. |
I have the same as @JudyCamps, very similar environment. |
I experience the same problem as well on Rosetta terminal. Installed
|
Hi there! |
We have an open issue specifically for this in the Snowflake repo here with some solutions on how people unblocked themselves |
Describe the bug
We encounter indefinite auth loop while running dbt with browser auth enabled
Steps To Reproduce
Install dbt 0.17.2 and run anything on Snowflake
Expected behavior
Expected two auth requests in case of MFA and dbt proceeding to transform.
(non-MFA logins fail into the loop too)
Screenshots and log output
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
MacOS 10.15.5 (19F101)
The output of
python --version
:Python 3.7.7
Additional context
reverting dbt to 0.17.1 fixed the issue
The text was updated successfully, but these errors were encountered: