mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-29 11:35:56 +00:00
feat(ingest): support self-signed certs in Tableau (#6172)
This commit is contained in:
parent
8030ac83bc
commit
82d480dfad
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user