You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/11/16 20:42:44 UTC

[GitHub] [superset] andypetrella opened a new issue, #22143: Can't add Snowflake database with MFA (but `Test connection` works)

andypetrella opened a new issue, #22143:
URL: https://github.com/apache/superset/issues/22143

   My passcode is reported as invalid when adding a snowflake database, although 5 queries go through to `test` the connection.
   
   #### How to reproduce the bug
   
   1. Add Snowflake database
   2. Fill in Snowflake URI with a user requiring MFA
     1. use Duo to get the passcode
     2. add passcode to the URI
   3.  Click on Test connection (optional)
   4.  Click on connect
   5. See error in Superset logs
   
   Important notes: 
   - `alter account set allow_client_mfa_caching = true;` => so cache should be OK
   - I also tried using my keypair. No luck.
   
   ### Expected results
   
   The database to be connected
   
   ### Actual results
   
   When I click on `test connection` superset tells me it is all good.  And I see 5 testing queries in Snowflake audit logs.
   
   However, when `Connect` I get
   `sqlalchemy.exc.DatabaseError: (snowflake.connector.errors.DatabaseError) 250001 (08001): None: Failed to connect to DB: aj57655.eu-west-3.aws.snowflakecomputing.com:443. Incorrect passcode was specified.`
   
   Which is raised when, in `CreatedDatabaseCommand#run` the line `schemas =database.get_all_schema_names(cache=False)` is executed. 
   
   Basically, that means that the passcode is not correct, however, it was fine for the 5 test queries, so two cases cross my mind:
   - the token or passcode got invalidated? (cached?)
   - the passcode is not used (correctly?) when creating the connection
   
   Note: I tried commenting out the lines mentioned above... the database got added. But it was not usable, as the same error comes back when I tried to load the schema to add datasets.
   
   ### Environment
   
   - machine:  Mac OS - M1
   - browser type and version: Chrome
   - superset version: `2.0.0` 
   - manual local installation based on pip packages
   - python version: `38.5`
   - node.js version: `v18.7.0`
   - run command: `superset run -p 8088 --with-threads --reload`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Can't add Snowflake database with MFA (but `Test connection` works) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #22143: Can't add Snowflake database with MFA (but `Test connection` works)
URL: https://github.com/apache/superset/issues/22143


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Can't add Snowflake database with MFA (but `Test connection` works) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22143:
URL: https://github.com/apache/superset/issues/22143#issuecomment-1942148433

   This version of Superset is no longer supported. If anyone is still encountering this in current versions (3.x) please update this issue's context and re-open it, open a new Issue, or raise a PR to address the problem. I'll close this for now.
   
   That said, the issue may indeed still exist, so I'll politely ping @villebro in case he has a place to test/validate this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org