Skip to content

SQLMesh arbitrarily restricts GCP Postgres automatic IAM authentication #5105

@Ant59

Description

@Ant59

The GCP CloudSQL Connector library used by this project (https://pypi.org/project/cloud-sql-python-connector/) provides Automatic IAM Database Authentication to use the ADC (Application Default Credentials) to authenticate. This allows clients to authenticate using local credentials whether they are a human running on a local machine or a service account running e.g. in a GKE cluster.

However, SQLMesh arbitrarily restricts this functionality. When setting up the GCP Postgres gateway, I set enable_iam_auth as true (per https://sqlmesh.readthedocs.io/en/stable/integrations/engines/gcp-postgres/#connection-options), but SQLMesh demands that the user field is also filled out, eliminating the underlying connector library's functionality for ADC-based authentication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions