Loading

How to Connect to Google Cloud SQL Postgres with SSL Enabled in Tableau Server

Date de publication: Feb 4, 2025
Tâche

How to configure SSL connection to Google Cloud SQL (PostgreSQL) from Tableau Server.

Étapes
  1. Convert the Google Cloud SQL key using open-ssl in Tableau Server
    "openssl pkcs8 -topk8 -nocrypt -inform PEM -in client-key.pem -outform DER -out client-key.pk8 -v1 PBE-MD5-DES"
     
  2. Create a postgres.properties file with the following contents:

    sslmode=verify-ca
    sslcert=<path>/client-cert.pem
    sslrootcert=<path>/server-ca.pem
    sslkey=<path>/client-key.pk8

    e.g. if the certificates are placed in "/var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/":

    sslmode=verify-ca
    sslcert=/var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/client-cert.pem
    sslrootcert=/var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/server-ca.pem
    sslkey=/var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/client-key.pk8
     
  3. Save the postgres.properties file to the following location:

    Windows:
    Server: C:\Program Files\Tableau\Tableau Server\data\tabsvc\vizqlserver\Datasources
    C:\Program Files\Tableau\Tableau Server\packages\bin.<build number>

    Virtual Connections: C:\Program Files\Tableau\Tableau Server\data\tabsvc\minerva\Datasources
    *Prep Flows: C:\Program Files\Tableau\Tableau Server\data\tabsvc\flowprocessor\Datasources
    *Prep Web Authoring: C:\Program Files\Tableau\Tableau Server\data\tabsvc\flowminerva\Datasources
     

    Linux:
    Server: /var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/
    Virtual Connections: /var/opt/tableau/tableau_server/data/tabsvc/minerva/Datasources/
    *Prep Flows: /var/opt/tableau/tableau_server/data/tabsvc/flowprocessor/Datasources/
    *Prep Web Authoring: /var/opt/tableau/tableau_server/data/tabsvc/flowminerva/Datasources/

    More info about .properties file here: Use a properties file to customize a JDBC connection

  4. Connect to Google Cloud SQL (PostgreSQL) using the Postgres SQL connector in the Tableau data source menu, enter username/password and check the SSL checkbox.

*If a Flow also needs to connect to Google Cloud SQL, Tableau Server should be restarted after saving the .properties file.

 

Ressources supplémentaires

Unable to connect to Google Cloud SQL Postgres with SSL enabled
Use a PROPERTIES file to customize a JDBC connection

 

Note:

To enforce SSL connections for Google Cloud SQL Postgres data sources in Tableau Server, the SSL mode needs to be set to verify-ca or verify-full.
Above SSL Mode Descriptions will always require a valid SSL certificate to connect.

Alternatively, if your Tableau server environment has multiple Postgres data sources and some of them are on non-SSL connections, then use options like sslmode=allow or sslmode=prefer as it allows both SSL and non-SSL-based connections.

Refer to the below Postgres documentation for detailed information about the  SSL Mode Descriptions
https://www.postgresql.org/docs/current/libpq-ssl.html

Numéro d’article de la base de connaissances

001458643

 
Chargement
Salesforce Help | Article