title: Tableau Desktop connection to PostgreSQL DB using Certificate Authentication over SSL/TLS
body: <p>I connect to my PostgreSQL databases (which run on AWS EC2 instances) using certificate authentication (and not passwords). An example of a psql command I would use to connect to one of my databases is:</p>
  
  <pre><code>psql "host=&lt;AWS EC2 instance&gt; user=&lt;db user&gt; sslcert=&lt;path to .crt&gt; sslkey=&lt;path to .key&gt; sslrootcert=&lt;path to .crt&gt; sslmode=require dbname=&lt;db name&gt;"
  </code></pre>
  
  <p>I would like to be able to connect Tableau Desktop to one of my databases. The standard PostgreSQL connector does not allow me to specify which SSL certs to use (but it does have a Require SSL checkbox - which I think is for encryption not authentication).</p>
  
  <p>So I have tried to use the ODBC connector. I make the following entries:</p>
  
  <pre><code>Connect Using
  Driver: PostgreSQL Unicode
  
  Connection Attributes
  Server: &lt;AWS EC2 instance&gt;
  Port: 5432
  Database: &lt;db name&gt;
  Username: &lt;db user&gt;
  String Extras: sslcert=&lt;path to .crt&gt;; sslkey=&lt;path to .key&gt;; sslrootcert=&lt;path to .crt&gt;; sslmode=require
  </code></pre>
  
  <p>By much trial and error I think the String Extras require a semicolon as a delimiter, but I still cannot connect. I get the error message:</p>
  
  <pre><code>An error occurred while communicating with Other Databases (ODBC).
  
  Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.
  FATAL:  connection requires a valid client certificate
  
  Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection.
  Unable to connect to the server "&lt;AWS EC2 instance&gt;" using the driver "PostgreSQL Unicode". Check that the server is running and that you have access privileges to the requested database.
  </code></pre>
  
  <p>I would be really grateful to hear from anyone who has connected Tableau Desktop to PostgreSQL using certificate authentication and could tell me what I’m doing wrong. Cheers!</p>