This is a migrated thread and some comments may be shown as answers.

kendo datasource to XMLA with authorization

2 Answers 97 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Тарас
Top achievements
Rank 1
Тарас asked on 24 Sep 2015, 02:50 PM

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 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 28 Sep 2015, 10:03 AM
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!
 
0
Тарас
Top achievements
Rank 1
answered on 29 Sep 2015, 09:19 AM

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

 

Tags
PivotGrid
Asked by
Тарас
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Тарас
Top achievements
Rank 1
Share this question
or