Auto Sign in to Tableau Server through Iframe

江枫思渺然 提交于 2021-02-10 03:16:20

问题


I am attempting embed a guest user's login to my Tableau Server's application. The embed code looks like the following. I know that I need some sort of jQuery that will pass a username and a password to the div, I am just not quite sure how to do that.

<script type='text/javascript' src='https://tableau.quantgov.org/javascripts/api/viz_v1.js'></script> 
<div class='tableauPlaceholder' style='width: 1000px; height: 827px;'>
  <object class='tableauViz' width='1000' height='827' style='display:none;'>
  <param name='host_url' value='https%3A%2F%2Ftableau.quantgov.org%2F' /> 
  <param name='embed_code_version' value='3' /> <param name='site_root' value='' />
  <param name='name' value='SignificantRulesTracker&#47;Dashboard1' />
  <param name='tabs' value='no' /><param name='toolbar' value='yes' />
  <param name='showAppBanner' value='false' />
  </object>
</div>

That embed code leads to a need for user authentication. Since I have no want to make the visualization private, I would like to embed credentials that auto-sign in anyone who uses the page and has cookies enabled. A few important notes, I already have the SAML authentication set up as well as the user. I also cannot use Tableau Public as I need some features from Tableau Server. The following page: quantgov.org/embed-test has a live example of this embed.


回答1:


The default behavior when embedding a view using SAML or OpenID Connect authentication is to display a "Sign in to " button in the frame. Clicking this button will open a new window where authentication with the IdP will then happen. To avoid the button, use a different solution like Guest User or Trusted Authentication...

Or, if supported, you can config your server for in-frame authentication which will suppress the button.

More in this Tableau KB article




回答2:


I wanted to follow up with this question after some time. Tableau makes what I was trying to do EXTREMELY difficult and I highly suggest that any small to medium size data shop that is looking to produce public facing data visualizations looks a different route than Tableau.

After a good deal of digging and talking to support. Tableau Server is the only product in the Tableau family that provides the ability for SAML authentication that is embedded within visualizations. The catch is that specific feature is not available to an individual that only purchases a small amount of server keys. To make this happen, an organization needs to purchase an extremely high amount of keys. So in essence, the code was never really an issue here. It ended up being very unclear documentation on the Tableau side about the capabilities that come with certain purchased packages.



来源:https://stackoverflow.com/questions/62804090/auto-sign-in-to-tableau-server-through-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!