k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.5k stars 228 forks source link

feat: IAM database authentication #246

Closed a7i closed 8 months ago

a7i commented 8 months ago

Support IAM database authentication: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html

kine only supports username/password or cert-based auth which makes it a bit challenging for organizations with compliance to use short-lived credentials. Supporting IAM database auth eases the rotation and management of credentials.

brandond commented 8 months ago

Can you suggest any golang mysql or postgres drivers that support this? It looks fairly non-trivial to enable, as credentials are currently part of the datastore dsn and we leave their extraction up to the driver.

a7i commented 8 months ago

Hey @brandond I see, I did not realize that kine just relies on the drivers (it makes sense). So I would need to make the change in this driver: https://github.com/go-sql-driver/mysql

brandond commented 8 months ago

and github.com/jackc/pgx for postgres

a7i commented 8 months ago

Thanks @brandond 🎉 , I'll go ahead and close this Issue then