Redirecting users away from signin page when embedding Tableau 9.0 and later

When embedding Tableau Server vizes into a web application, you may want to make sure the user never sees the Tableau login / signin page. In version prior to 9.0, you could capture any request for that page via a reverse proxy. In 9.0 and beyond, most pages are actually loaded dynamically from a single root page — for example, when you go to

http://localhost/#/signin

The page that is actually loaded is ‘/’ , with the ‘#/signin’ portion being read by the Tableau Server web application, resulting in the rest of the content being loaded dynamically. In some sense, you never leave the root page despite the content changing. These parameters are not something that is easily captured with a proxy rewrite rule.

When the Tableau Server session times out, there is an actual GET request to “/signin”, which can be captured. It initially results in a 302 redirect to “/#/signin”, which can be captured via the proxy and instead redirect to the web application signin page.

But if a user goes directly to “http://tableauserverurl/#/signin”, there is no redirect. The solution is, much like disabling the ability to change the password, in the C:\Program Files\Tableau\Tableau Server\{}\vizportalclient\public\ folder. There are language specific folders (en, de, es, etc.) and you’ll need to do the following for each language folder.

Inside each language folder, there is a “login.html” file. If you add


<script type="text/javascript">
window.location.href = 'http://webapplicationurl/signinpage';
</script>

at the beginning, it will redirect. Now, this isn’t the first thing that loads, so there may be a moment where the page is actually visible. To make it completely clean, you can remove all of the other HTML in the login.html page so that the ONLY content is the redirect JavaScript.

In later versions (9.1+): There are .gz versions of each file which are read off rather than the .html versions, as well as caching set up in the Apache Server itself. Please follow the steps in Disabling Browser and Apache Caching to See Your Changes to Tableau Server for your changes to be made and deployed.

Always save the original version of the file somewhere.

Always save your customized version and be ready to replace when you do an upgrade to even a security release. The Tableau Server UI pages are deployed during each install and you will lose your customized pages; plan a process to put them back in place.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s