Open
Description
Summary
we could use key pair authentication as an alternative approach to basic authentication(user/password)
Process:
- user generate their PEM private-public key pair with openssl or generate the keypair from cloud service such as KMS
- asign public key to a databend user
- end user send their private key to databend kernel and authenticated by their public key (authentication should be in memory)
To support uninterrupted key rotation, it would be nice to support multiple public keys for a single user. like RSA_PUBLIC_KEY
and RSA_PUBLIC_KEY_2
, it would be nice to set some quotas in kernel configuration and add necessary restrictions
example SQL:
alter user zhihanz set rsa_public_key=‘ABC123...’;
alter user zhihanz unset rsa_public_key;
alter user zhihanz set rsa_public_key_2='alternative keypair '
ref:
https://docs.snowflake.com/en/user-guide/key-pair-auth.html