Skip to content

Fixes 33371: Tableau connected app (direct trust JWT) sign-in - #37084

Merged
akashverma0786 merged 14 commits into
mainfrom
feat/tableau-connected-app-jwt
Nov 17, 2026
Merged

akashverma0786 merged 14 commits into
mainfrom
feat/tableau-connected-app-jwt

Conversation

@akashverma0786

@akashverma0786 akashverma0786 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #33371

The Tableau dashboard and Tableau pipeline connectors could sign in only with a username and password or a personal access token, and both belong to one person. This PR adds a third authType, TableauConnectedAppAuth, for Tableau connected apps that use direct trust. A site administrator creates the connected app and a secret. OpenMetadata then signs a short-lived JWT with that secret and signs in as the configured Tableau user.

The issue's proposal needed three corrections, all measured on Tableau Cloud 2026.3.2 (REST API 3.30):

  • Direct trust accepts only HS256 tokens signed with the connected app's secret value. An RS256 token is rejected at sign-in with 401001. RSA keys belong to OAuth 2.0 trust (EAS), which this PR does not cover.
  • The second positional parameter of TSC.JWTAuth is isUat, so site_id must be passed by keyword. Passing it positionally fails sign-in with 401001.
  • sub must be a real Tableau user, and every call runs with that user's permissions.

Type of change:

  • New feature

High-level design:

  • Schema. New security/credentials/tableauConnectedAppAuth.json with clientId, secretId, secretValue (format: password) and username, added to the authType oneOf of tableauConnection.json and tableauPipelineConnection.json. The Pydantic models, Java POJOs, UI TypeScript types and dereferenced UI schemas are regenerated; the connection form renders the new option from the schema.

  • Ingestion. build_server_config in dashboard/tableau/connection.py (the pipeline connector imports it) signs the JWT:

    • header: kid = secret ID, iss = client ID;
    • claims: iss = client ID, sub = username, aud = tableau, exp = 5 minutes, a uuid4 jti, and scp = the seven scopes both connectors need.

    It returns TSC.JWTAuth(jwt=..., site_id=...). The clients take TSC's Credentials base class. Each client signs in once, and the session outlives the token, so there is no refresh. The pipeline client's transport retries re-send that same token on a 429 or 5xx while it is still valid.

  • Fixed values. The scope set and the lifetime are module constants (CONNECTED_APP_SCOPES, CONNECTED_APP_JWT_LIFETIME), not configuration. ADR:2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt records why, and when to revisit.

  • Test connection. A connected-app connection gets its own error pack, chosen from authType when checks() builds the provider (without signing in). Basic and PAT connections keep their packs unchanged, which a test compares to main. The connected-app packs differ in three ways:

    • Tableau answers a call outside the token's scopes with the same 401002 "Invalid authentication credentials were provided." as bad credentials, so a 401 names the app's checks (client ID, secret, username, enabled, site, host clock) and the scopes.
    • The owner lookup swallows that 401, so "Owner information not available" names tableau:users:read.
    • Unreadable data models (dashboard) and a rejected lineage query (pipeline) name the Tableau Server 2023.3 floor for the Metadata API.
  • Server. TableauConnectionClassConverter lists the new class, and the TableauPipelineConnection entry in ClassConverterFactory reuses that same list. Without that, the server rejects a dashboard service with 400 "Cannot convert [LinkedHashMap]" and keeps a pipeline service's secret as an untyped map, unmasked and unencrypted. With it, the secret is stored fernet:-encrypted and returned masked.

  • Rejected alternatives.

    • RS256 with a private key: direct trust rejects it.
    • Configurable scopes or lifetime: nothing needs them yet.
    • Token refresh: the session outlives the token.
  • Compatibility. The new oneOf branch is additive, Basic and PAT behave as before, and no migration is needed because stored connections keep their auth types.

  • Tableau Server. Per Tableau's documentation (not live-tested): REST sign-in with a connected app from 2022.3, Metadata API from 2023.3. sub is the user name, not the email, and a new app starts disabled. The connector docs say this.

Tests:

Use cases covered

  • A Tableau dashboard service and a Tableau pipeline service sign in with a direct trust connected app, and test connection plus metadata ingestion give the same result as a PAT on the same site.
  • A wrong secret, a disabled app, and a token without the needed scopes are diagnosed by test connection, and a wrong PAT still gets the PAT hint.
  • The server stores the new secret encrypted and returns it masked.

Unit tests

  • I added unit tests for the new/changed logic.
  • ingestion/tests/unit/source/dashboard/tableau/test_connection.py:
    • JWT shape: HS256, kid/iss header, iss/sub/aud/scp claims, and exp 5 minutes after signing, bracketed around the call so a slow machine cannot flake it;
    • a new jti per sign-in;
    • the connected-app 401, owner and data-model hints;
    • PAT connections keep their hints.
  • ingestion/tests/unit/topology/pipeline/test_tableaupipeline_connection.py: the same token through the pipeline connection config, the connected-app sign-in and lineage hints, and PAT connections keeping theirs.
  • ingestion/tests/utils/tableau_connected_app.py: the shared test credentials, the expected scopes, and the fake Tableau sign-in used by these tests and both integration fakes.
  • openmetadata-service/src/test/java/org/openmetadata/service/secrets/converter/TableauConnectionClassConverterTest.java: a raw authType map becomes TableauConnectedAppAuth for both connections.
  • Red on main.
    • The 8 new connected-app tests fail with ValidationError on authType. The 2 PAT guard tests pass on main, as they must.
    • The Java test does not compile on main. With the schema change but not the converter change, the dashboard case fails with Cannot convert [LinkedHashMap] and the pipeline case stays a LinkedHashMap.
  • Mutation check. A 9-minute lifetime, a constant jti, and a missing kid header each make the tests fail. A 2-second stall inside signing does not.
  • PAT and Basic hints. All 20 PAT/Basic diagnoses (title, remediation, doc) are byte-identical to main.
  • Results.
    • pytest on all 10 Tableau unit test files: 324 passed.
    • Coverage (--cov): dashboard/tableau/connection.py 92%, with every new line covered (the misses are older Basic/SSL branches); pipeline/tableaupipeline/connection.py 99%.

Backend integration tests

  • Not applicable (no backend API changes); the converter change is covered by the impacted ITs below.

The run below is on 73baba6df4c. The later commit, 57b301c5982, changes no Java, schema or pom file. Every test it executed passed: 101 unit tests and 5472 integration tests, 0 failures. The block reads FAILED only because 4 selected classes produced no report: CredentialAuthBenchIT, CredentialMemoryIT, CredentialPatBurstIT and CredentialSweepCostIT are @Tag("scale"), which the IT pom's excludedGroups=scale keeps out of every lane; they belong to the nightly scale suite. IngestionPipelineServiceProgressIT#serviceStreamAppliesPolicyChangesWithoutReconnecting timed out once in an earlier run on the same Java (SocketTimeoutException: Read timed out, 93 classes in parallel). It uses a Postgres service, not Tableau, passed 13/13 alone, and passed in every run since: 1 failure in 5 runs.

Local Java test run: FAILED

  • Commit: 73baba6df4c7 (base origin/main)
  • Finished: 2026-11-04 16:42 UTC · 45.0 min
Step Scope Classes Tests Failed Skipped Min Result
unit openmetadata-service (12 classes) 12 101 0 0 1.5 passed
integration mysql-elasticsearch · parallel 93 5203 0 564 15.7 FAILED
integration mysql-elasticsearch · isolated 12 237 0 2 15.4 passed
integration mysql-elasticsearch · rdf 2 18 0 0 7.6 passed
integration cache-tests · isolated 3 14 0 0 4.8 passed

Selected but produced no report: CredentialAuthBenchIT (mysql-elasticsearch · parallel), CredentialMemoryIT (mysql-elasticsearch · parallel), CredentialPatBurstIT (mysql-elasticsearch · parallel), CredentialSweepCostIT (mysql-elasticsearch · parallel)

  • Impacted, not run locally: 3 classes (listed in the details)

Ingestion integration tests

  • I added/updated ingestion integration tests for connector changes.
  • I ran the integration tests covering my changed files locally.
  • ingestion/tests/integration/tableau/conftest.py and ingestion/tests/integration/tableaupipeline/conftest.py: the fake Tableau sign-in, shared from tests/utils/tableau_connected_app.py, checks a connected-app JWT the way Tableau does (HS256 with the secret, kid, iss, aud, required claims) and answers 401 otherwise. Every existing workflow test runs once with a PAT and once with the connected app.
  • The pipeline warehouse tables are rebuilt per auth type. Measured on the server: after a recursive hard delete of the previous run's pipeline service, a table-to-table edge still points at the deleted pipeline, and the next run's edge for the same pair does not replace it.
  • tests/integration/tableau + tests/integration/tableaupipeline: 30 passed. On main the 14 connected_app runs error with ParsingConfigurationError, and the 14 PAT runs pass.

Playwright (UI) tests

  • Not run locally. There is no UI code change: the connection form renders the new option from the regenerated schema. make playwright_affected selects about 50 specs because the regenerated schema JSONs feed many pages; the merge queue runs the full suite.

Manual testing performed

On Tableau Cloud 2026.3.2 (REST API 3.30), against a server built from this branch with its own MySQL and Elasticsearch:

  1. With a site administrator's PAT, created a Direct Trust connected app and a secret through the REST API. After each run, deleted the app after a fresh PAT sign-in, and GET .../connected-applications returned {}.
  2. Ran each arm below 3 times through the connector's own path (config → get_connection → test connection), with a PAT control each time. Every arm gave the same result in all 3 trials.
Arm Dashboard test connection Pipeline test connection
PAT control Successful, 8/8 steps Successful, 4/4 steps
Connected app Successful, 8/8 steps (same as PAT) Successful, 4/4 steps (same as PAT)
Wrong secret value ServerInfo fails: "Authentication failed", hint names the connected-app checks and the host clock GetPipelines fails: "Authentication failed", same hint
Token with only tableau:content:read GetOwners warns: "Owner information not available", hint names tableau:users:read GetPipelines fails: "Authentication failed", hint names tableau:flows:read
Disabled connected app ServerInfo fails: "Authentication failed", hint asks to check the app is enabled GetPipelines fails: "Authentication failed", same hint
Wrong PAT secret ServerInfo fails: "Authentication failed", PAT hint only GetPipelines fails: "Authentication failed", PAT hint only
  1. Ran metadata ingest -c <yaml> for the dashboard and the pipeline connector with a PAT and with the connected app, 3 trials each, each arm on fresh services:
Dashboards Charts Data models Pipelines Lineage edges
PAT 11 26 38 18 88
Connected app 11 26 38 18 88

Every run exited 0 at 100% success, the lineage edge sets were identical (not just the counts), and the test connection inside each run was Successful.
4. Searched the ingestion logs, DEBUG-level test connection logs and the test connection results, for valid and wrong secrets, for the secret value and any JWT: 0 hits.
5. Created services with the new authType on the branch server: secretValue is stored fernet:-encrypted and returned masked to an admin.

UI screen recording:

Not applicable — no UI code changed. The Tableau connection form renders the new authentication option from the regenerated schema (generated TypeScript types and dereferenced connection JSON), and the field help comes from the connector Markdown docs.

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR title is Fixes <issue-number>: <short explanation>

  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.

  • I have commented on my code, particularly in hard-to-understand areas.

  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. Not needed: the new oneOf branch is additive and stored connections keep their auth types.

  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable). Not applicable, see above.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    Reviewed 57b301c5982 (four passes in total, one after each change). Fixed:

    • PAT/Basic hints are back to their exact main text.
    • The shared test fake replaces the copies.
    • The exp check can no longer flake.
    • One Java auth list serves both converters.
    • The connected-app hints name the Server 2023.3 floor and the host clock.
    • The ADR states the retry behavior.

    Answered instead of fixed:

    • 🔴 Collate's Tableau reverse metadata reuses this connection and writes workbook descriptions, owners and tags, which the read-only connected-app token does not allow. Deferred to a follow-up; Basic and PAT services are unaffected.
    • 🟡 The JWT assertions are written out in both unit tests: pytest rewrites asserts only in test modules, so a shared helper would lose the failure diffs, and the pipeline config gets the full check on its own.
    • 🟡 The ponytail: comment marks the fixed scope set as a deliberate limit, and the ADR records when to revisit it.
  • Decision check: ADR:2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt records the fixed scope set, the five-minute lifetime, HS256 direct trust only, and the Tableau Server floor.

  • The issue properly describes why the new feature is needed, what's the goal, and how we are building it. The corrections to its proposal are listed above.

  • I have updated the documentation (public/locales/en-US/Dashboard/Tableau.md, Pipeline/TableauPipeline.md).

  • I have added tests around the new logic.

RetriggerView in GreptileConfidence Score: 5/5

The changes appear safe to merge; both previous findings are fixed and no new actionable issue remains.

Summary

Adds Tableau connected-app sign-in to the dashboard and pipeline connectors, with shared credentials, JWT signing, server-side secret conversion, and setup documentation.

  • Tableau connectors can sign in with a connected app as a configured user.
  • Connected-app test connections explain Tableau sign-in and permission failures.
  • Both Tableau service types recognize connected-app credentials as typed secrets.

This review used source inspection; no tests were run.

Diagram

sequenceDiagram
    participant P as Pipeline client
    participant B as build_server_config
    participant T as Tableau
    P->>T: Read metadata
    T-->>P: 401
    P->>B: Build credentials from saved configuration
    B-->>P: JWT with fresh expiry and jti
    P->>T: Sign in
    T-->>P: New session
    P->>T: Retry original read once
Loading

Reviews (6) · Last reviewed commit: "fix(tableaupipeline): sign a fresh conne..." · Reviewed by Greptile

Tableau connected apps (direct trust) let an admin give OpenMetadata
a credential that is not a person's password or PAT.

- TableauConnectedAppAuth (clientId, secretId, secretValue, username),
  shared by the dashboard and pipeline connections
- build_server_config signs a 5-minute HS256 JWT carrying the 7 scopes
  both connectors need; site_id is passed to TSC.JWTAuth by keyword
  because its second positional parameter is isUat
- Java converters type the new authType so the secret is masked and
  encrypted
- 401 and owner test-connection hints name the connected-app checks
- ADR:2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt

Fixes #33371
- Connected-app connections get their own test-connection error pack,
  so Basic and PAT connections keep their original hints
- One Tableau authType class list serves both Java converters
- The clients and build_server_config take TSC's Credentials base class
- tests/utils/tableau_connected_app.py replaces the copies in both
  integration fakes and both unit test files
- The exp assertion brackets the signing call, so a slow machine cannot
  push it past the bound

Refs #33371
Tableau Server before 2023.3 refuses connected-app sessions on the
Metadata API, so the data-model and flow-lineage hints for a connected
app now say so instead of only asking to enable the Metadata API.
Basic and PAT hints are unchanged; their texts move into shared
constants so the connected-app variants extend them.

Refs #33371
A skewed clock makes Tableau refuse the token at sign-in, so the
connected-app rejection hint now asks to check it. The ADR states that
the pipeline client's transport retries re-send the token on a 429 or
5xx, and the tests share one scope-rejection fixture.

Refs #33371
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 1029 → 1029
- 0 added, 0 removed, 12 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/constant/config.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/domain/DataProduct.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/domain/Domain.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/userPages.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/polling.ts
  openmetadata-ui/src/main/resources/ui/src/components/common/NextPrevious/NextPrevious.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/NextPreviousWithOffset/NextPreviousWithOffset.tsx
  … and 2 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@pmbrull
pmbrull requested a review from a team as a code owner November 4, 2026 17:41
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@akashverma0786 akashverma0786 added the safe to test Add this label to run secure Github workflows on PRs label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ SSO Login Nightly — PASSED

View workflow run · Commit f762ff8

Provider Status Pass Fail Flaky Skip Duration
basic ✅ pass 28 0 0 0 6m 37s
ldap ✅ pass 7 0 0 0 1m 01s
keycloak-oidc-confidential ✅ pass 12 0 0 0 1m 40s
keycloak-oidc-public ✅ pass 11 0 0 0 1m 30s
msal-mock ✅ pass 7 0 0 0 0m 35s
auth0-mock ✅ pass 6 0 0 0 0m 57s
okta ⏩ skipped - - - - -
keycloak-azure-saml ✅ pass 23 0 0 0 5m 47s
keycloak-azure-saml-crosssite ⏩ skipped - - - - -

Totals: 94 passed · 0 failed · 0 flaky · 0 skipped · duration 18m 10s

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
81.32% (138057/169765) 68.33% (49767/72824) 71.37% (27959/39171)

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

Tableau's REST API reference adds the connected app scopes for Query Views for Workbook, Query Flows for a Site and Get Flow Runs in API 3.27 (Tableau Cloud December 2025 / Server 2025.3), so an older Tableau Server cannot serve the charts or flows the connectors read with a connected app token.
…d-app-jwt

# Conflicts:
#	ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py
… connected app JWT

Collate's reverse metadata reuses the Tableau connection to write workbook
descriptions, owners and tags, and view tags. With only the read scopes,
Tableau rejects each write with 401002. Add tableau:workbooks:update,
tableau:workbook_tags:update/delete and tableau:view_tags:update/delete,
measured on Tableau Cloud.
…Tableau

The fake accepted any sign-in without a JWT, so a connector that stopped sending its token would still pass both connected-app integration suites. Accept only the test PAT or a JWT that passes direct trust; answer anything else with 401.
…again

The pipeline client signed in again with the credentials it was built with. A connected app JWT expires five minutes after it is signed, so a session Tableau ended later in a run could not be renewed. Build the credentials again from the connection on each sign-in; a PAT or password is unchanged.
Comment on lines +216 to +217
# Fresh credentials: a connected-app JWT expires five minutes after it is signed.
self.tableau_server.auth.sign_in(build_server_config(self.config))

@gitar-bot gitar-bot Bot Nov 16, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Quality: Re-sign-in now builds new credentials; the Accepted ADR says the same ones

_sign_in_again no longer reuses the tableau_server_auth passed to the constructor. It now calls build_server_config(self.config) and signs in with what that returns, so a connected-app connection sends a newly signed JWT. The Accepted record ADR:2026-10-30-tableau-pipeline-sign-in-again still says the client signs in "once with the same credentials". Its Guard list doesn't name the new test, and its Consequences still say connected apps would make the rule unnecessary. This PR rewrites only the connected-app ADR's Context so it points at the old record, and leaves the old record contradicting the code.

The change itself is correct, because a JWT expires five minutes after it is signed. The fix is to revise the sign-in-again record to v2 so its Decision says: "A 401 on any call except /auth/ makes the client sign in once with credentials rebuilt from the connection config, so a connected-app sign-in carries a freshly signed JWT, and resend that call once." Also add ::test_a_connected_app_signs_in_again_with_a_fresh_token to its Guard list.

Revise the Decision and Guard lines of docs/decisions/2026-10-30-tableau-pipeline-sign-in-again.md:

- **Revisions:** v1 2026-10-30 (initial); v2 2026-11-04 (sign in again with credentials rebuilt from the config)
...
A 401 on any call except `/auth/` makes the client sign in once with credentials rebuilt from the
connection config (a connected app gets a freshly signed JWT) and send that call once more with the
new token.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown
Code Review ⚠️ Changes requested 🔴 High risk 0 closed / 1 findings

Adding Tableau direct-trust JWT authentication with workbook and tag write scopes could permit unintended reverse-metadata changes under the configured user's authority.

Fixes the pipeline client's sign-in-again path so a connected-app connection signs in with a freshly signed JWT instead of reusing the expired one.

Changes requested: the Accepted ADR ADR:2026-10-30-tableau-pipeline-sign-in-again still says the client signs in once with the same credentials, contradicting this change. Revise that record to v2, describing rebuilt credentials on re-sign-in and resending the failed call once, and add test_a_connected_app_signs_in_again_with_a_fresh_token to its Guard list.

⚠️ Quality: Re-sign-in now builds new credentials; the Accepted ADR says the same ones

📄 ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py:216-217 📄 docs/decisions/2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt.md:30-33

_sign_in_again no longer reuses the tableau_server_auth passed to the constructor. It now calls build_server_config(self.config) and signs in with what that returns, so a connected-app connection sends a newly signed JWT. The Accepted record ADR:2026-10-30-tableau-pipeline-sign-in-again still says the client signs in "once with the same credentials". Its Guard list doesn't name the new test, and its Consequences still say connected apps would make the rule unnecessary. This PR rewrites only the connected-app ADR's Context so it points at the old record, and leaves the old record contradicting the code.

The change itself is correct, because a JWT expires five minutes after it is signed. The fix is to revise the sign-in-again record to v2 so its Decision says: "A 401 on any call except /auth/ makes the client sign in once with credentials rebuilt from the connection config, so a connected-app sign-in carries a freshly signed JWT, and resend that call once." Also add ::test_a_connected_app_signs_in_again_with_a_fresh_token to its Guard list.

Revise the Decision and Guard lines of docs/decisions/2026-10-30-tableau-pipeline-sign-in-again.md
- **Revisions:** v1 2026-10-30 (initial); v2 2026-11-04 (sign in again with credentials rebuilt from the config)
...
A 401 on any call except `/auth/` makes the client sign in once with credentials rebuilt from the
connection config (a connected app gets a freshly signed JWT) and send that call once more with the
new token.
🤖 Prompt for agents
Code Review: Fixes the pipeline client's sign-in-again path so a connected-app connection signs in with a freshly signed JWT instead of reusing the expired one.
  
  Changes requested: the Accepted ADR `ADR:2026-10-30-tableau-pipeline-sign-in-again` still says the client signs in once with the same credentials, contradicting this change. Revise that record to v2, describing rebuilt credentials on re-sign-in and resending the failed call once, and add `test_a_connected_app_signs_in_again_with_a_fresh_token` to its Guard list.

1. ⚠️ Quality: Re-sign-in now builds new credentials; the Accepted ADR says the same ones
   Files: ingestion/src/metadata/ingestion/source/pipeline/tableaupipeline/client.py:216-217, docs/decisions/2026-11-04-tableau-connected-apps-sign-in-with-a-direct-trust-jwt.md:30-33

   `_sign_in_again` no longer reuses the `tableau_server_auth` passed to the constructor. It now calls `build_server_config(self.config)` and signs in with what that returns, so a connected-app connection sends a newly signed JWT. The Accepted record ADR:2026-10-30-tableau-pipeline-sign-in-again still says the client signs in "once with the same credentials". Its Guard list doesn't name the new test, and its Consequences still say connected apps would make the rule unnecessary. This PR rewrites only the connected-app ADR's Context so it points at the old record, and leaves the old record contradicting the code.
   
   The change itself is correct, because a JWT expires five minutes after it is signed. The fix is to revise the sign-in-again record to v2 so its Decision says: "A 401 on any call except `/auth/` makes the client sign in once with credentials rebuilt from the connection config, so a connected-app sign-in carries a freshly signed JWT, and resend that call once." Also add `::test_a_connected_app_signs_in_again_with_a_fresh_token` to its Guard list.

   Fix (Revise the Decision and Guard lines of docs/decisions/2026-10-30-tableau-pipeline-sign-in-again.md):
   - **Revisions:** v1 2026-10-30 (initial); v2 2026-11-04 (sign in again with credentials rebuilt from the config)
   ...
   A 401 on any call except `/auth/` makes the client sign in once with credentials rebuilt from the
   connection config (a connected app gets a freshly signed JWT) and send that call once more with the
   new token.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@akashverma0786
akashverma0786 merged commit 9dd2d96 into main Nov 17, 2026
70 checks passed
@akashverma0786
akashverma0786 deleted the feat/tableau-connected-app-jwt branch November 17, 2026 05:15
shah-harshit added a commit that referenced this pull request Nov 18, 2026
* test(playwright): refresh stale 2.1 visual baselines and fix shell menu scenes

Refresh 32 baselines from the 2.1 nightly (run 44266671648) actuals. Every
diff traces to an intended change that arrived with the main merge: Tableau
connected-app auth option (#37084), 400px entity summary panel (#37888),
unified CopyButton (#37953), new Insights/AdvancedSearch icons (#37973),
Data Estate connector counts (#37910) and the users Name/Email columns
(#37127, #37998).

shell-profile-menu and shell-mode-menu waited for my-data-page, which
#38077 removed from /my-data in AI mode; wait for home-landing-page.

* test(playwright): complete 2.1 shell and expanded Tableau baselines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support Tableau Cloud Connected App (JWT) authentication

5 participants