diff --git a/metadata-ingestion/src/datahub/ingestion/source/tableau.py b/metadata-ingestion/src/datahub/ingestion/source/tableau.py index 4b18787478..faeda58f43 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/tableau.py +++ b/metadata-ingestion/src/datahub/ingestion/source/tableau.py @@ -144,6 +144,11 @@ class TableauConnectionConfig(ConfigModel): description="Tableau Site. Always required for Tableau Online. Use emptystring to connect with Default site on Tableau Server.", ) + ssl_verify: Union[bool, str] = Field( + default=True, + description="Whether to verify SSL certificates. If using self-signed certificates, set to false or provide the path to the .pem certificate bundle.", + ) + @validator("connect_uri") def remove_trailing_slash(cls, v): return config_clean.remove_trailing_slashes(v) @@ -168,6 +173,11 @@ class TableauConnectionConfig(ConfigModel): try: server = Server(self.connect_uri, use_server_version=True) + + # From https://stackoverflow.com/a/50159273/5004662. + server._session.verify = self.ssl_verify + server._session.trust_env = False + server.auth.sign_in(authentication) return server except ServerResponseError as e: