Need a special offer?Find out if your project fits.
+

Cube security - Using CUSTOMDATA and SSAS

Answered
RP MD asked on April 26, 2018

I was able to connect to cube using your accelerator. Web app using windows user to connect Cube, who has full access. We want to restrict cube data based on currently logged in user. The security model we chose was to use userid in custom data. (see https://www.wiseowl.co.uk/blog/s2488/customdata.htm or http://aniruddhathengadi.blogspot.com/2013/09/configuring-web-server-for-accessing.html).  
I read your documentation https://www.flexmonster.com/doc/configuring-authentication-process/#!custom-authorization. But its not clear how to implement, if you have any example code that shows custom authorization, that would be great
Thanks for your help

4 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster April 27, 2018

Hello, Pradeep,
Thank you for writing to us.
Please check this sample on JSFiddle: http://jsfiddle.net/flexmonster/faq275u1/.
Here you can see how customData property is set in the report. customData property can contain your values.
Our suggested approach is the following:
1) Specify customData in your report
2) On the server side, handle cube data restriction based on customData you are getting with each request from the client side
Also, we wanted to make sure that you have seen this MVC project showing how Accelerator should be referred: https://github.com/flexmonster/pivot-accelerator-dll/.
Please let me know in case of further questions.
Regards,
Tanya

Public
Alex February 5, 2021

Hello Tanya,
I found that it's possible to override the customData property by opening a previously saved local report. Is there any way to disable this? Otherwise, it doesn't make sense to use it to enforce cube restrictions. Thanks
 
Regards,
Alex

Public
Vera Didenko Vera Didenko Flexmonster February 9, 2021

Hello, Alex,
 
Thank you for writing to us. 
 
You are right, if a new report is loaded, the previous report properties are overridden with the new report settings.

Our team kindly suggests one of the following solutions: 

  1. It is possible to define dataSource properties in the global object instead of the report object:
    Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/0tbmcnzv/
  2. Another solution is to provide custom behavior for loading the report:
    It is possible to override the Toolbar Tabs' default behavior.
    This way, you could customize the "Open"->"Local report" Tab's functionality and process the provided report before loading it into Flexmonster. 
    Please see the following guide for more details on Toolbar customization.
    For loading the processed report, the setReport() API call could be used.

 
Please let us know if one of the suggested approaches would work for you.
If any questions arise, please feel free to reach out.
 
Looking forward to your response.
 
Kind regards, 
Vera

Public
Alex February 9, 2021

Thanks, Vera! This is very helpful.

Please login or Register to Submit Answer