How to set session variables using url variables

The goal is to set session variables using url variables, but can you also do this for the user and password ?
url variable (&Upwd) is not passed to session variable USER_PWD.
The variable USER is correctly passed, the variable USER_PWD is not!

Solution

The steps to set an OBIS session variable via a URL call utilizing the
instanceconfig.xml tag should be as follows

1. Create a session init block that will act as a ‘placeholder’ for the
session variable to be set via the url call – the variable can be set to
anything.

2. Set the ‘Enable any user to set the value’ option for the variable.

3. Add the following tag block to the instanceconfig.xml file anywhere
between the <ServerInstance></ServerInstance> tags:

<Auth>
<UserIdPassword enabled=”true”>
<ParamList>
<Param name=”NQ_SESSION.TEST_VAR”
source=”url”
nameInSource=”SETVAR”/>
</ParamList>
</UserIdPassword>
</Auth>
“TEST_VAR” should match the session variable name (case sensitive).

4. The following option will need to be appended to the OBI url passed –
&SETVAR=’variable value to pass. So a full example would be:
http://localhost:9704/analytics/saw.dll?Dashboard&nqUser=USER001&nqPassword=US
ER001&SETVAR=SomeValue

However, note that you cannot set the value of any System Security Session variable (specifically USER, PROXY, GROUP and WEBGROUPS) using any source method (e.g.: url, cookie, httpHeader) by design. Having this ability would open possible security breaches.

If you attempt to set the USER variable with the following instanceconfig.xml setting:

<Param name=”NQ_SESSION.USER” source=”url” nameInSource=”nquser” />

You will get the following error when using the url: http://localhost:9704/analytics/saw.dll?Dashboard&nquser=user1&nqpassword=public :

nQSError: 10018: Access for the requested connection is refused
nQSError: 1315 You do not have the permission to set the value of the variable :USER

9 thoughts on “How to set session variables using url variables”

  1. Thanks for the help. I think my question isn’t too far from what you’ve suggested here. I want users to be able to put the url in their browser, and go straight to presentation services, without having to input a username and password. I tried uncommenting out in the NQSCONFIG.ini AUTHENTICATION_TYPE = BYPASS_NQS;, restart the bi server, try logging in, and it’s still asking for a username and p/w. How can I do this?

    thanks

  2. Tuck,

    Do you want to disable security all together?

    Or do you want to set up SSO-login?

  3. Hi,

    Do you know how this can be done in OBIEE 11g?. It looks like the tag names have changed in the new version and making the above changes in 11g is causing the Presentation server to ‘not come up’. There is nothing in the OBIEE documentation either which tells how this can be done.

  4. Hi, this article is very helpful.

    How can i set a default value at the “Param name=”NQ_SESSION.TEST_VAR” variable??

Leave a Reply