Eno Compton
Eno Compton
Going to close this as stale. Feel free to re-open when we're ready to make progress on this work.
Related: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/824.
Fixed in the samples. See https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/cloud-sql/postgres/servlet/src/main/java/com/example/cloudsql/ConnectorConnectionPoolFactory.java#L20.
Related: https://github.com/psycopg/psycopg2/issues/1421.
Correct -- the Proxy will handle that for you. If you'd like to open an issue in the [Proxy repo](https://github.com/GoogleCloudPlatform/cloud-sql-proxy), I'd be happy to help you out. The approach describe...
> I don't know about doing it without writing a Django backend, but it turned out to be super easy to write one that supports the connector. Writing three separate...
You'd have to write a custom backend using pg8000 (or asyncpg) like above. I haven't tried this myself, but in theory it's possible.
Thanks, @rcleveng -- that's a nice approach. In effect it's a variation of https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/issues/214#issuecomment-1204323142. It gets you IAM authentication without the Connector. Meanwhile, we're working on improving Django support in...
Adding the code sample from the link above for posterity: ``` python import copy from django.db.backends.postgresql import base try: import google.auth import google.auth.exceptions from google.auth.transport import requests from google.auth.credentials import...
Closing -- we'll get this fixed as part of porting testing infrastructure to Terraform.