Saturday, February 27, 2021

[google-cloud-sql-discuss] How to verify Cloud SQL Proxy connections are encrypted?

I'm currently connecting Via GCE with Cloud SQL Proxy from my local machine.
From what I can understand, even if SSL is not used (server/client certs with SSLMode etc), the connection is encrypted as per the documentation (https://cloud.google.com/sql/docs/postgres/connect-admin-proxy#connect-tcp)

How can I confirm this ?
If I'm connecting locally to the GCE with Cloud SQL Proxy something like this :
psql "host=127.0.0.1 sslmode=disable dbname=DB_NAME user=USERNAME"

I have tried to verify in the Postgres backend :
SELECT datname,usename, ssl, client_addr FROM pg_stat_ssl JOIN pg_stat_activity ON pg_stat_ssl.pid = pg_stat_activity.pid;

But it says SSL is false so I assume that's not the correct way to confirm this.
How can I confirm the connections are encrypted by default as documented?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/61b1d3cf-f25c-40cb-8656-5979d349f7d1n%40googlegroups.com.

No comments:

Post a Comment