Snowflake: how to allow only Key Pair Authentication connections?
I figured out the solution:

Create public/private key pair
Assign public key to a Snowflake user, e.g.
alter user testuser set rsa_public_key='ADNDDBgkqh...';
Set the user's password to null: alter user testuser set password = null;
For connection don't forget to specify properties: private_key_file and private_key_file_pwd