Search code examples
securitygoogle-cloud-platformgoogle-cloud-sqlcloud-sql-proxy

How to use Cloud SQL Proxy with a regular user account?


Google's Cloud SQL Proxy uses service accounts to login. That's nice, but does not give you visibility as to who is the actual user that accessing the DB, for security purposes.

How can I use "regular" users credentials with Cloud SQL proxy? Obviously a login step would be required...

Thanks!


Solution

  • According to the README, you have a couple of options depending on your situation:

    • You can get the EndUser's auth token yourself (see here) and supply it with the token command.
    • If you have gcloud installed, you can use the gcloud auth login command and the proxy will use the credentials automatically.

    Hope this helps.