-
Notifications
You must be signed in to change notification settings - Fork 470
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
SNOW-180917: SSO token cache feature not working after version 2.2.2 #349
Comments
Hi @damienrj, hope you are doing well! Sorry for the late response first. To help solve the issue, I might need more info. Are you still seeing this issue with the latest version? Below is the code snippet I used to reproduce the issue. From your view, is that correct for reproducing?
If the code is right, I can see more than one webpage pop up, in particular, 3 pop ups for this code. If that's exactly what you met, I would say it is expected behavior. Because at the beginning, we don't have any cached credential locally. Then we fork more than one process to parallelly connect to Snowflake by Hope this helps and please let me know if this is not your case! |
I will try with the latest version tomorrow. We were having the issue of each connection creating a popup where in the past we would only get one popup for multiple connections. I will also try your code snippet. Thanks |
Hi @damienrj, could you please also share more about the version if you still meet the problem with the latest version? Like, by after 2.2.2, do you mean you can still use SSO feature with versions <= 2.2.2 now but not versions > 2.2.2? Or none of them works for you now? And here is the latest doc for Snowflake SSO. https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use.html#label-sso-with-command-line-clients. Maybe it's helpful. Looking forward to your update later :) |
Sorry, I was out of office for a bit. But yeah, we can use the SSO feature with versions <= 2.2.2 but after that the same code that was sharing the cache not opens 10 plus windows where before there was only one. I did go and try the newest version and added |
Hi @damienrj, yeah, after v2.2.2, we move the cache into local key store for higher security. Hope that still works for you. Feel free to comment the new problems you meet if any! |
import snowflake.connector
import os
connection = snowflake.connector.connect(account='account', user=os.environ["USER"] + "@domain", authenticator="externalbrowser")
connection = snowflake.connector.connect(account='account', user=os.environ["USER"] + "@domain", authenticator="externalbrowser")
connection = snowflake.connector.connect(account='account', user=os.environ["USER"] + "@domain", authenticator="externalbrowser") With |
Hi @damienrj, hi @sfc-gh-wshangguan, I experience exactly the same behaviour with latest 2.6.2 version and cc @pecigonzalo |
Hi @damienrj @feluelle , I tried the same code above and failed to reproduce it. Can you please check the following two points? |
Thank you for your quick response. |
I have also tested |
I don't know what has happened, but for some reason it starts working. 🚀 I don't know what has changed. :( |
Can we close this issue? |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python --version
)?Python 3.7.7
What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)?Darwin-19.6.0-x86_64-i386-64bit
What are the component versions in the environment (
pip list
)?I have
keyring 21.3.01
What did you do?
I am using pool to execute multiple queries:
results = pool.starmap(utils.make_table, tables.values())
were make_tables is basically just doingWhat did you expect to see?
Only one SAML window prompting me for my SSO.
What did you see instead?
Getting a new window for each connection.
I am not sure what changed with the caching but it doesn't seem to work any longer.
The text was updated successfully, but these errors were encountered: