COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Mashup Services => Topic started by: mars_22 on 24 Feb 2020 04:23:06 AM

Title: Authenticating to Cognos using CMS
Post by: mars_22 on 24 Feb 2020 04:23:06 AM
Hello all,

we're trying to build a web application and host it on a webserver outside of Cognos. This application (or the actions available in the app) should be accessible only to users that are added to Cognos.
I thought that the easiest way to do this would be to use the Mashup Service. We're running Cognos Analytics v. 11.1.3. on RHEL 7.5.

To get started, I was using the original Mashup Services samples - there are two ways of authenticating, either using the standard Cognos logon page or the already mentioned CMS authentication methods. They are (very) briefly described here: https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ca_dg_cms.doc/c_rest_log.html#rest_log 

I'm not able to get any of these samples running from an external web server - I'm getting stuck on cross-origin errors ("No 'Access-Control-Allow-Origin' header is present on the requested resource", "Blocked a frame with origin XX from accessing a cross-origin frame").

Has anyone dealt with some similar case? My thinking was to enable CORS on the server under Cognos Analytics, but not sure where exactly should I do that.

Ideally I would like to get the "Standard Cognos logon page" option running as then we don't need to take care of sending the credentials with the request. But I would be happy with any of the options.
Next step then would be to get the CAMPassport and send it as part of a request to Planning Analytics.

Thank you very much in advance for any insight.

mars
Title: Re: Authenticating to Cognos using CMS
Post by: DaHammer on 04 Oct 2020 07:37:04 PM
Just add

Access-Control-Allow-Origin: *

to your HTTPD.CONF or IIS configuration

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin