Snowflake-Labs / schemachange

A Database Change Management tool for Snowflake
Apache License 2.0
481 stars 219 forks source link

Disable password authentication when SNOWFLAKE_AUTHENTICATOR has a value. #189

Closed MatthewFlood-BO closed 10 months ago

MatthewFlood-BO commented 10 months ago

When using authenticator=externalbrowser, the snowflake.connector.connect() method requires a value for the password parameter. However, if we provide an value for the password in the env variable SNOWFLAKE_PASSWORD, then cli.py forces password authentication. This means it is currently impossible to use externalbrowser authentication.

I would argue that if we set a value for SNOWFLAKE_AUTHENTICATOR, then password authentication is explicitly unwanted.

sfc-gh-tmathew commented 10 months ago

@MatthewFlood-BO This change breaks if password authentication. Check the #188 fix and see if that works for you.

cc: @jeremiahhansen

sfc-gh-tmathew commented 10 months ago

Thank you for your contribution @MatthewFlood-BO. We have merged the fix into v3.5.4.