Tableau OAuth setup(Tableau OAuth 设置)¶
Tableau supports authenticating to Foundry via OAuth. This means that users will not need to manually enter a token, but can instead be prompted to log in to Foundry through a web browser. See Tableau's OAuth Connections ↗ article for an overview of OAuth in Tableau.
:::callout{theme="neutral"} Foundry administrator permissions are required to enable this OAuth integration. Additionally, if you are enabling the OAuth integration for Tableau Server, Tableau administrator permissions are required, and Tableau Server must be restarted. :::
Part 1: Enable the OAuth client for Tableau Desktop¶
- Follow the instructions to access the Third-party applications configuration page in Control Panel.
- Find Tableau Desktop in the list of applications; from the Actions menu, select Enablement settings.
- Enable the application using the toggle switch.
:::callout{theme="neutral"} When Tableau users authenticate to Foundry using OAuth, individual user permissions are enforced. If you used the Project access or Marking restrictions panels to configure restrictions for the third-party application, these restrictions apply on top of the user's individual permissions. :::
At this point, Tableau Desktop users can follow the instructions to authenticate to Foundry using OAuth.
Part 2: Configure an OAuth client for Tableau Server¶
Follow the instructions below to enable OAuth authentication for reports published to Tableau Server.
Step 1: Register a third-party application for Tableau Server¶
On the same Third-party applications page as above, select New application to create a new third-party application:
- At the Details step, name the application
<ORGANIZATION> Tableau Server, substituting your own organization name. - At the Client type step, select Confidential client.
- At the Authorization grant type step, select Authorization code grant and set the Redirect URL to
https://<YOUR_SERVER>/auth/add_oauth_token, where<YOUR_SERVER>is your Tableau Server hostname.
Create the app and securely store the client ID and secret.
Step 2: Configure Tableau Server¶
Run the following command on the server, substituting your client ID, secret, and redirect URL from the previous step:
tsm configuration set -k oauth.config.clients -v "[{\"oauth.config.id\":\"FoundryJdbc\", \"oauth.config.client_id\":\"<YOUR_CLIENT_ID>\", \"oauth.config.client_secret\":\"<YOUR_CLIENT_SECRET>\", \"oauth.config.redirect_uri\":\"https://<YOUR_TABLEAU_SERVER>/auth/add_oauth_token\"}]" --force-keys
Step 3: Restart Tableau Server¶
Restart Tableau Server by running:
tsm pending-changes apply
Usage¶
Tableau Desktop¶
From within Tableau Desktop, users will now be able to follow the instructions to authenticate via the Foundry OAuth authentication option.
Tableau Server¶
When publishing to Tableau Server, it is possible to configure the report to prompt viewers to authenticate via OAuth when opening the report. This way, live queries will run using the viewer's permissions.
To configure this, develop the report in Tableau Desktop using the Foundry OAuth authentication option. When you are ready to publish, choose the Prompt option for authentication. When a user views the report on Tableau Server, live connections will refresh using the viewer's credentials.
中文翻译¶
Tableau OAuth 设置¶
Tableau 支持通过 OAuth 对 Foundry 进行身份验证。这意味着用户无需手动输入令牌,而是可以通过网页浏览器提示登录 Foundry。有关 Tableau 中 OAuth 的概述,请参阅 Tableau 的 OAuth 连接 ↗ 文章。
:::callout{theme="neutral"} 启用此 OAuth 集成需要 Foundry 管理员权限。此外,如果为 Tableau Server 启用 OAuth 集成,则需要 Tableau 管理员权限,并且必须重启 Tableau Server。 :::
第一部分:为 Tableau Desktop 启用 OAuth 客户端¶
- 按照说明访问控制面板中的第三方应用程序配置页面。
- 在应用程序列表中找到 Tableau Desktop;从操作菜单中选择启用设置。
- 使用切换开关启用该应用程序。
:::callout{theme="neutral"} 当 Tableau 用户通过 OAuth 对 Foundry 进行身份验证时,会强制执行单个用户权限。如果您使用项目访问或标记限制面板为第三方应用程序配置了限制,这些限制将叠加在用户的个人权限之上。 :::
此时,Tableau Desktop 用户可以按照说明使用 OAuth 对 Foundry 进行身份验证。
第二部分:为 Tableau Server 配置 OAuth 客户端¶
按照以下说明为发布到 Tableau Server 的报表启用 OAuth 身份验证。
步骤 1:为 Tableau Server 注册第三方应用程序¶
在上述相同的第三方应用程序页面上,选择新建应用程序以创建新的第三方应用程序:
- 在详细信息步骤中,将应用程序命名为
<ORGANIZATION> Tableau Server,替换为您自己的组织名称。 - 在客户端类型步骤中,选择机密客户端。
- 在授权授权类型步骤中,选择授权码授权,并将重定向 URL 设置为
https://<YOUR_SERVER>/auth/add_oauth_token,其中<YOUR_SERVER>是您的 Tableau Server 主机名。
创建应用程序并安全存储客户端 ID 和密钥。
步骤 2:配置 Tableau Server¶
在服务器上运行以下命令,替换上一步中的客户端 ID、密钥和重定向 URL:
tsm configuration set -k oauth.config.clients -v "[{\"oauth.config.id\":\"FoundryJdbc\", \"oauth.config.client_id\":\"<YOUR_CLIENT_ID>\", \"oauth.config.client_secret\":\"<YOUR_CLIENT_SECRET>\", \"oauth.config.redirect_uri\":\"https://<YOUR_TABLEAU_SERVER>/auth/add_oauth_token\"}]" --force-keys
步骤 3:重启 Tableau Server¶
通过运行以下命令重启 Tableau Server:
tsm pending-changes apply
使用方式¶
Tableau Desktop¶
在 Tableau Desktop 中,用户现在可以按照说明通过 Foundry OAuth 身份验证选项进行身份验证。
Tableau Server¶
发布到 Tableau Server 时,可以配置报表,在用户打开报表时提示其通过 OAuth 进行身份验证。这样,实时查询将使用查看者的权限运行。
要配置此功能,请在 Tableau Desktop 中使用 Foundry OAuth 身份验证选项开发报表。准备发布时,选择提示选项进行身份验证。当用户在 Tableau Server 上查看报表时,实时连接将使用查看者的凭据刷新。