diff --git a/docs/decisions/2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt.md b/docs/decisions/2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt.md new file mode 100644 index 000000000000..44470dafd050 --- /dev/null +++ b/docs/decisions/2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt.md @@ -0,0 +1,62 @@ +# Tableau connected apps sign in with a direct trust HS256 JWT that carries a fixed scope set and lives five minutes + +- **Status:** Accepted +- **Revisions:** v1 2026-11-04 (initial) ยท v2 2026-11-16 (the scope set adds the five write scopes of Collate's reverse metadata) +- **Deciders:** Akash Verma +- **Guard:** `ingestion/tests/unit/source/dashboard/tableau/test_connection.py`, `ingestion/tests/unit/topology/pipeline/test_tableaupipeline_connection.py`, the `connected_app` runs of `ingestion/tests/integration/tableau/` and `ingestion/tests/integration/tableaupipeline/` +- **Related:** [#33371](https://github.com/open-metadata/OpenMetadata/issues/33371) + +## Context +The Tableau dashboard and pipeline connectors signed in only with a username and password or a +personal access token, both tied to one person. A Tableau connected app lets an administrator issue +credentials that sign in as a chosen user without that user's password. On Tableau Cloud 2026.3.2 +(REST API 3.30) we measured the following: + +- A direct trust connected app accepts only HS256 tokens signed with the app's secret value. + RS256 is rejected at sign-in with `401001`. RSA keys belong to OAuth 2.0 trust (EAS). +- Every call the two connectors make, including both Metadata API queries, returned the same result + as a PAT sign-in when the token carried `tableau:content:read`, `tableau:users:read`, + `tableau:server:read`, `tableau:flows:read`, `tableau:flow_runs:read`, `tableau:jobs:read` and + `tableau:tasks:read`. With only `tableau:content:read`, the owner, flow, flow run, job and task + calls fail with `401002 "Invalid authentication credentials were provided."`, the same answer as + bad credentials. +- Collate's reverse metadata reuses this connection to write workbook descriptions and owners + (Update Workbook, `tableau:workbooks:update`), workbook tags (`tableau:workbook_tags:update`, + `tableau:workbook_tags:delete`) and view tags (`tableau:view_tags:update`, + `tableau:view_tags:delete`). On 2026-11-16 (Tableau Cloud, REST API 3.30), each write failed with + `401002` when the token carried only the seven read scopes, and succeeded with the five added. A + token with no `scp` claim was accepted for reads and writes alike, but Tableau documents a missing + `scp` as error `10099 SCOPES_MISSING_IN_JWT`, so the claim stays. +- The session a sign-in gets outlives the token. The pipeline client's transport retries a sign-in + that Tableau answers with 429 or 5xx, re-sending the same token, which Tableau accepts only until + it expires. When Tableau ends the session, the pipeline client signs in again + (ADR:2026-10-30-tableau-pipeline-sign-in-again) with a freshly signed token. + +## Decision +- A new `authType`, `TableauConnectedAppAuth` (`clientId`, `secretId`, `secretValue`, `username`), + is shared by `tableauConnection.json` and `tableauPipelineConnection.json`. +- `build_server_config` signs an HS256 JWT with the secret value: header `kid` = secret ID and + `iss` = client ID; claims `iss` = client ID, `sub` = username, `aud` = `tableau`, a new `jti` per + sign-in, `scp` = the twelve scopes above, and `exp` five minutes after signing. It passes the token + as `TSC.JWTAuth(jwt=..., site_id=...)`. `site_id` is a keyword because the second positional + parameter is `isUat`. +- The scope set and the five-minute lifetime are module constants + (`CONNECTED_APP_SCOPES`, `CONNECTED_APP_JWT_LIFETIME`), not configuration. +- A connected-app connection gets its own test-connection error pack: a 401 names the app's checks and the + scopes, and unresolved owners name `tableau:users:read`. Basic and PAT connections keep their hints. +- The supported floor is Tableau Cloud and Tableau Server 2025.3, per Tableau's REST API reference: + the connected app scopes for Query Views for Workbook (`tableau:content:read`), Query Flows for a + Site (`tableau:flows:read`) and Get Flow Runs (`tableau:flow_runs:read`) were added in API 3.27 + (Tableau Cloud December 2025 / Server 2025.3). On an older Server the dashboard connector cannot + read charts and the pipeline connector cannot read flows. Server was not tested live. + +## Consequences +An administrator can give OpenMetadata a credential that is not a person's password or PAT, but the +calls still run as `username`, with that user's permissions. On Tableau Cloud that is the user's +email address; on Tableau Server, the user name. Every connected-app token carries the write scopes, +read-only ingestion included; the user's site role and permissions still bound what it can change, +as they do for a PAT. The host clock must be correct, because Tableau rejects a token outside its +validity window, and Tableau Cloud caps that window at ten minutes. OAuth 2.0 trust, unified access +tokens, impersonation, per-site scopes and token refresh are not supported. Revisit the fixed scope +set if a connector starts calling an endpoint outside it, or if a site must issue tokens with fewer +scopes. diff --git a/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py b/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py index eb1366aa9173..9eab58e337fc 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py @@ -20,13 +20,12 @@ from cachetools import LRUCache from tableauserverclient import ( Pager, - PersonalAccessTokenAuth, ProjectItem, RequestOptions, Server, - TableauAuth, ViewItem, ) +from tableauserverclient.models import Credentials from metadata.generated.schema.type.filterPattern import FilterPattern from metadata.ingestion.source.dashboard.tableau.models import ( @@ -110,7 +109,7 @@ class TableauClient: def __init__( self, - tableau_server_auth: PersonalAccessTokenAuth | TableauAuth, + tableau_server_auth: Credentials, config, verify_ssl: bool | str, pagination_limit: int, diff --git a/ingestion/src/metadata/ingestion/source/dashboard/tableau/connection.py b/ingestion/src/metadata/ingestion/source/dashboard/tableau/connection.py index 9e935052e6b6..f989ce4da14f 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/tableau/connection.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/tableau/connection.py @@ -15,8 +15,11 @@ from __future__ import annotations import traceback +import uuid +from datetime import datetime, timedelta, timezone from typing import TYPE_CHECKING +import jwt import tableauserverclient as TSC # noqa: N812 from requests.exceptions import SSLError from tableauserverclient.server.endpoint.exceptions import ( @@ -45,6 +48,9 @@ AccessTokenAuth, ) from metadata.generated.schema.security.credentials.basicAuth import BasicAuth +from metadata.generated.schema.security.credentials.tableauConnectedAppAuth import ( + TableauConnectedAppAuth, +) from metadata.ingestion.connections.connection import BaseConnection from metadata.ingestion.connections.test_connections import SourceConnectionException from metadata.ingestion.source.dashboard.tableau.client import ( @@ -60,6 +66,8 @@ from metadata.utils.ssl_manager import SSLManager if TYPE_CHECKING: + from tableauserverclient.models import Credentials + from metadata.core.connections.lifetime import Borrowed from metadata.core.connections.test_connection import ChecksProvider from metadata.generated.schema.entity.services.connections.pipeline.tableauPipelineConnection import ( @@ -73,6 +81,46 @@ "#enable-the-tableau-metadata-api-for-tableau-server" ) +# The calls the dashboard and pipeline connectors make, and the workbook description, owner and tag +# and view tag writes of Collate's reverse metadata, need exactly these, measured on Tableau Cloud +# (ADR:2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt). +# ponytail: fixed scope set; a site that must grant fewer needs a config field. +CONNECTED_APP_SCOPES = [ + "tableau:content:read", + "tableau:users:read", + "tableau:server:read", + "tableau:flows:read", + "tableau:flow_runs:read", + "tableau:jobs:read", + "tableau:tasks:read", + "tableau:workbooks:update", + "tableau:workbook_tags:update", + "tableau:workbook_tags:delete", + "tableau:view_tags:update", + "tableau:view_tags:delete", +] +# The JWT only has to last until sign-in; the session it buys outlives it. Tableau Cloud allows 10 minutes. +CONNECTED_APP_JWT_LIFETIME = timedelta(minutes=5) +# Tableau answers a call outside the token's scopes with the same 401002 as bad credentials. +CONNECTED_APP_REJECTED = ( + "Tableau rejected the connected app's token (401). Check the client ID, secret ID, secret value and " + "username, that the connected app is enabled, that the Site Name matches the site it belongs to, and " + "that the clock of the host running the ingestion is correct. " + f"A call outside the token's scopes is rejected the same way; OpenMetadata requests {', '.join(CONNECTED_APP_SCOPES)}." +) +CONNECTED_APP_METADATA_API_FLOOR = ( + "Tableau documents that a connected app can use the Metadata API only on Tableau Cloud and on Tableau " + "Server 2023.3 or later; on an older Tableau Server, use a Personal Access Token." +) +OWNERS_NOT_FOUND_FIX = ( + "Owners could not be resolved. Grant the user permission to read users on the site, or " + "disable owner ingestion in the service configuration." +) +DATA_MODELS_FIX = ( + "The Tableau Metadata API returned no data sources for the workbook. Enable the " + "Metadata API on the Tableau instance." +) + def _status_of(error: BaseException) -> int | None: """Return the HTTP status a Tableau error carries, if any. @@ -131,8 +179,7 @@ def _status_of(error: BaseException) -> int | None: ), when(Matchers.exception(TableauOwnersNotFound)).diagnose( "Owner information not available", - fix="Owners could not be resolved. Grant the user permission to read users on the site, or " - "disable owner ingestion in the service configuration.", + fix=OWNERS_NOT_FOUND_FIX, ), when(Matchers.exception(TableauUpstreamTablesRedacted)).diagnose( "Source table names are hidden from this account", @@ -144,8 +191,7 @@ def _status_of(error: BaseException) -> int | None: ), when(Matchers.exception(TableauDataModelsException)).diagnose( "Data sources could not be read", - fix="The Tableau Metadata API returned no data sources for the workbook. Enable the " - "Metadata API on the Tableau instance.", + fix=DATA_MODELS_FIX, doc=METADATA_API_DOC, ), when(Matchers.contains("in incorrect format")).diagnose( @@ -155,6 +201,21 @@ def _status_of(error: BaseException) -> int | None: ), ).including(NETWORK_ERRORS) +# A connected app has no PAT or password to check, and its token's scopes can be what Tableau refused. +TABLEAU_CONNECTED_APP_ERRORS = ErrorPack( + when(http_status(401, extract=_status_of)).diagnose("Authentication failed", fix=CONNECTED_APP_REJECTED), + # The owner lookup swallows the 401, so a token without the users scope surfaces here instead. + when(Matchers.exception(TableauOwnersNotFound)).diagnose( + "Owner information not available", + fix=f"{OWNERS_NOT_FOUND_FIX} The connected app's token also needs the tableau:users:read scope.", + ), + when(Matchers.exception(TableauDataModelsException)).diagnose( + "Data sources could not be read", + fix=f"{DATA_MODELS_FIX} {CONNECTED_APP_METADATA_API_FLOOR}", + doc=METADATA_API_DOC, + ), +).including(TABLEAU_ERRORS) + def get_connection(connection: TableauConnectionConfig) -> TableauClient: """ @@ -213,7 +274,7 @@ def set_verify_ssl( def build_server_config( connection: TableauConnectionConfig | TableauPipelineConnection, -) -> TSC.TableauAuth | TSC.PersonalAccessTokenAuth: +) -> Credentials: """ Build client configuration Args: @@ -234,6 +295,24 @@ def build_server_config( personal_access_token=connection.authType.personalAccessTokenSecret.get_secret_value(), site_id=connection.siteName if connection.siteName else "", ) + elif isinstance(connection.authType, TableauConnectedAppAuth): + app = connection.authType + # Direct trust accepts only HS256 tokens signed with the connected app's secret value. + token = jwt.encode( + { + "iss": app.clientId, + "sub": app.username, + "aud": "tableau", + "exp": datetime.now(timezone.utc) + CONNECTED_APP_JWT_LIFETIME, + "jti": str(uuid.uuid4()), + "scp": CONNECTED_APP_SCOPES, + }, + app.secretValue.get_secret_value(), + algorithm="HS256", + headers={"kid": app.secretId, "iss": app.clientId}, + ) + # site_id must be a keyword: JWTAuth's second positional parameter is isUat. + tableau_auth = TSC.JWTAuth(jwt=token, site_id=connection.siteName if connection.siteName else "") else: raise ValueError("Unsupported authentication type") # noqa: TRY004 @@ -247,10 +326,9 @@ class TableauChecks: credentials or an unreachable server fail there and the rest are skipped. """ - errors = TABLEAU_ERRORS - - def __init__(self, server: Borrowed[TableauClient]) -> None: + def __init__(self, server: Borrowed[TableauClient], connected_app: bool = False) -> None: self._server = server + self.errors = TABLEAU_CONNECTED_APP_ERRORS if connected_app else TABLEAU_ERRORS @check(DashboardStep.ServerInfo) def server_info(self) -> Evidence: @@ -325,4 +403,7 @@ def _get_client(self) -> TableauClient: return client def checks(self) -> ChecksProvider: - return TableauChecks(server=self.borrow()) + return TableauChecks( + server=self.borrow(), + connected_app=isinstance(self.service_connection.authType, TableauConnectedAppAuth), + ) diff --git a/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/README.md b/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/README.md index cc1b337b37eb..5e56f8af2092 100644 --- a/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/README.md +++ b/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/README.md @@ -49,7 +49,7 @@ Key fields on `TableauPipelineConnection`: | Field | Purpose | |-------|---------| | `hostPort` | Tableau Server URL | -| `authType` | `BasicAuth` (username/password) or `AccessTokenAuth` (PAT name + secret) | +| `authType` | `BasicAuth` (username/password), `AccessTokenAuth` (PAT name + secret) or `TableauConnectedAppAuth` (direct trust connected app: client ID, secret ID, secret value, username) | | `siteName` | Tableau site (empty for default) | | `apiVersion` | Optional REST API version override | | `verifySSL` + `sslConfig` | TLS validation mode, CA certificate, and client certificate + key (mutual TLS) when `verifySSL=validate` | diff --git a/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py b/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py index e869a1d94068..b6c63dfc27e1 100644 --- a/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py +++ b/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py @@ -26,13 +26,11 @@ from tableauserverclient import ( Filter, Pager, - PersonalAccessTokenAuth, RequestOptions, Server, Sort, - TableauAuth, ) -from tableauserverclient.models import BackgroundJobItem, FlowItem, FlowRunItem, TaskItem +from tableauserverclient.models import BackgroundJobItem, Credentials, FlowItem, FlowRunItem, TaskItem from tableauserverclient.server.endpoint.endpoint import TABLEAU_AUTH_HEADER from tableauserverclient.server.endpoint.exceptions import ServerResponseError from typing_extensions import Self @@ -44,6 +42,7 @@ from metadata.generated.schema.entity.services.connections.pipeline.tableauPipelineConnection import ( TableauPipelineConnection, ) +from metadata.ingestion.source.dashboard.tableau.connection import build_server_config from metadata.ingestion.source.pipeline.tableaupipeline.models import ( ExtractTargetType, TableauFlowLineage, @@ -165,7 +164,7 @@ class TableauPipelineClient: def __init__( self, - tableau_server_auth: PersonalAccessTokenAuth | TableauAuth, + tableau_server_auth: Credentials, config: TableauPipelineConnection, verify_ssl: bool | str | None, ssl_manager: SSLManager | None = None, @@ -190,7 +189,6 @@ def __init__( config.hostPort, FALLBACK_API_VERSION, ) - self._auth = tableau_server_auth self.tableau_server.session.hooks["response"].append(self._sign_in_again) self.tableau_server.auth.sign_in(tableau_server_auth) self.config = config @@ -215,7 +213,8 @@ def _sign_in_again(self, response: requests.Response, **kwargs: Any) -> requests "Tableau ended the session: it expired, or the same personal access token signed in elsewhere. " "Signing in again." ) - self.tableau_server.auth.sign_in(self._auth) + # Fresh credentials: a connected-app JWT expires five minutes after it is signed. + self.tableau_server.auth.sign_in(build_server_config(self.config)) resent = request.copy() # Without this hook, a second 401 reaches the caller instead of another sign-in. resent.hooks = {"response": []} diff --git a/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/connection.py b/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/connection.py index 3c5b57f09382..a6bfaa8421c7 100644 --- a/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/connection.py +++ b/ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/connection.py @@ -42,9 +42,14 @@ from metadata.generated.schema.entity.services.connections.pipeline.tableauPipelineConnection import ( TableauPipelineConnection as TableauPipelineConnectionConfig, ) +from metadata.generated.schema.security.credentials.tableauConnectedAppAuth import ( + TableauConnectedAppAuth, +) from metadata.ingestion.connections.connection import BaseConnection from metadata.ingestion.connections.test_connections import SourceConnectionException from metadata.ingestion.source.dashboard.tableau.connection import ( + CONNECTED_APP_METADATA_API_FLOOR, + CONNECTED_APP_REJECTED, METADATA_API_DOC, TABLEAU_ERRORS, build_server_config, @@ -67,6 +72,12 @@ API_VERSIONS_DOC = "https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm" JOBS_DOC = "https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_jobs_tasks_and_schedules.htm" +METADATA_API_REJECTED_FIX = ( + "The Tableau Metadata API answered but rejected the flow query, so pipelines and runs will be " + "ingested without lineage. Check the Metadata API is enabled on Tableau Server (it is always on for " + "Tableau Cloud) and that the user can see flows through it." +) + NO_FLOWS_CAVEAT = Diagnosis( title="No Prep flows visible", remediation="The site is readable but no published flow is visible to this user. Publish a flow, or grant " @@ -115,13 +126,21 @@ ), when(Matchers.exception(GraphQLError)).diagnose( "Metadata API rejected the query", - fix="The Tableau Metadata API answered but rejected the flow query, so pipelines and runs will be " - "ingested without lineage. Check the Metadata API is enabled on Tableau Server (it is always on for " - "Tableau Cloud) and that the user can see flows through it.", + fix=METADATA_API_REJECTED_FIX, doc=METADATA_API_DOC, ), ).including(TABLEAU_ERRORS) +# TSC raises FailedSignInError for a 401 with a Tableau error body, including a call outside the token's scopes. +TABLEAU_PIPELINE_CONNECTED_APP_ERRORS = ErrorPack( + when(Matchers.exception(FailedSignInError)).diagnose("Authentication failed", fix=CONNECTED_APP_REJECTED), + when(Matchers.exception(GraphQLError)).diagnose( + "Metadata API rejected the query", + fix=f"{METADATA_API_REJECTED_FIX} {CONNECTED_APP_METADATA_API_FLOOR}", + doc=METADATA_API_DOC, + ), +).including(TABLEAU_PIPELINE_ERRORS) + def get_connection(connection: TableauPipelineConnectionConfig) -> TableauPipelineClient: """ @@ -155,10 +174,9 @@ class TableauPipelineChecks: without them. """ - errors = TABLEAU_PIPELINE_ERRORS - - def __init__(self, server: Borrowed[TableauPipelineClient]) -> None: + def __init__(self, server: Borrowed[TableauPipelineClient], connected_app: bool = False) -> None: self._server = server + self.errors = TABLEAU_PIPELINE_CONNECTED_APP_ERRORS if connected_app else TABLEAU_PIPELINE_ERRORS @check(PipelineStep.GetPipelines) def get_pipelines(self) -> Evidence: @@ -215,4 +233,7 @@ def _get_client(self) -> TableauPipelineClient: return client def checks(self) -> ChecksProvider: - return TableauPipelineChecks(server=self.borrow()) + return TableauPipelineChecks( + server=self.borrow(), + connected_app=isinstance(self.service_connection.authType, TableauConnectedAppAuth), + ) diff --git a/ingestion/tests/integration/tableau/conftest.py b/ingestion/tests/integration/tableau/conftest.py index b04bc207d36a..e228a1bd521f 100644 --- a/ingestion/tests/integration/tableau/conftest.py +++ b/ingestion/tests/integration/tableau/conftest.py @@ -31,6 +31,8 @@ from metadata.generated.schema.entity.services.dashboardService import DashboardService from metadata.workflow.metadata import MetadataWorkflow +from ...utils.tableau_connected_app import CONNECTED_APP, PAT, sign_in # noqa: TID252 + TABLEAU_HOST = "tableau-dashboard-it.example.com" DASHBOARD_SERVICE = "tableau_dashboard_it" NS = 'xmlns="http://tableau.com/api"' @@ -88,10 +90,7 @@ def answer(self, request: requests.PreparedRequest) -> requests.Response: "3.23" ) elif path.endswith("/auth/signin"): - body = ( - f'' - '' - ) + status, body = sign_in(request.body) elif path.endswith("/auth/signout"): status = 204 elif path.endswith("/projects"): @@ -163,7 +162,7 @@ def send(adapter: HTTPAdapter, request: requests.PreparedRequest, **kwargs) -> r yield site -def _workflow_config(override_lineage: bool) -> dict: +def _workflow_config(override_lineage: bool, auth_type: dict = PAT) -> dict: return { "source": { "type": "tableau", @@ -173,7 +172,7 @@ def _workflow_config(override_lineage: bool) -> dict: "type": "Tableau", "hostPort": f"https://{TABLEAU_HOST}", "siteName": "it", - "authType": {"personalAccessTokenName": "pat", "personalAccessTokenSecret": "secret"}, + "authType": auth_type, } }, "sourceConfig": { @@ -202,14 +201,19 @@ def _delete_ingested(metadata) -> None: metadata.delete(entity=DashboardService, entity_id=service.id, recursive=True, hard_delete=True) +@pytest.fixture(scope="module", params=[PAT, CONNECTED_APP], ids=["pat", "connected_app"]) +def auth_type(request) -> dict: + return request.param + + @pytest.fixture(scope="module") -def ingest(metadata, run_workflow, tableau_site) -> Iterator[Callable[..., MetadataWorkflow]]: +def ingest(metadata, run_workflow, tableau_site, auth_type) -> Iterator[Callable[..., MetadataWorkflow]]: """Runs the workflow and hands it back. The broken view is a source failure on every run, so the status is asserted by the tests instead of raised here.""" _delete_ingested(metadata) def _ingest(override_lineage: bool = False) -> MetadataWorkflow: - return run_workflow(MetadataWorkflow, _workflow_config(override_lineage), raise_from_status=False) + return run_workflow(MetadataWorkflow, _workflow_config(override_lineage, auth_type), raise_from_status=False) try: yield _ingest diff --git a/ingestion/tests/integration/tableaupipeline/conftest.py b/ingestion/tests/integration/tableaupipeline/conftest.py index 58b3de7d476e..ceacb21fb4ff 100644 --- a/ingestion/tests/integration/tableaupipeline/conftest.py +++ b/ingestion/tests/integration/tableaupipeline/conftest.py @@ -54,6 +54,8 @@ from metadata.generated.schema.entity.services.pipelineService import PipelineService from metadata.workflow.metadata import MetadataWorkflow +from ...utils.tableau_connected_app import CONNECTED_APP, PAT, sign_in # noqa: TID252 + TABLEAU_HOST = "tableau-it.example.com" PIPELINE_SERVICE = "tableau_pipeline_it" DB_SERVICE = "tableau_pipeline_it_warehouse" @@ -211,10 +213,7 @@ def answer(self, request: requests.PreparedRequest) -> requests.Response: "3.23" ) elif path.endswith("/auth/signin"): - body = ( - f'' - '' - ) + status, body = sign_in(request.body) elif path.endswith("/auth/signout"): status = 204 elif path.endswith("/flows/runs"): @@ -325,11 +324,20 @@ def _create_tables(metadata, database: Database, schema_name: str, names: tuple[ return tables +@pytest.fixture(scope="module", params=[PAT, CONNECTED_APP], ids=["pat", "connected_app"]) +def auth_type(request) -> dict: + return request.param + + @pytest.fixture(scope="module") -def warehouse_tables(metadata) -> Iterator[dict[str, Table]]: +def warehouse_tables(metadata, auth_type) -> Iterator[dict[str, Table]]: """A MySQL service as OpenMetadata files it: one `default` database, with each MySQL database as a schema. `staging` holds an `orders` too and is - indexed first, so a search for `orders` in any schema finds it first.""" + indexed first, so a search for `orders` in any schema finds it first. + + Rebuilt for each auth type: hard-deleting the previous run's pipeline service + leaves each table-to-table edge pointing at its deleted pipeline, and the next + run's edge for the same pair does not replace that reference.""" service = metadata.create_or_update( CreateDatabaseServiceRequest( name=DB_SERVICE, @@ -347,7 +355,7 @@ def warehouse_tables(metadata) -> Iterator[dict[str, Table]]: @pytest.fixture(scope="module") -def workflow_config() -> dict: +def workflow_config(auth_type) -> dict: return { "source": { "type": "tableaupipeline", @@ -357,7 +365,7 @@ def workflow_config() -> dict: "type": "TableauPipeline", "hostPort": f"https://{TABLEAU_HOST}", "siteName": "it", - "authType": {"personalAccessTokenName": "pat", "personalAccessTokenSecret": "secret"}, + "authType": auth_type, } }, "sourceConfig": { diff --git a/ingestion/tests/unit/source/dashboard/tableau/test_connection.py b/ingestion/tests/unit/source/dashboard/tableau/test_connection.py index bac69fe5361e..5fe605bea537 100644 --- a/ingestion/tests/unit/source/dashboard/tableau/test_connection.py +++ b/ingestion/tests/unit/source/dashboard/tableau/test_connection.py @@ -1,9 +1,12 @@ """Unit tests for Tableau test-connection checks.""" import socket +import time from unittest.mock import MagicMock, patch +import jwt import pytest +import tableauserverclient as TSC # noqa: N812 from requests.exceptions import HTTPError, SSLError from tableauserverclient.server.endpoint.exceptions import ( FailedSignInError, @@ -29,9 +32,18 @@ TABLEAU_ERRORS, TableauChecks, TableauConnection, + build_server_config, get_connection, ) +from .....utils.tableau_connected_app import ( # noqa: TID252 + CONNECTED_APP, + CONNECTED_APP_SCOPES, + PAT, + SCOPE_REJECTION, + connected_app_claims, +) + CONNECTION_MODULE = "metadata.ingestion.source.dashboard.tableau.connection" @@ -334,3 +346,85 @@ def test_a_failing_sign_out_does_not_break_close(): client.sign_out.assert_called_once_with() assert mock_get.call_count == 1 + + +def _connected_app_config() -> TableauConnectionConfig: + return TableauConnectionConfig( + hostPort="https://tableau.example.com", + siteName="MarketingTeam", + authType=CONNECTED_APP, + ) + + +def test_a_connected_app_signs_in_with_a_direct_trust_jwt(): + config = _connected_app_config() + + started = time.time() + auth = build_server_config(config) + finished = time.time() + + assert isinstance(auth, TSC.JWTAuth) + assert auth.site_id == "MarketingTeam" + assert auth.isUat is False + header = jwt.get_unverified_header(auth.jwt) + assert (header["alg"], header["kid"], header["iss"]) == ( + "HS256", + CONNECTED_APP["secretId"], + CONNECTED_APP["clientId"], + ) + claims = connected_app_claims(auth.jwt) + assert claims["iss"] == CONNECTED_APP["clientId"] + assert claims["sub"] == CONNECTED_APP["username"] + assert claims["aud"] == "tableau" + assert claims["scp"] == CONNECTED_APP_SCOPES + # Five minutes after signing, inside Tableau Cloud's 10-minute cap; exp is rounded down to whole seconds. + assert started + 299 < claims["exp"] <= finished + 300 + + +def test_each_connected_app_sign_in_gets_its_own_jti(): + config = _connected_app_config() + + first = connected_app_claims(build_server_config(config).jwt)["jti"] + second = connected_app_claims(build_server_config(config).jwt)["jti"] + + assert first + assert first != second + + +def test_a_connected_app_401_names_the_app_checks_and_scopes(): + diagnosis = TableauConnection(_connected_app_config()).checks().errors.classify(SCOPE_REJECTION) + + assert diagnosis.title == "Authentication failed" + assert "connected app" in diagnosis.remediation + assert "clock" in diagnosis.remediation + assert all(scope in diagnosis.remediation for scope in CONNECTED_APP_SCOPES) + + +def test_unresolvable_owners_name_the_users_scope_for_a_connected_app(): + # The owner lookup swallows the 401, so a token without the users scope surfaces here. + diagnosis = TableauConnection(_connected_app_config()).checks().errors.classify(TableauOwnersNotFound("nope")) + + assert diagnosis.title == "Owner information not available" + assert "tableau:users:read" in diagnosis.remediation + + +def test_unreadable_data_models_name_the_server_floor_for_a_connected_app(): + diagnosis = TableauConnection(_connected_app_config()).checks().errors.classify(TableauDataModelsException("nope")) + + assert diagnosis.title == "Data sources could not be read" + assert "Tableau Server 2023.3" in diagnosis.remediation + + +def test_a_pat_connection_keeps_the_pat_hints(): + errors = ( + TableauConnection( + TableauConnectionConfig(hostPort="https://tableau.example.com", siteName="MarketingTeam", authType=PAT) + ) + .checks() + .errors + ) + + for error in (SCOPE_REJECTION, TableauOwnersNotFound("nope"), TableauDataModelsException("nope")): + remediation = errors.classify(error).remediation + assert "connected app" not in remediation + assert "tableau:" not in remediation diff --git a/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_client.py b/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_client.py index 4c452fdf5036..f0bcf4b3f914 100644 --- a/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_client.py +++ b/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_client.py @@ -24,7 +24,7 @@ from contextlib import contextmanager from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from urllib.parse import parse_qs, urlparse -from xml.etree.ElementTree import ParseError +from xml.etree.ElementTree import ParseError, fromstring import pytest import requests @@ -40,6 +40,7 @@ from metadata.generated.schema.entity.services.connections.pipeline.tableauPipelineConnection import ( TableauPipelineConnection, ) +from metadata.ingestion.source.dashboard.tableau.connection import build_server_config from metadata.ingestion.source.pipeline.tableaupipeline import client as client_module from metadata.ingestion.source.pipeline.tableaupipeline.client import ( TableauFlowRecordError, @@ -49,6 +50,8 @@ ) from metadata.utils.ssl_manager import SSLManager +from ....utils.tableau_connected_app import CONNECTED_APP # noqa: TID252 + HOST = "https://tableau.example.com" SITE_ID = "site-luid" NS = 'xmlns="http://tableau.com/api"' @@ -737,6 +740,19 @@ def test_a_session_ended_by_another_sign_in_is_renewed(self, tableau): assert len(tableau.calls_to("/auth/signin")) == 2 assert tableau.calls_to("/flows")[-1].headers["X-Tableau-Auth"] == "token-2" + def test_a_connected_app_signs_in_again_with_a_fresh_token(self, tableau): + """The first JWT expires five minutes after it is signed, so re-sending it cannot renew a session.""" + config = TableauPipelineConnection( + hostPort=HOST, authType=CONNECTED_APP, siteName="MarketingTeam", includeExtractRefreshes=False + ) + client = TableauPipelineClient(tableau_server_auth=build_server_config(config), config=config, verify_ssl=True) + tableau.end_session_on = "/flows" + + list(client.get_pipelines()) + + first, second = (fromstring(r.body).find("credentials").get("jwt") for r in tableau.calls_to("/auth/signin")) + assert first and second and first != second + def test_a_refused_sign_in_is_not_repeated(self, tableau): client = _client(include_extract_refreshes=False) tableau.end_session_on = "/flows" diff --git a/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_connection.py b/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_connection.py index eaea588bbfb3..d23bc2f92305 100644 --- a/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_connection.py +++ b/ingestion/tests/unit/topology/pipeline/test_tableaupipeline_connection.py @@ -11,11 +11,14 @@ """Tableau pipeline connection handling and its test-connection checks.""" import json +import time from pathlib import Path from unittest.mock import MagicMock, patch +import jwt import pytest import requests +import tableauserverclient as TSC # noqa: N812 from tableauserverclient.server.endpoint.exceptions import ( FailedSignInError, GraphQLError, @@ -34,7 +37,7 @@ ) from metadata.ingestion.connections.connection import BaseConnection from metadata.ingestion.connections.test_connections import SourceConnectionException -from metadata.ingestion.source.dashboard.tableau.connection import set_verify_ssl +from metadata.ingestion.source.dashboard.tableau.connection import build_server_config, set_verify_ssl from metadata.ingestion.source.pipeline.tableaupipeline.client import ( TableauSiteAdminRequiredError, ) @@ -46,6 +49,13 @@ ) from metadata.ingestion.source.pipeline.tableaupipeline.service_spec import ServiceSpec +from ....utils.tableau_connected_app import ( # noqa: TID252 + CONNECTED_APP, + CONNECTED_APP_SCOPES, + SCOPE_REJECTION, + connected_app_claims, +) + CONNECTION_MODULE = "metadata.ingestion.source.pipeline.tableaupipeline.connection" TEST_CONNECTION_DEFINITION = ( Path(__file__).parents[5] @@ -55,10 +65,12 @@ def _config(**overrides) -> TableauPipelineConnectionConfig: return TableauPipelineConnectionConfig( - hostPort="https://tableau.example.com", - authType={"personalAccessTokenName": "pat", "personalAccessTokenSecret": "secret"}, - siteName="MarketingTeam", - **overrides, + **{ + "hostPort": "https://tableau.example.com", + "authType": {"personalAccessTokenName": "pat", "personalAccessTokenSecret": "secret"}, + "siteName": "MarketingTeam", + **overrides, + } ) @@ -103,6 +115,32 @@ def test_get_connection_signs_in_with_the_pat_and_ssl_mode(): assert kwargs["tableau_server_auth"].site_id == "MarketingTeam" +def test_a_pipeline_connection_signs_in_with_a_direct_trust_jwt(): + config = _config(authType=CONNECTED_APP) + + started = time.time() + first = build_server_config(config) + finished = time.time() + second = build_server_config(config) + + assert isinstance(first, TSC.JWTAuth) + assert first.site_id == "MarketingTeam" + assert first.isUat is False + header = jwt.get_unverified_header(first.jwt) + assert (header["alg"], header["kid"], header["iss"]) == ( + "HS256", + CONNECTED_APP["secretId"], + CONNECTED_APP["clientId"], + ) + claims = connected_app_claims(first.jwt) + assert claims["iss"] == CONNECTED_APP["clientId"] + assert claims["sub"] == CONNECTED_APP["username"] + assert claims["aud"] == "tableau" + assert claims["scp"] == CONNECTED_APP_SCOPES + assert started + 299 < claims["exp"] <= finished + 300 + assert claims["jti"] != connected_app_claims(second.jwt)["jti"] + + def test_get_connection_wraps_client_failures(): with ( patch(f"{CONNECTION_MODULE}.TableauPipelineClient", side_effect=RuntimeError("boom")), @@ -196,6 +234,33 @@ def test_tableau_errors_are_diagnosed(error, title): assert TABLEAU_PIPELINE_ERRORS.classify(error).title == title +def test_a_rejected_flow_call_names_the_connected_app_checks_and_scopes(): + # TSC raises FailedSignInError for a 401 with a Tableau error body, so a flow call outside the scopes lands here. + diagnosis = TableauPipelineConnection(_config(authType=CONNECTED_APP)).checks().errors.classify(SCOPE_REJECTION) + + assert diagnosis.title == "Authentication failed" + assert "connected app" in diagnosis.remediation + assert "tableau:flows:read" in diagnosis.remediation + + +def test_a_rejected_lineage_query_names_the_server_floor_for_a_connected_app(): + errors = TableauPipelineConnection(_config(authType=CONNECTED_APP)).checks().errors + + diagnosis = errors.classify(GraphQLError([{"message": "Validation error"}])) + + assert diagnosis.title == "Metadata API rejected the query" + assert "Tableau Server 2023.3" in diagnosis.remediation + + +def test_a_pat_pipeline_connection_keeps_the_pat_hints(): + errors = TableauPipelineConnection(_config()).checks().errors + + for error in (SCOPE_REJECTION, GraphQLError([{"message": "Validation error"}])): + remediation = errors.classify(error).remediation + assert "connected app" not in remediation + assert "tableau:" not in remediation + + def test_certificate_temp_files_are_removed_when_sign_in_fails(): """No client owns the SSL temp files yet, so nothing else would remove the written private key.""" diff --git a/ingestion/tests/utils/tableau_connected_app.py b/ingestion/tests/utils/tableau_connected_app.py new file mode 100644 index 000000000000..22666f808e79 --- /dev/null +++ b/ingestion/tests/utils/tableau_connected_app.py @@ -0,0 +1,87 @@ +# Copyright 2026 Collate +# Licensed under the Collate Community License, Version 1.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +A Tableau connected app (direct trust) as the Tableau tests see it: its credentials, the scopes its +token must carry, and Tableau's sign-in answer for the fake sites of the integration tests. +""" + +import xml.etree.ElementTree as ET + +import jwt +from tableauserverclient.server.endpoint.exceptions import FailedSignInError + +NS = 'xmlns="http://tableau.com/api"' +PAT = {"personalAccessTokenName": "pat", "personalAccessTokenSecret": "secret"} +CONNECTED_APP = { + "clientId": "3d6e1b5c-client", + "secretId": "9a2f7c4e-secret", + "secretValue": "connected-app-secret-value-of-44-characters!", + "username": "api-user@example.com", +} +# Every scope a call of the dashboard or pipeline connector or of Collate's reverse metadata needs, +# measured on Tableau Cloud. +CONNECTED_APP_SCOPES = [ + "tableau:content:read", + "tableau:users:read", + "tableau:server:read", + "tableau:flows:read", + "tableau:flow_runs:read", + "tableau:jobs:read", + "tableau:tasks:read", + "tableau:workbooks:update", + "tableau:workbook_tags:update", + "tableau:workbook_tags:delete", + "tableau:view_tags:update", + "tableau:view_tags:delete", +] + +# Tableau answers a call outside the JWT's scopes with the same 401002 as bad credentials. +SCOPE_REJECTION = FailedSignInError( + "401002", "Unauthorized Access", "Invalid authentication credentials were provided." +) + + +def connected_app_claims(token: str) -> dict: + return jwt.decode(token, CONNECTED_APP["secretValue"], algorithms=["HS256"], audience="tableau") + + +def _is_accepted(token: str) -> bool: + """What Tableau's direct trust checks at sign-in: the HS256 signature with the app's secret, the + secret ID and client ID in the header, the audience and issuer, and the claims it requires.""" + try: + jwt.decode( + token, + CONNECTED_APP["secretValue"], + algorithms=["HS256"], + audience="tableau", + issuer=CONNECTED_APP["clientId"], + options={"require": ["exp", "jti", "sub", "scp"]}, + ) + except jwt.InvalidTokenError: + return False + header = jwt.get_unverified_header(token) + return (header.get("kid"), header.get("iss")) == (CONNECTED_APP["secretId"], CONNECTED_APP["clientId"]) + + +def sign_in(body: bytes) -> tuple[int, str]: + """Tableau's answer to a sign-in request: the test PAT, or a connected-app JWT that passes direct trust.""" + credentials = ET.fromstring(body).find("credentials") + token = credentials.get("jwt") + accepted = _is_accepted(token) if token else all(credentials.get(key) == value for key, value in PAT.items()) + if not accepted: + return 401, ( + f'Signin Error' + "Invalid credentials" + ) + return 200, ( + f'' + '' + ) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/ClassConverterFactory.java b/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/ClassConverterFactory.java index ebc7b63f7500..7905849cbb06 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/ClassConverterFactory.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/ClassConverterFactory.java @@ -25,7 +25,6 @@ import org.openmetadata.schema.metadataIngestion.StorageServiceMetadataPipeline; import org.openmetadata.schema.metadataIngestion.dbtconfig.DbtGCSConfig; import org.openmetadata.schema.metadataIngestion.storage.StorageMetadataGCSConfig; -import org.openmetadata.schema.security.credentials.AccessTokenAuth; import org.openmetadata.schema.security.credentials.ApiAccessTokenAuth; import org.openmetadata.schema.security.credentials.BasicAuth; import org.openmetadata.schema.security.credentials.GCPCredentials; @@ -293,8 +292,10 @@ private ClassConverterFactory() { new NestedConfigClassConverter( TableauPipelineConnection.class, Map.of( - "authType", List.of(BasicAuth.class, AccessTokenAuth.class), - "sslConfig", List.of(ValidateSSLClientConfig.class))))); + "authType", + TableauConnectionClassConverter.CONNECTION_CLASSES, + "sslConfig", + List.of(ValidateSSLClientConfig.class))))); static { Map, ClassConverter> converters = diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverter.java b/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverter.java index 47d92022f72d..a8d6d11719ac 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverter.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverter.java @@ -3,13 +3,15 @@ import java.util.List; import org.openmetadata.schema.security.credentials.AccessTokenAuth; import org.openmetadata.schema.security.credentials.BasicAuth; +import org.openmetadata.schema.security.credentials.TableauConnectedAppAuth; import org.openmetadata.schema.security.ssl.ValidateSSLClientConfig; import org.openmetadata.schema.services.connections.dashboard.TableauConnection; import org.openmetadata.schema.utils.JsonUtils; public class TableauConnectionClassConverter extends ClassConverter { - private static final List> CONNECTION_CLASSES = - List.of(BasicAuth.class, AccessTokenAuth.class); + /** Every Tableau authType, shared with the TableauPipelineConnection entry in the factory. */ + static final List> CONNECTION_CLASSES = + List.of(BasicAuth.class, AccessTokenAuth.class, TableauConnectedAppAuth.class); private static final List> SSL_SOURCE_CLASSES = List.of(ValidateSSLClientConfig.class); diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverterTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverterTest.java new file mode 100644 index 000000000000..1cb4917396be --- /dev/null +++ b/openmetadata-service/src/test/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverterTest.java @@ -0,0 +1,50 @@ +package org.openmetadata.service.secrets.converter; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; + +import java.util.Map; +import org.junit.jupiter.api.Test; +import org.openmetadata.schema.security.credentials.TableauConnectedAppAuth; +import org.openmetadata.schema.services.connections.dashboard.TableauConnection; +import org.openmetadata.schema.services.connections.pipeline.TableauPipelineConnection; + +/** + * A connected app's secret value sits behind the {@code authType} oneOf, so it is masked and + * encrypted only once the converter types it. + */ +class TableauConnectionClassConverterTest { + + private static final Map CONNECTION = + Map.of( + "hostPort", + "https://tableau.example.com", + "authType", + Map.of( + "clientId", "client-id", + "secretId", "secret-id", + "secretValue", "secret-value", + "username", "api-user")); + + @Test + void dashboardConnectionTypesAConnectedApp() { + TableauConnection connection = + (TableauConnection) + ClassConverterFactory.getConverter(TableauConnection.class).convert(CONNECTION); + + TableauConnectedAppAuth auth = + assertInstanceOf(TableauConnectedAppAuth.class, connection.getAuthType()); + assertEquals("secret-value", auth.getSecretValue()); + } + + @Test + void pipelineConnectionTypesAConnectedApp() { + TableauPipelineConnection connection = + (TableauPipelineConnection) + ClassConverterFactory.getConverter(TableauPipelineConnection.class).convert(CONNECTION); + + TableauConnectedAppAuth auth = + assertInstanceOf(TableauConnectedAppAuth.class, connection.getAuthType()); + assertEquals("secret-value", auth.getSecretValue()); + } +} diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json index 1bf62d4d086d..9dfdecca70bf 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/dashboard/tableauConnection.json @@ -37,6 +37,9 @@ }, { "$ref": "../../../../security/credentials/accessTokenAuth.json" + }, + { + "$ref": "../../../../security/credentials/tableauConnectedAppAuth.json" } ] }, diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/pipeline/tableauPipelineConnection.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/pipeline/tableauPipelineConnection.json index d2db5e62dbd0..e0378af6de76 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/pipeline/tableauPipelineConnection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/pipeline/tableauPipelineConnection.json @@ -37,6 +37,9 @@ }, { "$ref": "../../../../security/credentials/accessTokenAuth.json" + }, + { + "$ref": "../../../../security/credentials/tableauConnectedAppAuth.json" } ] }, diff --git a/openmetadata-spec/src/main/resources/json/schema/security/credentials/tableauConnectedAppAuth.json b/openmetadata-spec/src/main/resources/json/schema/security/credentials/tableauConnectedAppAuth.json new file mode 100644 index 000000000000..87c3553559ed --- /dev/null +++ b/openmetadata-spec/src/main/resources/json/schema/security/credentials/tableauConnectedAppAuth.json @@ -0,0 +1,33 @@ +{ + "$id": "https://open-metadata.org/schema/security/credentials/tableauConnectedAppAuth.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": ["clientId", "secretId", "secretValue", "username"], + "additionalProperties": false +} diff --git a/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/dashboard/tableauConnection.json b/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/dashboard/tableauConnection.json index edd3d006a7d7..b2224cd607e5 100644 --- a/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/dashboard/tableauConnection.json +++ b/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/dashboard/tableauConnection.json @@ -82,6 +82,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, diff --git a/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/pipeline/tableauPipelineConnection.json b/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/pipeline/tableauPipelineConnection.json index 23d87f338e8e..b72a95890dbd 100644 --- a/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/pipeline/tableauPipelineConnection.json +++ b/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/pipeline/tableauPipelineConnection.json @@ -82,6 +82,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, diff --git a/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/serviceConnection.json b/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/serviceConnection.json index 1c395458b114..274dd987f92e 100644 --- a/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/serviceConnection.json +++ b/openmetadata-ui/src/main/resources/ui/public/jsons/connectionSchemas/connections/serviceConnection.json @@ -3600,6 +3600,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, @@ -34611,6 +34647,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, @@ -41987,6 +42059,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, @@ -72998,6 +73106,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, diff --git a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Tableau.md b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Tableau.md index ecc44d21a923..6f72ba62b3e9 100644 --- a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Tableau.md +++ b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Tableau.md @@ -19,6 +19,8 @@ $$section ### Username $(id="username") The name of the user whose credentials will be used to sign in. + +With Connected App Authentication, this is the Tableau user OpenMetadata signs in as, and ingestion runs with that user's permissions. On Tableau Cloud enter the user's email address. On Tableau Server, Tableau's documentation asks for the user name. $$ $$section @@ -45,6 +47,40 @@ The personal access token value. For more information on how to get a Personal Access Token, you can visit the official docs. $$ +### 3. Connected App Authentication + +OpenMetadata signs a short-lived JSON Web Token (JWT) with the secret of a Tableau connected app that uses direct trust, and signs in as the user in Username. + +To set it up, a site administrator: + +1. Creates a connected app under **Settings > Connected Apps > New Connected App > Direct Trust**, and chooses the projects it can access. +2. Enables the app. Tableau's documentation states that a new connected app on Tableau Server starts disabled. +3. Generates a secret and copies the Client ID, the Secret ID and the Secret Value. + +OpenMetadata requests these scopes: `tableau:content:read`, `tableau:users:read`, `tableau:server:read`, `tableau:flows:read`, `tableau:flow_runs:read`, `tableau:jobs:read`, `tableau:tasks:read`, and, so that Collate's reverse metadata can write workbook descriptions, owners and tags and view tags, `tableau:workbooks:update`, `tableau:workbook_tags:update`, `tableau:workbook_tags:delete`, `tableau:view_tags:update`, `tableau:view_tags:delete`. The token is valid for 5 minutes, so the clock of the host running the ingestion must be correct. + +Tableau Server needs 2025.3 or later, where Tableau added the connected app scope for reading workbook views (charts). On older versions, use a Personal Access Token. + +For more information, visit the official docs. + +$$section +### Client ID $(id="clientId") + +The Client ID of the connected app, shown on the connected app's page. +$$ + +$$section +### Secret ID $(id="secretId") + +The ID of the connected app secret. +$$ + +$$section +### Secret Value $(id="secretValue") + +The value of the connected app secret. +$$ + ## Connection Details $$section diff --git a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Pipeline/TableauPipeline.md b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Pipeline/TableauPipeline.md index 15217d79da14..e3a31bed1112 100644 --- a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Pipeline/TableauPipeline.md +++ b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Pipeline/TableauPipeline.md @@ -22,6 +22,8 @@ $$section ### Username $(id="username") The name of the user whose credentials will be used to sign in. + +With Connected App Authentication, this is the Tableau user OpenMetadata signs in as, and ingestion runs with that user's permissions. On Tableau Cloud enter the user's email address. On Tableau Server, Tableau's documentation asks for the user name. $$ $$section @@ -48,6 +50,40 @@ The personal access token value. For more information on how to get a Personal Access Token, you can visit the official docs. $$ +### 3. Connected App Authentication + +OpenMetadata signs a short-lived JSON Web Token (JWT) with the secret of a Tableau connected app that uses direct trust, and signs in as the user in Username. + +To set it up, a site administrator: + +1. Creates a connected app under **Settings > Connected Apps > New Connected App > Direct Trust**, and chooses the projects it can access. +2. Enables the app. Tableau's documentation states that a new connected app on Tableau Server starts disabled. +3. Generates a secret and copies the Client ID, the Secret ID and the Secret Value. + +OpenMetadata requests these scopes: `tableau:content:read`, `tableau:users:read`, `tableau:server:read`, `tableau:flows:read`, `tableau:flow_runs:read`, `tableau:jobs:read`, `tableau:tasks:read`, and, so that Collate's reverse metadata can write workbook descriptions, owners and tags and view tags, `tableau:workbooks:update`, `tableau:workbook_tags:update`, `tableau:workbook_tags:delete`, `tableau:view_tags:update`, `tableau:view_tags:delete`. The token is valid for 5 minutes, so the clock of the host running the ingestion must be correct. + +Tableau Server needs 2025.3 or later, where Tableau added the connected app scopes for flows and flow runs. On older versions, use a Personal Access Token. + +For more information, visit the official docs. + +$$section +### Client ID $(id="clientId") + +The Client ID of the connected app, shown on the connected app's page. +$$ + +$$section +### Secret ID $(id="secretId") + +The ID of the connected app secret. +$$ + +$$section +### Secret Value $(id="secretValue") + +The value of the connected app secret. +$$ + ## Connection Details $$section diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/automations/createWorkflow.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/automations/createWorkflow.ts index e451f8561749..852059c21fe6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/automations/createWorkflow.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/automations/createWorkflow.ts @@ -2959,6 +2959,9 @@ export enum AuthProvider { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -3041,6 +3044,8 @@ export interface AuthenticationType { * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. * + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. */ clientId?: string; @@ -3110,6 +3115,9 @@ export interface AuthenticationType { * * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for NATS authentication. @@ -3149,6 +3157,14 @@ export interface AuthenticationType { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; /** * Authentication type identifier. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createDashboardService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createDashboardService.ts index 7cef52650489..016ef66c3df0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createDashboardService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createDashboardService.ts @@ -496,6 +496,9 @@ export interface Connection { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -513,6 +516,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. */ username?: string; @@ -525,13 +531,23 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createPipelineService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createPipelineService.ts index 1636ea050093..724e9ff92911 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createPipelineService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/services/createPipelineService.ts @@ -576,6 +576,9 @@ export interface PurpleAuthentication { * Basic Auth Credentials * * Access Token Auth Credentials + * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. */ export interface Authentication { /** @@ -586,6 +589,8 @@ export interface Authentication { /** * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. + * + * Client ID of the Tableau connected app. */ clientId?: string; /** @@ -628,6 +633,9 @@ export interface Authentication { password?: string; /** * Username to access the service. + * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. */ username?: string; /** @@ -638,6 +646,14 @@ export interface Authentication { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; } /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/services/ingestionPipelines/createIngestionPipeline.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/services/ingestionPipelines/createIngestionPipeline.ts index f1456684c486..aa53c0b25965 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/services/ingestionPipelines/createIngestionPipeline.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/services/ingestionPipelines/createIngestionPipeline.ts @@ -6021,6 +6021,9 @@ export enum AuthProvider { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -6138,6 +6141,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for authenticating with Dremio Software. This user should have appropriate @@ -6161,16 +6167,26 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. * * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/testServiceConnection.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/testServiceConnection.ts index 415a143b70d0..60b3a7543065 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/testServiceConnection.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/testServiceConnection.ts @@ -2815,6 +2815,9 @@ export enum AuthProvider { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -2897,6 +2900,8 @@ export interface AuthenticationType { * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. * + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. */ clientId?: string; @@ -2966,6 +2971,9 @@ export interface AuthenticationType { * * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for NATS authentication. @@ -3005,6 +3013,14 @@ export interface AuthenticationType { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; /** * Authentication type identifier. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts index 507544ce01f7..ded44aa5e2a3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts @@ -3422,6 +3422,9 @@ export enum AuthMechanismEnum { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -3504,6 +3507,8 @@ export interface AuthenticationType { * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. * + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. */ clientId?: string; @@ -3573,6 +3578,9 @@ export interface AuthenticationType { * * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for NATS authentication. @@ -3612,6 +3620,14 @@ export interface AuthenticationType { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; /** * Authentication type identifier. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/dashboard/tableauConnection.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/dashboard/tableauConnection.ts index 623bc779e1d5..ef26a9636520 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/dashboard/tableauConnection.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/dashboard/tableauConnection.ts @@ -70,6 +70,9 @@ export interface TableauConnection { * Basic Auth Credentials * * Access Token Auth Credentials + * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. */ export interface AuthenticationTypeForTableau { /** @@ -78,6 +81,9 @@ export interface AuthenticationTypeForTableau { password?: string; /** * Username to access the service. + * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. */ username?: string; /** @@ -88,6 +94,18 @@ export interface AuthenticationTypeForTableau { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * Client ID of the Tableau connected app. + */ + clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; } /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/pipeline/tableauPipelineConnection.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/pipeline/tableauPipelineConnection.ts index cd6d7946647e..d1a9a6cf19cc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/pipeline/tableauPipelineConnection.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/pipeline/tableauPipelineConnection.ts @@ -59,6 +59,9 @@ export interface TableauPipelineConnection { * Basic Auth Credentials * * Access Token Auth Credentials + * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. */ export interface AuthenticationTypeForTableau { /** @@ -67,6 +70,9 @@ export interface AuthenticationTypeForTableau { password?: string; /** * Username to access the service. + * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. */ username?: string; /** @@ -77,6 +83,18 @@ export interface AuthenticationTypeForTableau { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * Client ID of the Tableau connected app. + */ + clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; } /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/serviceConnection.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/serviceConnection.ts index c5a93531df6d..e9e232c55540 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/serviceConnection.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/serviceConnection.ts @@ -2801,6 +2801,9 @@ export enum AuthProvider { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -2918,6 +2921,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for authenticating with Dremio Software. This user should have appropriate @@ -2941,16 +2947,26 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. * * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts index 48ee25dc7ca2..fb004b781cf0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts @@ -625,6 +625,9 @@ export interface Connection { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -642,6 +645,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. */ username?: string; @@ -654,13 +660,23 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts index 6b5ef7baffcb..5ea053501885 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts @@ -6536,6 +6536,9 @@ export enum AuthMechanismEnum { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -6653,6 +6656,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for authenticating with Dremio Software. This user should have appropriate @@ -6676,16 +6682,26 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. * * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts index e3a4993f1bef..c95cd0d96a3f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts @@ -6667,6 +6667,9 @@ export enum AuthMechanismEnum { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -6784,6 +6787,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for authenticating with Dremio Software. This user should have appropriate @@ -6807,16 +6813,26 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. * * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts index 5ad78a5a296e..f121b76e1602 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts @@ -698,6 +698,9 @@ export interface PurpleAuthentication { * Basic Auth Credentials * * Access Token Auth Credentials + * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. */ export interface Authentication { /** @@ -708,6 +711,8 @@ export interface Authentication { /** * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. + * + * Client ID of the Tableau connected app. */ clientId?: string; /** @@ -750,6 +755,9 @@ export interface Authentication { password?: string; /** * Username to access the service. + * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. */ username?: string; /** @@ -760,6 +768,14 @@ export interface Authentication { * Personal Access Token Secret. */ personalAccessTokenSecret?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; } /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/testSuitePipeline.ts b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/testSuitePipeline.ts index ff3333f0d7ac..fff44516bb15 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/testSuitePipeline.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/testSuitePipeline.ts @@ -2899,6 +2899,9 @@ export enum AuthProvider { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -3016,6 +3019,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for authenticating with Dremio Software. This user should have appropriate @@ -3039,16 +3045,26 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. * * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/workflow.ts b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/workflow.ts index c42d3012f791..7457407d3330 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/workflow.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/metadataIngestion/workflow.ts @@ -2912,6 +2912,9 @@ export enum AuthProvider { * * Access Token Auth Credentials * + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + * * Choose Basic Auth (username/password) for on-premise or OAuth 2.0 Client Credentials for * SAP S/4HANA Cloud. * @@ -3029,6 +3032,9 @@ export interface AuthenticationType { /** * Username to access the service. * + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + * * Username to authenticate with SAP S/4HANA. * * Username for authenticating with Dremio Software. This user should have appropriate @@ -3052,16 +3058,26 @@ export interface AuthenticationType { */ personalAccessTokenSecret?: string; /** - * Authentication type identifier. - */ - authType?: AuthType; - /** + * Client ID of the Tableau connected app. + * * OAuth 2.0 client ID registered in SAP. * * Service Principal Application ID created in your Databricks Account Console for OAuth * Machine-to-Machine authentication. */ clientId?: string; + /** + * ID of the connected app secret. + */ + secretId?: string; + /** + * Value of the connected app secret. + */ + secretValue?: string; + /** + * Authentication type identifier. + */ + authType?: AuthType; /** * OAuth 2.0 client secret. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/security/credentials/tableauConnectedAppAuth.ts b/openmetadata-ui/src/main/resources/ui/src/generated/security/credentials/tableauConnectedAppAuth.ts new file mode 100644 index 000000000000..76e03b4a4f5f --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/generated/security/credentials/tableauConnectedAppAuth.ts @@ -0,0 +1,35 @@ +/* + * Copyright 2026 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT + * with the secret and signs in as the given Tableau user. + */ +export interface TableauConnectedAppAuth { + /** + * Client ID of the Tableau connected app. + */ + clientId: string; + /** + * ID of the connected app secret. + */ + secretId: string; + /** + * Value of the connected app secret. + */ + secretValue: string; + /** + * Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud + * this is the user's email address. + */ + username: string; +} diff --git a/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/testSuitePipeline.json b/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/testSuitePipeline.json index 7823630ac9a8..e7c40cd158c5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/testSuitePipeline.json +++ b/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/testSuitePipeline.json @@ -1215,6 +1215,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, @@ -14746,6 +14782,9 @@ }, { "$ref": "#/definitions/serviceConnections/properties/serviceConnection/oneOf/1/properties/config/oneOf/6/properties/authType/oneOf/1" + }, + { + "$ref": "#/definitions/serviceConnections/properties/serviceConnection/oneOf/1/properties/config/oneOf/6/properties/authType/oneOf/2" } ] }, diff --git a/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/workflow.json b/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/workflow.json index 8e8a0704007e..dd04804343c8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/workflow.json +++ b/openmetadata-ui/src/main/resources/ui/src/jsons/ingestionSchemas/workflow.json @@ -6737,6 +6737,42 @@ "personalAccessTokenSecret" ], "additionalProperties": false + }, + { + "title": "TableauConnectedAppAuth", + "description": "Tableau connected app (direct trust) credentials. OpenMetadata signs a short-lived JWT with the secret and signs in as the given Tableau user.", + "type": "object", + "javaType": "org.openmetadata.schema.security.credentials.TableauConnectedAppAuth", + "properties": { + "clientId": { + "title": "Client ID", + "description": "Client ID of the Tableau connected app.", + "type": "string" + }, + "secretId": { + "title": "Secret ID", + "description": "ID of the connected app secret.", + "type": "string" + }, + "secretValue": { + "title": "Secret Value", + "description": "Value of the connected app secret.", + "type": "string", + "format": "password" + }, + "username": { + "title": "Username", + "description": "Tableau user to sign in as; ingestion runs with this user's permissions. On Tableau Cloud this is the user's email address.", + "type": "string" + } + }, + "required": [ + "clientId", + "secretId", + "secretValue", + "username" + ], + "additionalProperties": false } ] }, @@ -19748,6 +19784,9 @@ }, { "$ref": "#/definitions/source/properties/serviceConnection/oneOf/1/properties/config/oneOf/6/properties/authType/oneOf/1" + }, + { + "$ref": "#/definitions/source/properties/serviceConnection/oneOf/1/properties/config/oneOf/6/properties/authType/oneOf/2" } ] },