Given a snowflake connection model instance, the correct way to switch between password and key-based auth is to set the field you don't want to use to None. But the None gets dropped on the API request and then the server returns a 400 saying you can't use both forms of auth at the same time. This is because fields that aren't present on the request keep their existing values.
We should exclude dbpassword and snowflake_private_key from the drop-if-None filtering.
Come to think of it, there's probably more fields that will also be suffering from this inability to be reset. Worth auditing the connection models.
Given a snowflake connection model instance, the correct way to switch between password and key-based auth is to set the field you don't want to use to
None. But theNonegets dropped on the API request and then the server returns a 400 saying you can't use both forms of auth at the same time. This is because fields that aren't present on the request keep their existing values.We should exclude
dbpasswordandsnowflake_private_keyfrom the drop-if-None filtering.Come to think of it, there's probably more fields that will also be suffering from this inability to be reset. Worth auditing the connection models.