79545241

Date: 2025-03-30 22:44:53
Score: 0.5
Natty:
Report link

Use the "Google Cloud SQL - PostgreSQL" driver, which has the cloud_sql_proxy equivalent jdbc socket factory configured already. Then set enableIamAuth = true in the connection driver properties.

Note that this takes care of authentication using IAM federation. I don't think this flag has anything to do with private IP access. Not sure if using the google driver allows this or not. Certainly you connect to the DB by name instead of by IP.

enter image description here

enter image description here

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: dan carter