kendo datasource to XMLA with authorization

3 posts, 0 answers
  1. Тарас
    Тарас avatar
    2 posts
    Member since:
    Sep 2015

    Posted 24 Sep 2015 Link to this post

    Hi

    I have pentaho BI (mondrian) with catalog and cube. I can connect to it with Excel and this driver http://sourceforge.net/projects/xmlaconnect/. Xmlaconnect make POST request with Authorization header, filled with my username/password.

    But authentication is not needed in sample code for kendo pivottable for SSAS cube:

    Sample from telerik: 

     read: {
                            url: "http://demos.telerik.com/olap/msmdpump.dll", //define the URL of the service
                            dataType: "text",
                            contentType: "text/xml",
                            type: "POST" }

    In my case authentication is needed. I try to implement it by such code:

     

    My case:

     var pivotgrid = $("#pivotgrid").kendoPivotGrid({

    ...

     read: {
                            url: "http://192.168.15.54:8080/pentaho/Xmla", 
                            dataType: 'text',
                            type: "POST",
                             beforeSend: function(req) {
                                             req.setRequestHeader('Authorization', "Basic " + btoa("anonymous:anonymous"));
                              }
               }​

     

    ..but the result of this POST request is:

     XMLHttpRequest cannot load http://192.168.15.54:8080/pentaho/Xmla. The request was redirected to​

    'http://192.168.15.54:8080/pentaho/Login;jsessionid=BF6E2FE9143B4402BCEEAAD115C714FA', which is disallowed for cross-origin requests that require preflight.

     

     Xmlaconnect  for Excel send POST filled with Authorization header and his data:

     Authorization: Basic YW5vbnltb3VzOmFub255bW91cw==\r\n

    . But  sample for kendo pivot with kendoPivotGrid send OPRION request: my sniffer not catches POST packet in this case. Inside OPTION packet I see this:

    Access-Control-Request-Headers: accept, authorization, content-type​  

    It seems as authorization must be inside OPTION packet. But I am not see this header itself as ​for case of Xmlaconnect ...

    What's the problem?

     

     

     

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 28 Sep 2015 Link to this post

    Hello Tapac,

    I believe that you will need to enable withCridentials option. You can find more details how the PivotDataSource is connected to jQuery here: Basically, you will need to ensure that the cube is accessible using XHR request. If it is, then it will work with PivotGrid widget too. You can use this Dojo demo as a base for your tests:
    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Тарас
    Тарас avatar
    2 posts
    Member since:
    Sep 2015

    Posted 29 Sep 2015 in reply to Georgi Krustev Link to this post

    Hi, Georgi 

     

    Thanks for answer. I've solved my problem by using set of settings for pentaho BI to allow CORS requests and credentials using in URL like http://192.168.15.54:8080/pentaho/Xmla?userid=anonymousUser&password=anonymousUser

     

Back to Top