Book Image

Instant SQL Server Analysis Services 2012 Cube Security

By : Satya Shyam K Jayanty
Book Image

Instant SQL Server Analysis Services 2012 Cube Security

By: Satya Shyam K Jayanty

Overview of this book

SQL Server 2012 includes BI-specific features such as cube analytics, reporting-related features, multidimensional BI semantic models, and many more. This is a new addition that is of great use to Business Analysts, who can now build BI semantic models using the relational tables from the database engine rather than the dimensions from analysis services. Instant Microsoft SQL Server Analysis Services 2012 Cube Security is a practical, hands-on guide that provides clear, step-by-step recipes for getting started with cube security. As a Database Administrator and Data Architect, data security is of prime concern, and this book highlights the key concepts of securing cubes. By the end of this book, you will understand the SQL Server security model and how to effectively implement the same on the data platform. Security is paramount within a data platform, and thankfully, the issues surrounding data access can be fixed in the initial stages of its design. This allows you to avoid any breach of data access layers. The recipes in this book consist of the required ingredients to implement and administer OLAP & BI security management for your cubes. With this book, you will master the key aspects of implementing and managing security essentials and securing data layers. The recipes in this book incorporate best practice implementation, which include step-by-step instructions for creating models that implement security based on the currently logged on Windows user name or based on custom data passed to analysis services. The new BI platform features will help end users, business users, and technology users by providing a robust environment for IT, planning, budgeting, forecasting with scorecards, and reporting capabilities for the business users. These analytics will help end users to create a comprehensive management application to view the data with ease.
Table of Contents (7 chapters)

Defining dimension access privileges (Advanced)


A dimension is the key factor within Analysis Services database that consists of a list of attributes that will be used to analyze data. For instance, an attribute of customers may be represented by their sales volume or geographical area.

Whenever we build an Analysis Services solution the AS dimension objects are built from the dimension tables. The dimensional architecture keeps the Analysis Services database intact to provide Business Intelligence features.

Getting ready

In this recipe we will overview the dimension access privileges. As an administrator your responsibility is to grant relevant read or write permissions to some or all the members of any dimension in the cubes to which the database role has access permissions.

The prerequisite for this recipe can be obtained from the Getting ready section in the Designing and creating security roles in an OLAP database recipe.

How to do it...

Once the prerequisites are completed follow the following steps:

  1. Open the SSMS and choose the Connect to Analysis Services… instance.

  2. Expand SQL Server 2012 instance and the Databases folder.

  3. Choose the appropriate database AdventureWorksDM (that was created within the preceding Getting ready section) and expand the Roles folder.

    Note

    As the AdventureWorksDM database is created with pre-existing Data Sources, Data Source Views, and Dimensions, we will have an opportunity to view the relevant Dimensions on the following screens:

    • In conjunction with the Creating security roles (Intermediate) recipe we have already created three roles on AdventureWorksDM database, named as DBIA_Reader, DBIA_Processor, and DBIA_User.

    As per the their naming convention the DBIA_Reader role has read access on the database that will automatically impersonate Read Definition privilege for the users that are associated within this role.

    Similarly, the DBIA_Processor has been granted a Process Database privilege that will automatically impersonate Process privileges for the users that are associated within this role.

  4. Expand the Roles folder and right-click on the DBIA_User role to choose Properties.

  5. Click on the Dimensions option in the Select a Page pane (left-hand side).

  6. Now locate the dimension in the Select Dimension Set and ensure that the All database dimensions option is selected from the drop-down list.

    See the preceding screenshot that displays the relevant privileges for the role DBIA_User.

  7. As there were permissions set for the role DBIA_user role under the Set the database permissions for this role option all the corresponding Read Definition and Process checkboxes are blank.

  8. Now, on this screen, click on the Read Definition checkbox against the Dim Product and Dim Product1 dimension names.

  9. Further choose the Process checkbox for the Dim Geography dimension name.

  10. Click on OK to apply the corresponding changes in this recipe.

Tip

In addition to specifying the read (Read Definition) or read/write (Process) dimension access privileges to a database role, we can define specific attribute hierarchies and members within the dimension to which role members are allowed access by choosing the Dimension Data option under the Select a page option on the left-hand pane.

How it works...

In this recipe and the previous one (Creating security roles) we have performed the necessary steps to create security roles and granted required privileges for these roles.

To re-iterate what follows from the preceding steps, we have already created three roles on AdventureWorksDM database, named as DBIA_Reader, DBIA_Processor, and DBIA_User.

Note

As per the their naming convention the DBIA_Reader role has read access on the database that will automatically impersonate the Read Definition privilege for the users that are associated within this role.

Similarly, the DBIA_Processor has been granted with Process Database privilege that will automatically impersonate Process privileges for the users that are associated within this role.

According to Microsoft documentation,

Since the SQL Server 2005 Analysis Services (SSAS) design concept, by default a database role in Analysis Services database has read permissions on all dimension members in each cube to which the database role has access permissions.

SSAS relies on Windows operating system authentication methods to authenticate users.

This means by default only authenticated users who have rights can establish the connection to the Analysis Services instance. The access privileges are determined by the rights that are assigned on instance level and database level. This process will work directly from the Windows operating system or through the membership in the Windows role.

  • The Server Administrator role is a single fixed-server role that grants relevant member permission to perform any task within the Analysis Services instance

  • Each database role has a customized set of permission to let the users access data or perform tasks within a database, dimension, or cube

Multiple privileges such as read and/or process can be granted to each role within the AS database. A database role can specify whether the associated members have permission to view or update members in specified database dimensions.

Similarly, on a cube level that is based on a single-database dimension will have multiple cube dimensions defined. The permissions that are specified for the database dimensions apply to all the cube dimensions unless these permissions are overridden for one or more of the cube dimensions.

There's more...

By default, members with at least read access to an attribute member have read access to all cube cells related to the attribute member. You can limit cell access to specific cells. We will overview this topic under the Securing data at the cell level (Intermediate) recipe.

As we have cooked through a few recipes from the basics to construct the administer OLAP security management, the recipes associated in this security essentials will cruise through dimension to cell level within an OLAP database.

By default the best practices (and Microsoft) recommend to use Windows authentication based security. In some occasions this may not be possible by design or due to some architectural restrictions where the integrated security feature is used. Irrespective of either authentication methods it is highly recommended to use account credentials to access the data on database.

An authentication and access privilege brings up an impersonation topic that works seamlessly from the database level down to the cell level. In this book the recipes will highlight the role-based security from dimension to cell level and database to cube level. Also, covered are the features surrounding how to restrict access to dimensions and define default members (full and partial).

The following recipes will go through the security aspects on dimension level, how we can specify whether its members have permissions to view or update dimension members in a specific database dimension. For instance, a database role is not granted permissions to view or update a particular dimension. In this case some or all of the dimension's members of the database have no permission to view the dimensions of any of its members.

Similarly to the cells level a database role can specify whether its members have read, read contingent, or process permission on some or all of the cells within a cube. On the contrary, if a database role is granted permission to view members of a dimension, cell-level security can be used to limit these cell members from the dimension that the database role members can view.

In managing role-based security the two recipes Managing role-based security – dimension to cell level (Advanced) and Managing role based security – database to cube level (Advanced) are inter-related. In order to accomplish these tasks we will perform the steps as a two-fold process. Initially we will work upon database to cube level based security that will enable us to perform dimension to cell level steps.