You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ecff569
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add Workload Identity Federation (WIF) support to connection update (#1887)
* @W-24145082 - Add WIF workgroupAuthMode and authFederationServiceAccount to connection update
The Tableau REST API's update-connection endpoints for workbooks and
datasources (REST API 3.30+) accept two new XML attributes on
<connection> payloads for Workload Identity Federation:
- workgroupAuthMode: "workload-identity-federation" (direct, e.g. Snowflake)
or "workload-identity-federation-impersonation" (impersonation, e.g.
BigQuery)
- authFederationServiceAccount: service account email, required for
impersonation only
Expose both as string properties on ConnectionItem and emit them from
RequestFactory.Connection.update_req (the shared builder used by
workbooks, datasources, and flows for both single and bulk variants).
Also expose two constants on the public API:
WORKGROUP_AUTH_MODE_WIF, WORKGROUP_AUTH_MODE_WIF_IMPERSONATION.
Tests cover direct and impersonation variants against workbook and
datasource update-connection endpoints.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: apply black formatting
Collapse auth_federation_service_account assignment onto a single line
per the project's 120-char limit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: add CHANGELOG entry for WIF connection update
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: use googlebigquery and add WIF response attrs in test assets
Address review on #1887: datasource WIF asset was carrying the legacy
"bigquery" connector class, and both WIF assets referenced a 404
schemaLocation URL. Switch the datasource asset to the current
"googlebigquery" class, drop the broken schemaLocation reference, and
populate both WIF response assets with workgroupAuthMode (and
authFederationServiceAccount where impersonation applies) so the new
from_response coverage actually exercises WIF parsing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: nest WIF value set under ConnectionItem and extend to bulk and flows
Address review on #1887:
* Replace the two module-level WORKGROUP_AUTH_MODE_WIF* constants with
a nested value set at ConnectionItem.WorkgroupAuthMode (WIF /
WIF_IMPERSONATION) and drop the top-level reexports from
tableauserverclient and tableauserverclient.models. The nested class
carries the usage rules (resend on every update, no service account
with direct mode, auth_type unset or "oauth", server echo caveat).
* Extend the two bulk endpoints to really support WIF:
workbooks.update_connections and datasources.update_connections now
accept workgroup_auth_mode and auth_federation_service_account
keyword arguments, and both Workbook.update_connections_req and
Datasource.update_connections_req builders emit them on the shared
<connection> payload applied to every connection LUID.
* Document on flows.update_connection that WIF fields on the
ConnectionItem reach the endpoint via the shared Connection.update_req
builder and that server-side handling on flow connections may differ
from workbook / datasource endpoints.
* Rewrite the WIF test suite to cover: parametrized direct and
impersonation happy paths, OAuth to WIF switch, cleared-fields non
emission, service-account-without-mode permissive emit,
from_response WIF parsing, from_response absent (older servers), and
bulk WIF forwarding. Add a flow WIF test exercising the shared
builder reach.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: expand WIF guidance in CHANGELOG
Address review on #1887: expand the Unreleased CHANGELOG entry to name
the new nested value set (ConnectionItem.WorkgroupAuthMode.WIF /
WIF_IMPERSONATION), note that the bulk workbooks.update_connections
and datasources.update_connections endpoints now accept the matching
keyword arguments, add flows.update_connection to the list of
endpoints that forward WIF, state the usage rules (resend on every
update, no service account with direct mode, auth_type unset or
"oauth", server does not echo on GET today), and clarify that "3.30+"
is a Tableau Server REST API version (26.3 server release) and that
older servers silently ignore unknown connection attributes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments