1
votes

Using flyway to manage our snowflake objects, but would like NOT to use user/password based authentication and instead use user+ Auth-key based authentication mechanism supported by Snowflake.

flyway.url=jdbc:snowflake://<myaccount>.snowflakecomputing.com/?private_key_file=<abs_path_to>/.ssh/rsa_key_fdb_user.pem&db=mydb&warehouse=etl_dev_wh&role=etl_dev_role&user=etl_dev_user

However, with the flyway.url set to above pointing to my location of private_key_file, it simply prompts me for a "Database password:" from the command line -

./flywaydb/flyway -configFiles=<absolute_basepath>/conf/flyway-dw.conf info

I was hoping that the user's Auth would get done based on the private key provided.

1
This reveals a limitation in Flyway's Snowflake support. Could you make an issue about it so we can improve the user experience? github.com/flyway/flyway/issues. Thanks :)Mikiel
Great, thanks. We have a fix that will be shipped in v6.2.4.Julia Hayward

1 Answers

1
votes

Please edit your config file and enter a dummy password as flyway.password:

flyway.password=wrongpassword

It should stop asking password and connect to Snowflake with the private key, in case you configured your user with rsa_public_key:

https://docs.snowflake.net/manuals/user-guide/jdbc-configure.html#privatekey-property-in-connection-properties