TM1Web 10.2 + CAM security – Multiple URLs for different TM1 servers.


In this post I will explain how to enable multiple TM1Web URLs for different TM1 servers. In my example, TM1 is configured to use CAM security (IntegratedSecurityMode=5). But you can follow similar steps for other security modes.

The result I needed to achieve was to be able to access TM1ServerName1 using the URL like tm1webhost.com/TM1ServerName1 and similarly, tm1webhost.com/TM1ServerName2 for TM1ServerName2.
Also I wanted to use the same single instance of Tomcat.

In 10.1 we could copy TM1Web folder and configure a new IIS virtual directory. In 10.2 we cannot do that. Using a single instance of Tomcat, we can have only one TM1Web URI, which is “External server URI “ in Cognos Configuration.
But we can implement multiple URIs using IIS rewrite mode and some TM1 system file tweaks. Let’s review it.
First of all, you have to install IIS URL Rewrite module. After that we can create rewrite rules. Examples:

1. Tm1Webhost/doc directory:

Pattern: doc
Ignore case, Stop processing of subsequent rules

2. TM1Webhost alias (containing “tm1web”)

Pattern: ^tm1web(.*)$
Ignore case
Action Type: Redirect
Redirect URL: http://tm1qa.cbc.ca:9510/{R:0}
Redirect Type: Temporary (307)
Append query string
Stop processing of subsequent rules

3. URLs for separate TM1 servers (assume each model starts from “tm1”)

This rule will redirect tm1webhost.com/tm1servername to tm1webhost.com:9510/tm1web?tm1servername
Pattern: ^tm1 (.*)$
Ignore case
Action Type: Redirect
Redirect URL: http://tm1qa.cbc.ca:9510/tm1web?{R:0}
Redirect Type: Temporary (307)
Append query string
Stop processing of subsequent rules

4. TM1Webhost alias (redirect everything else to TM1Web)

Pattern: (.*)
Ignore case
Action Type: Redirect
Redirect URL: http://tm1qa.cbc.ca:9510/tm1web{R:0}
Redirect Type: Temporary (307)
Append query string
Stop processing of subsequent rules

The next thing we need to modify tm1_64\webapps\tm1web\scripts\tm1web\standalone\TM1WebApp.js file to check for ?tm1servername URLparameter. Find the code:

window.location.href=_a576
+"?b_action=xts.run&m=portal/bridge.xts&c_env=portal/variables_TM1.xml&c_cmd=../tm1/web/tm1web.html&ps="+_a578+"&pg="+"applications.jsp"
+"&host="+this.host
+"&server="+this.serverName;

And replace it with:

var sTM1SERVER = this.serverName;
if(location.href.indexOf("?")>0) {sTM1SERVER = location.href.substring(location.href.indexOf("?")+1,location.href.length);}
window.location.href=_a576
+"?b_action=xts.run&m=portal/bridge.xts&c_env=portal/variables_TM1.xml&c_cmd=../tm1/web/tm1web.html&ps="+_a578+"&pg="+"applications.jsp"
+"&host="+this.host
+"&server="+sTM1SERVER;

We also need to to specify “TM1ServerName” parameter in “tm1web_config.xml” in order to avoid displaying the server selection page and restart “IBM Cognos TM1 Application Server” service.

Recent Posts

Recent Comments

Meta

Written by:

One Comment

  1. Wow! Finally I got a weblog from where I can actually take valuable data regarding my study and knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *