If you are unable to create a new account, please email support@bspsoftware.com

 

Administrate Users from multiple Authentication Providers...

Started by IceTea, 15 Sep 2014 07:15:51 AM

Previous topic - Next topic

IceTea

Hi all,

a customer is facing a weird situation:

They have connected ~10 different Active Directories to their Cognos BI Environment. Every the Systemadmins want to administer a user/role from one of theser namespaces they have to login directly to this namespace.

Is there any workaround to avoid this problem? Maybe some kind of automated logonscript to all namespaces...

Thanks in Advance
Ice

CognosPaul

Do you have SSO enabled for the various namespaces?

IceTea


CognosPaul

My line of thought is a custom page that attempts to log the user in to all ten namespaces simultaneously. The problem is how to handle passwords. If it's SSO for all of them, it should be possible to to set up something that's completely transparent to the admins.

IceTea

Ok, sounds like a plan. Do you have any hint for a starting point how such a page could be built?

CognosPaul

It looks like creating a session against a specific namespace is an action done in the application, so in windows you might use cognosisapi.dll. It's controlled with URL params, like:

http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID&m=portal/main.xts

You could probably get away with setting up a simple HTML page that has every single namespace repeated in an iframe.


<html>
<body>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID1&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID2&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID3&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID4&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID5&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID6&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID7&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID8&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID9&m=portal/main.xts"></iframe>
<iframe height=1 width=1 src="http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID10&m=portal/main.xts"></iframe>
</body>
</html>


I honestly don't know what will happen with that. I think that each session has a finite number of high affinity connections it can use. My guess is the first two iframes will log the user into the correct namespace, but the remaining will get some sort of error.

What you could do is set up an array that will automatically loop the iframes through the namespaces.

var namespacesArr = [
'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID1&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID2&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID3&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID4&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID5&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID6&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID7&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID8&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID9&m=portal/main.xts'
, 'http://server/c10/cgi-bin/cognosisapi.dll?b_action=xts.run&CAMNamespace=YOURNAMESPACEID10&m=portal/main.xts'
];



  paulScripts.namespaces = {};

  paulScripts.namespaces.createIFrames = function(obj){
    if(!obj || obj.length===0) return false;

    for(var i=0;i<obj.length;i++){
    /*
    * IE is not being compliant when it comes to names - this means that we'll have to create the iframes a different way. NOT GOOD. SHAME ON YOU, MICROSOFT. SHAAAME.
    var frame=document.createElement('iframe');
    frame.name=obj[i]["name"] ;*/
   
   
    var frame='<iFrame name="namespace' +i + '" id="namespace' i + '" frameBorder="0" style="width:0%;height:0;"></iFrame>'; //building the iframes with innerHTML like this makes me sick. WHEN WILL THE INSANITY STOP?!
    document.getElementById('frames').innerHTML += frame;
     
    }
  }


  paulScripts.namespaces.runReports = (function(obj){
    var myArr = namespacesArr
      , i = 0
      , total = myArr.length;
     
    return {
      reset: function(){
        myArr = namespacesArr;
        i = 0;
        total = myArr.length;
      }
      , runNext: function(){
        if(i>=total) return true;
        document.getElementById('namespace'+i).src=myArr[i];
        paulScripts.namespaces.iframeLoad(myArr[i],i);
        ++i;
      }
    }
  })()

  paulScripts.iframeLoad = function(name,i){
    document.getElementById(name).onreadystatechange=function(){
      if(document.getElementById(name).readyState=='complete'){         
        paulScripts.runReports.runNext();
      }
    }
  }


paulScripts.namespaces.createIFrames();
paulScripts.namespaces.runReports.runNext();
paulScripts.namespaces.runReports.runNext();


I adapted that from a multi-tab solution I wrote for a client. I haven't tested the code, so it may not even work. Basically it *should* create a series of iframes based on the namespace array, and then loop through them running each iframe, waiting until the state changes to successful before moving to the namespace iframe. The two runNext(0 calls ensures only two are running at a time.

IceTea