COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: pradeepbi25 on 10 Feb 2015 08:13:58 AM

Title: Passing Username and Password to cognos url
Post by: pradeepbi25 on 10 Feb 2015 08:13:58 AM
Hi

I need to give the report url to the user which should open the report without asking username and passoword.
I used  &h_CAM_action=logonAs&CAMNamespace=Namespace&CAMUsername=YouUsername&CAMPassword=YourPassword
after the report url.
But this is filling the username textbox with the username and leaving password textbox empty.
Is it possible to bypass the login page and open the report directly.

Thanks in advance
Pradeep
Title: Re: Passing Username and Password to cognos url
Post by: MFGF on 10 Feb 2015 08:42:41 AM
Quote from: pradeepbi25 on 10 Feb 2015 08:13:58 AM
Hi

I need to give the report url to the user which should open the report without asking username and passoword.
I used  &h_CAM_action=logonAs&CAMNamespace=Namespace&CAMUsername=YouUsername&CAMPassword=YourPassword
after the report url.
But this is filling the username textbox with the username and leaving password textbox empty.
Is it possible to bypass the login page and open the report directly.

Thanks in advance
Pradeep

Hi,

Try entering the user name and password earlier in the URL, eg

http://<your server>/ibmcognos/cgi-bin/cognos.cgi?CAMUsername=YourUserName&CAMPassword=Your Password&b_action=...

MF.
Title: Re: Passing Username and Password to cognos url
Post by: bdbits on 13 Feb 2015 10:14:09 AM
Kind of an aside, but I do hope you realize embedding credentials in a URL is generally a really bad idea as it exposes them to anyone capable of capturing the URL in transit. This is particularly easy over wireless connections.

Sorry for the digression, I know sometimes you have to do what the client demands, but I felt compelled to say something in case you were not aware of it.
Title: Re: Passing Username and Password to cognos url
Post by: MFGF on 13 Feb 2015 10:19:49 AM
Quote from: bdbits on 13 Feb 2015 10:14:09 AM
Kind of an aside, but I do hope you realize embedding credentials in a URL is generally a really bad idea as it exposes them to anyone capable of capturing the URL in transit. This is particularly easy over wireless connections.

Sorry for the digression, I know sometimes you have to do what the client demands, but I felt compelled to say something in case you were not aware of it.

Yep - exactly that. I agree 100% - 200%, in fact! :)

Thanks for the sanity check Bob - you're a star (as always!)

MF.
Title: Re: Passing Username and Password to cognos url
Post by: pradeepbi25 on 16 Feb 2015 07:10:26 AM
Quote from: bdbits on 13 Feb 2015 10:14:09 AM
Kind of an aside, but I do hope you realize embedding credentials in a URL is generally a really bad idea as it exposes them to anyone capable of capturing the URL in transit. This is particularly easy over wireless connections.

Sorry for the digression, I know sometimes you have to do what the client demands, but I felt compelled to say something in case you were not aware of it.

Yes, I agree. Its really a bad idea. In our case we are allowing that particular user to see only one report. We restricted that user to have access for only one report.
And my problem was solved. I have & in my password and it prompted for password again. I tried with anoher user and it worked.

Thanks
Pradeep
Title: Re: Passing Username and Password to cognos url
Post by: Invisi on 21 Feb 2017 02:38:37 AM
*BouncE*

As an alternative, what is the URL I can go to to bypass our single signon and log in with different credentials, without passing them in the URL?
Title: Re: Passing Username and Password to cognos url
Post by: Invisi on 02 Mar 2017 09:59:25 AM
Anybody? I want to log in as another user to make it owner of a schedule, but the single signon works a bit too well...
Title: Re: Passing Username and Password to cognos url
Post by: Michael75 on 02 Mar 2017 02:01:42 PM
To bypass SSO, you need to use a URL in the format

http://servername:80/cognos10/cgi-bin/cognos.cgi (http://servername:80/cognos10/cgi-bin/cognos.cgi)

rather than

http://servername:80/cognos10/cgi-bin/cognosisapi.dll (http://servername:80/cognos10/cgi-bin/cognosisapi.dll)

Adapt this as required for your environment.
Title: Re: Passing Username and Password to cognos url
Post by: AnalyticsWithJay on 02 Mar 2017 02:11:08 PM
There are many ways of doing this. Think about what's required to setup SSO and do the opposite :)

Gateway bypass: We can bypass it by using the external dispatcher URI, or we can go to the cognos.cgi URL if cognosisapi.dll is configured for SSO.

Browser bypass:
http://www-01.ibm.com/support/docview.wss?uid=swg21341605

Title: Re: Passing Username and Password to cognos url
Post by: hespora on 03 Mar 2017 02:13:01 AM
Quote from: Michael75 on 02 Mar 2017 02:01:42 PM
To bypass SSO, you need to use a URL in the format

http://servername:80/cognos10/cgi-bin/cognos.cgi (http://servername:80/cognos10/cgi-bin/cognos.cgi)

rather than

http://servername:80/cognos10/cgi-bin/cognosisapi.dll (http://servername:80/cognos10/cgi-bin/cognosisapi.dll)

Adapt this as required for your environment.
Yields a plain http 404 :(
Title: Re: Passing Username and Password to cognos url
Post by: MFGF on 03 Mar 2017 03:08:14 AM
Quote from: hespora on 03 Mar 2017 02:13:01 AM
Yields a plain http 404 :(

That tells me IIS isn't configured to recognise cognos.cgi. It's quite straightforward to add this in, though:

http://www.ibm.com/support/knowledgecenter/en/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.c8pp_inst.10.2.2.doc/t_inst_cnfg_iis7.html

Cheers!

MF.
Title: Re: Passing Username and Password to cognos url
Post by: Invisi on 09 Mar 2017 02:22:38 AM
Quote from: Michael75 on 02 Mar 2017 02:01:42 PM
To bypass SSO, you need to use a URL in the format

http://servername:80/cognos10/cgi-bin/cognos.cgi (http://servername:80/cognos10/cgi-bin/cognos.cgi)

rather than

http://servername:80/cognos10/cgi-bin/cognosisapi.dll (http://servername:80/cognos10/cgi-bin/cognosisapi.dll)

Adapt this as required for your environment.

This doesn't work for us (with cognos instead of cognos10 in the URL). I am still logged in automatically. What I read is that they put some auto use of credentials on cognos.cgi. So SSO is configured differently than is typical for Cognos, I guess. So I am also very thankful for a clear and dummy proof explanation for activating Windows based SSO in another way than is implemented here now. I am migrating to new servers, so I can change this for the new servers in something that is more common practise.