Skip to content

Commit

Permalink
feat(ingest): support self-signed certs in Tableau (#6172)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Oct 13, 2022
1 parent 8030ac8 commit 82d480d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions metadata-ingestion/src/datahub/ingestion/source/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -168,6 +173,11 @@ def make_tableau_client(self) -> Server:

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:
Expand Down

0 comments on commit 82d480d

Please sign in to comment.