Area: Ingestion Issues
Sub-Area: Tableau Connector SSL / TLS Configuration
Applies to: OSS + Cloud
Issue
Your Tableau server uses a certificate signed by an internal or self-signed Certificate Authority (CA). Tableau ingestion fails at sign-in with an SSL error. This happens even after you set ssl_verify to the path of your CA bundle, or set REQUESTS_CA_BUNDLE in the environment that runs ingestion.
The ingestion report shows a failure titled Tableau Login Error with the message Failed to authenticate with Tableau. The underlying error starts with:
Unable to login (check your Tableau connection and credentials):
The rest of the line is the SSL error from Python. When an older connector version gets a file path in ssl_verify, that SSL error contains PEM lib.
You Might Be Asking
- Why does
ssl_verify: /path/to/ca-bundle.pemin my Tableau recipe cause an SSLPEM liberror? - Why does the Tableau connector ignore
REQUESTS_CA_BUNDLEin my executor environment? - I added my CA certificate to the container image. Why does Tableau ingestion still fail certificate verification?
- What is the difference between
ssl_verifyandsession_trust_envin the Tableau source config?
Cause
Two separate behaviors cause this.
First, older connector versions send an ssl_verify path to the wrong place. In acryl-datahub 1.6.0.5 and earlier, when ssl_verify is a file path, the connector passes that path to requests as cert, which is the client certificate for mutual TLS. It does not pass it as verify, which is the CA bundle. Python then tries to load your CA bundle as a client certificate and fails with a PEM lib error. Starting in acryl-datahub 1.7.0, the connector passes ssl_verify straight to verify, so a path works as a CA bundle.
Second, the connector ignores environment variables by default. The session_trust_env option defaults to false, and the connector copies it into the trust_env setting of its requests session. With trust_env off, requests does not read REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, or proxy variables. It verifies the Tableau certificate against the certifi CA bundle that ships with Python requests. That bundle does not contain your internal CA, and adding the CA to the container's OS trust store does not change it.
Solution
The CA bundle file must exist in the environment that runs ingestion: the machine where you run the datahub CLI, or the executor container (for example, the DataHub Remote Executor). Pick the option that matches the acryl-datahub version that runs your recipe.
Option A: acryl-datahub 1.7.0 or later
Point ssl_verify at your CA bundle:
source:
type: tableau
config:
connect_uri: 'https://<your-tableau-host>/'
ssl_verify: /path/to/your/ca-bundle.pem
token_name: '${tableau_token_name}'
token_value: '${tableau_token_value}'
For UI ingestion, the CLI Version field in the source's Advanced settings sets which acryl-datahub version runs the recipe. Set it to 1.7.0 or later. See UI Ingestion for that setting.
Option B: any version, using session_trust_env
Use this if you run a version older than 1.7.0 and can't upgrade.
-
Set
REQUESTS_CA_BUNDLEin the environment that runs ingestion to the path of your CA bundle file. -
In the recipe, remove any
ssl_verifypath. Leavessl_verifyunset (it defaults totrue) and addsession_trust_env: true:
source:
type: tableau
config:
connect_uri: 'https://<your-tableau-host>/'
session_trust_env: true
token_name: '${tableau_token_name}'
token_value: '${tableau_token_value}'
- Run ingestion. The connector's
requestssession now readsREQUESTS_CA_BUNDLEand verifies the Tableau certificate against your CA bundle.
You need both settings. REQUESTS_CA_BUNDLE alone is ignored while session_trust_env is false. session_trust_env: true alone still verifies against certifi. On versions older than 1.7.0, keeping an ssl_verify path in the recipe still triggers the PEM lib error, so remove it.
session_trust_env: true also makes the session read proxy variables such as HTTP_PROXY, HTTPS_PROXY, and NO_PROXY. If those are set in your ingestion environment, Tableau traffic goes through the proxy unless NO_PROXY lists your Tableau host.
Option C: temporary test only, disable verification
ssl_verify: false turns off certificate verification. The connector then accepts any certificate the server presents, which exposes the connection to man in the middle attacks. Use it only to confirm that the CA is the problem, then switch to Option A or B.
source:
type: tableau
config:
connect_uri: 'https://<your-tableau-host>/'
ssl_verify: false
token_name: '${tableau_token_name}'
token_value: '${tableau_token_value}'
See the Tableau source documentation for ssl_verify, session_trust_env, and the other config options.