Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
xamPivotGrid - Unable to use Credentials, they are ignored
posted

Issue:
My xamPivotGrid is connected to our Data Warehouse, but I can't get it to dynamically change authentication via the credentials object.

Versions:
Infragistics 13.1 ( infragisticsSL5.controls.grids.xampivotgrid.v13.1 )
SQL Server 2012 Standard
Visual Studio 2012 Professional
IIS 7.5
 

What I've Done - Preliminary Setup:
I followed the configuration walkthrough at http://es.infragistics.com/community/blogs/atanas_dyulgerov/archive/2010/01/27/how-to-set-up-xmla-http-access-for-sql-server-analysis-service-2008-and-access-the-adventure-works-2008-from-an-infragistics-pivotgrid-application.aspx up to the section titled Infragistics PivotGrid demo.  The user I added under Membership in the XMLA_Access role is IUSR.  I gave it full permissions to the SSAS database.

I created a SilverLight application in Visual Studio.  This is the XAML:

<UserControl
x:Class="SilverlightApp.DataSourceXMLA"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:olap="http://schemas.infragistics.com/olap"
xmlns:igPivot="http://schemas.infragistics.com/xaml"
>
<Grid x:Name="LayoutRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<Grid.Resources>
<olap:XmlaDataSource
x:Key="DataSource"
ServerUri="http://sqlserver/olap/msmdpump.dll"
Database="OurDM"
Cube="OurCube"
Columns="[Delivery Date].[Day Name Of Week]"
Rows="[Customer Location].[Customer Name]"
Measures ="Item Count">
</olap:XmlaDataSource>

</Grid.Resources>

<igPivot:XamPivotGrid x:Name="pivotGrid" DataSource="{StaticResource DataSource}" />
<igPivot:Expander Grid.Column="1">
<igPivot:XamPivotDataSelector
x:Name="dataSelector"
DataSource="{StaticResource DataSource}"

MaxWidth="250" />
</igPivot:Expander>

<Grid x:Name="loaderMessage" Grid.ColumnSpan="2">
<Border Background="White" Opacity="0.8" />
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Loading Dimensions" FontSize="16" Margin="0" HorizontalAlignment="Center" FontFamily="/xamFeatureBrowser;component/ResourceDictionaries/fonts/#Segoe UI" Foreground="#FF474747" />
<TextBlock Text="Please wait..." FontSize="16" Margin="0" HorizontalAlignment="Center" FontFamily="/xamFeatureBrowser;component/ResourceDictionaries/fonts/#Segoe UI" Foreground="#FF474747" />
</StackPanel>
</Grid>
</Grid>
</UserControl>

The above works fine, it connects and allows full access to the SSAS database.  I can drag and drop columns, rows, filters, and measures and it all works OK as far as I can tell.

What I am trying to do now:
The users login to our web site and their users are not Active Directory users.  Changing this authentication method is not an option.

I want to be able to dynamically change who the xamPivotGrid authenticates as based on who is logged onto our web site.  So, if JoeBob is logged in, the xamPivotGrid will authenticate to SSAS as OurDomain\newUser.

I've set up a test company user in Active Directory and in SSAS, I created a role for them that can only see their company's data.  I added the new user in the Membership of that role.  I tested it via Excel by setting up my datasource to use that user's login and password and it works.  It only pulls back the data they can see based on security restrictions setup in SSAS.

What isn't working:
I tried to force the xamPivotGrid to use credentials that I supply via the olap.XmlaDataSource.Credentials tag like this:

<Grid.Resources>
<olap:XmlaDataSource
x:Key="DataSource"
ServerUri="http://sqlserver/olap/msmdpump.dll"
Database="OurDM"
Cube="OurCube"
Columns="[Delivery Date].[Day Name Of Week]"
Rows="[Customer Location].[Customer Name]"
Measures ="Item Count">
<olap:XmlaDataSource.Credentials>
<olap:XmlaNetworkCredential UserName="newUser" Password="newUserPassword!" Domain="OurDomain" />
</olap:XmlaDataSource.Credentials>
</olap:XmlaDataSource>

</Grid.Resources>

It doesn't appear to override the default IUSR account used for authentication.  The xamPivotGrid still pulls back data for every customer.  I removed my new user from the new SSAS role I created to make sure it wasn't using the credentials and it still pulled back data for all customers, proving my credentials are being ignored.

Earlier, I tried setting the credentials in the c# codebehind like this:

XmlaDataSource ds = (XmlaDataSource) pivotGrid.DataSource;

ds.Credentials = new XmlaNetworkCredential("newUser", "newUserPassword!", "OurDomain");

and got the same result - it still pulled data back for all customers because it wasn't using the credentials I was setting.

What is the solution:
For now, I wouldn't mind getting it working using the XAML to set the credentials just to get it to work, but eventually, it will be done in c#.

What am I doing wrong?  Is what I'm trying to do even possible?

-BEP

Parents
  • 8831
    Verified Answer
    posted

    Hello,

    Since the IIS authentication is set to Anonymous and IUSR has granted access then it's expected that SSAS is still open to anyone. You have to set the authentication in IIS to Basic or Digest, with disabled Anonymous and the user you have provided credentials for should be member of role in SSAS as well.

    Regards,
    Plamen

Reply Children
No Data