通过身份验证嵌入 Tableau
Embed Tableau with Authentication
我需要将画面报告嵌入到另一个网页中。我们正在使用画面 JS:
http://onlinehelp.tableau.com/current/server/en-us/embed_code.htm
问题是:是否有一个身份验证选项,我们的应用程序(网页)可以将身份验证凭据传递给 Tableau,这样用户就不需要输入凭据?
谢谢!
您可能正在寻找受信任的身份验证,如所述here:
When you embed Tableau Server views into webpages, everyone who visits
the page must be a licensed user on Tableau Server. When users visit
the page they are prompted to sign in to Tableau Server before they
can see the view. If you already have a way of authenticating users on
the webpage or within your web application, you can avoid this prompt
and save your users from having to sign in twice by setting up trusted
authentication.
有also an example showing how to use it:
If you are working with Tableau Server, and if the server is
configured to use trusted authentication, specify the ticket in the
URL by first adding trusted after the server name, followed by the
ticket. For example:
var placeholderDiv = document.getElementById("tableauViz");
var url = "http://tabserver/trusted/Etdpsm_Ew6rJY-9kRrALjauU/views/workbookname/viewname";
var options = {
hideTabs: true,
width: "800px",
height: "700px"
};
var viz = new tableau.Viz(placeholderDiv, url, options);
我知道这已经很老了,但以上并不是唯一的答案。
新答案:新的v3 Embedding API from Tableau引入了一个新的HTML网络组件:<tableau-viz>
。您可以在 <tableau-viz>
元素的“令牌”属性 中传递 JWT,以便为 Tableau 用户授权嵌入式视图,而无需用户主动登录到 Tableau。
旧的,但仍然有效,答案:
如果您使用的是 Tableau Online,您有两个选择:
- 创建可视化 public,然后像示例代码一样使用嵌入 URL,或者
- 如果您想要或需要在身份验证后保护您的可视化,而无需用户在每次可视化时出示凭据(根据您的问题,这似乎是您的计划),您可以在 Tableau Online 中使用 IdP/SSO Okta、AD、Salesforce 等提供商。查看以下文档:
https://help.tableau.com/current/online/en-us/saml_config_site.htm
设置 Tableau Online SAML 身份验证后,您需要为 IdP/SSO 平台设置一个登录 In/Authentication 页面。大多数平台都会有一个用于集成的登录页面,或者您可以设置自己的登录页面。如果您自己设置,通常需要添加大量代码来进行身份验证。
只要用户在 IdP/SSO 平台中通过 Tableau Online SAML 身份验证访问权限进行身份验证,Tableau Online 可视化项就不应要求用户输入其凭据,因为他们也已“登录”到 Tableau Online(通过 IdP/SSO 平台)。
我需要将画面报告嵌入到另一个网页中。我们正在使用画面 JS:
http://onlinehelp.tableau.com/current/server/en-us/embed_code.htm
问题是:是否有一个身份验证选项,我们的应用程序(网页)可以将身份验证凭据传递给 Tableau,这样用户就不需要输入凭据?
谢谢!
您可能正在寻找受信任的身份验证,如所述here:
When you embed Tableau Server views into webpages, everyone who visits the page must be a licensed user on Tableau Server. When users visit the page they are prompted to sign in to Tableau Server before they can see the view. If you already have a way of authenticating users on the webpage or within your web application, you can avoid this prompt and save your users from having to sign in twice by setting up trusted authentication.
有also an example showing how to use it:
If you are working with Tableau Server, and if the server is configured to use trusted authentication, specify the ticket in the URL by first adding trusted after the server name, followed by the ticket. For example:
var placeholderDiv = document.getElementById("tableauViz");
var url = "http://tabserver/trusted/Etdpsm_Ew6rJY-9kRrALjauU/views/workbookname/viewname";
var options = {
hideTabs: true,
width: "800px",
height: "700px"
};
var viz = new tableau.Viz(placeholderDiv, url, options);
我知道这已经很老了,但以上并不是唯一的答案。
新答案:新的v3 Embedding API from Tableau引入了一个新的HTML网络组件:<tableau-viz>
。您可以在 <tableau-viz>
元素的“令牌”属性 中传递 JWT,以便为 Tableau 用户授权嵌入式视图,而无需用户主动登录到 Tableau。
旧的,但仍然有效,答案:
如果您使用的是 Tableau Online,您有两个选择:
- 创建可视化 public,然后像示例代码一样使用嵌入 URL,或者
- 如果您想要或需要在身份验证后保护您的可视化,而无需用户在每次可视化时出示凭据(根据您的问题,这似乎是您的计划),您可以在 Tableau Online 中使用 IdP/SSO Okta、AD、Salesforce 等提供商。查看以下文档:
https://help.tableau.com/current/online/en-us/saml_config_site.htm
设置 Tableau Online SAML 身份验证后,您需要为 IdP/SSO 平台设置一个登录 In/Authentication 页面。大多数平台都会有一个用于集成的登录页面,或者您可以设置自己的登录页面。如果您自己设置,通常需要添加大量代码来进行身份验证。
只要用户在 IdP/SSO 平台中通过 Tableau Online SAML 身份验证访问权限进行身份验证,Tableau Online 可视化项就不应要求用户输入其凭据,因为他们也已“登录”到 Tableau Online(通过 IdP/SSO 平台)。