Deep-Dive to Analysis Services Security



Similar documents
Creating BI solutions with BISM Tabular. Written By: Dan Clark

Implementing Data Models and Reports with Microsoft SQL Server

Business Intelligence in SharePoint 2013

Implementing Data Models and Reports with Microsoft SQL Server 2012 MOC 10778

DirectQuery vs In-Memory in BISM

PerformancePoint 2010 Designing and Implementing Scorecards and Dashboards

MS 50511A The Microsoft Business Intelligence 2010 Stack

Implementing Data Models and Reports with Microsoft SQL Server 20466C; 5 Days

COURSE SYLLABUS COURSE TITLE:

Microsoft Implementing Data Models and Reports with Microsoft SQL Server

Avoiding Common Analysis Services Mistakes. Craig Utley

Microsoft End to End Business Intelligence Boot Camp

Microsoft SQL Business Intelligence Boot Camp

Power BI Performance. Tips and Techniques

BI Architecture with SQL 2012 & SharePoint 2010

Combined Knowledge Business Intelligence with SharePoint 2013 and SQL 2012 Course

End to End Microsoft BI with SQL 2008 R2 and SharePoint 2010

Business Intelligence, Data warehousing Concept and artifacts

Implementing Data Models and Reports with Microsoft SQL Server

SQL Server Analysis Services Complete Practical & Real-time Training

PowerPivot Microsoft s Answer to Self-Service Reporting

Course 6234A: Implementing and Maintaining Microsoft SQL Server 2008 Analysis Services

SQL SERVER TRAINING CURRICULUM

Microsoft Services Exceed your business with Microsoft SharePoint Server 2010

Presented by: Jose Chinchilla, MCITP

Tutorials for Project on Building a Business Analytic Model Using Data Mining Tool and Data Warehouse and OLAP Cubes IST 734

The Microsoft Business Intelligence 2010 Stack Course 50511A; 5 Days, Instructor-led

Microsoft Business Intelligence

Business Intelligence in Excel 2013 Excel, PowerPivot and Power View. Stéphane Fréchette Friday April 26, 2013

SQL Server 2012 Business Intelligence Boot Camp

MICROSOFT EXAM QUESTIONS & ANSWERS

SQL SERVER BUSINESS INTELLIGENCE (BI) - INTRODUCTION

Connecting Pentaho Suite applications with Microsoft SQL Server Analysis Services

Analysis Services Step by Step

How To Write Powerpivot For Excel

SSIS Training: Introduction to SQL Server Integration Services Duration: 3 days

Kyubit Business Intelligence OLAP analysis - User Manual

Microsoft Business Intelligence 2012 Single Server Install Guide

SQL Server Administrator Introduction - 3 Days Objectives

Creating an Enterprise Reporting Bus with SAP BusinessObjects

Tuning Tableau and Your Database for Great Performance PRESENT ED BY

Managing the PowerPivot for SharePoint Environment

SAP BW Connector for BIRT Technical Overview

Analyze This! Get Better Insight with Power BI for Office 365

Building a Cube in Analysis Services Step by Step and Best Practices

Load Testing Analysis Services Gerhard Brückl

Building a BI Solution in the Cloud

Business Benefits From Microsoft SQL Server Business Intelligence Solutions How Can Business Intelligence Help You? PTR Associates Limited

Report Model (SMDL) Alternatives in SQL Server A Guided Tour of Microsoft Business Intelligence

SQL Server 2012 End-to-End Business Intelligence Workshop

Scaling Analysis Services in the Cloud

Beyond Plateaux: Optimize SSAS via Best Practices

Microsoft Consulting Services. PerformancePoint Services for Project Server 2010

SQL Server 2005 Features Comparison

Course 20461C: Querying Microsoft SQL Server Duration: 35 hours

Business Intelligence for Dynamics GP. Presented By: Rob Jackson, Business Intelligence Consultant Brent Keilin, GP Consultant

Connectivity Pack for Microsoft Guide

MOC 20461C: Querying Microsoft SQL Server. Course Overview

Developing Microsoft SharePoint Server 2013 Advanced Solutions. Version: Demo. Page <<1/8>>

Turning your Warehouse Data into Business Intelligence: Reporting Trends and Visibility Michael Armanious; Vice President Sales and Marketing Datex,

Excel Excel 97 Add-In. Excel 2010 PowerPivot. Excel Add-In Pivot Table Services Office Web Components

Developing Business Intelligence and Data Visualization Applications with Web Maps

Intelligent SharePoint Architecture and Optimizing Storage. Nick Carr Director of Sales West Region AvePoint

IT-Pruefungen.de. Hochwertige Qualität, neueste Prüfungsunterlagen.

Building Views and Charts in Requests Introduction to Answers views and charts Creating and editing charts Performing common view tasks

SQL Server 2005 Reporting Services (SSRS)

Data Warehousing OLAP

MS Enterprise Library 5.0 (Logging Application Block)

Querying Microsoft SQL Server

DEPLOYMENT GUIDE Version 2.1. Deploying F5 with Microsoft SharePoint 2010

Cognos 8 Best Practices

About PivotTable reports

Power Update - Documentation Power Update Manager

Excel 2013 for Business Intelligence (Part 1) Tom Jones President, Iridium Technology LLC

SPHOL207: Database Snapshots with SharePoint 2013

SQL Server 2016 BI Any Data, Anytime, Anywhere. Phua Chiu Kiang PCK CONSULTING MVP (Data Platform)

CS346: Database Programming.

146 Exercise Notes Chapter 3

Tableau Server Security. Version 8.0

c360 Portal Installation Guide

LearnFromGuru Polish your knowledge

Job Description Senior Consultant (BI)

PHP on IBM i: What s New with Zend Server 5 for IBM i

Cache Database: Introduction to a New Generation Database

Dashboard Overview. Bernd Schneider. Technical Solution Professional BI Microsoft Switzerland

DATA WAREHOUSE BUSINESS INTELLIGENCE FOR MICROSOFT DYNAMICS NAV

Course ID#: W 35 Hrs. Course Content

Exploring the Synergistic Relationships Between BPC, BW and HANA

Querying Microsoft SQL Server 20461C; 5 days

Architecting the Future of Big Data

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP System v10 with Microsoft IIS 7.0 and 7.5

MS 20467: Designing Business Intelligence Solutions with Microsoft SQL Server 2012

Microsoft SQL Server 2012: What to Expect

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Proof of Concept. A New Data Validation Technique for Microsoft ASP.NET Web Applications. Foundstone Professional Services

CHAPTER 5: BUSINESS ANALYTICS

Saskatoon Business College Corporate Training Centre

Transcription:

Deep-Dive to Analysis Services Security By Gerhard Brueckl gerhard@gbrueckl.at http://blog.gbrueckl.at http://www.pmone.com

Agenda General Multiple Roles / Permissions Evaluation Caching Dynamic Security / Assemblies

SSAS Server General User Database A Database B Role 1 Cube X Role 3 Cube Y Role 2 Cube Z

User, Roles and Permissions Users and Groups Are assigned to Roles Active Directory For Non-Active Directory Environments: Using Local Users msmdpump.dll via IIS and HTTP

Demo Access from other Domain

User, Roles and Permissions Roles Belong to Database Contains Users/Groups Defines Permissions Special Role Server Administrator

User, Roles and Permissions Permissions Multidimensional Database Data Sources Cubes (Cells) Dimensions (MDX) (Mining Models)

User, Roles and Permissions Permissions Tabular Database Rows (DAX)

User, Roles and Permissions Database Permissions - Is created in the background - No GUI - AMO / XMLA - Power Shell Deny access without removing Role or User

Demo Database Permissions

Multiple Roles and Permissions

Multiple Permissions Multiple Roles are complementary You cannot lose permissions Roles can be selected using Roles-parameter in the connection string ;Roles=Role1, Role2;

Same Role Same Dimension Secured on same Attribute Union / SQL OR WHERE [Country] = 'United Kingdom' OR [Country] = 'Germany' different Attribute Intersect / SQL AND WHERE [Country] = 'United Kingdom' AND [Region] = 'North America' Use MDX Union() and Exists()

Same Role Different Dimensions 1. Security for Same Dimension applies 2. Facts get filtered on all secured dimension SQL AND SELECT... FROM [Facts] WHERE [Country] = 'United Kingdom' AND [ProductCategory] = 'Clothing'

Multiple Roles Same Dimension Secured on same Attribute Union / SQL OR WHERE [Country] = 'United Kingdom' OR [Country] = 'Germany' different Attribute Union / SQL OR WHERE [Country] = 'United Kingdom' OR [Region] = 'North America'

Multiple Roles different Dimension 1. Security for Same Dimension applies 2. Final permission set is a combination of all Roles UNION / SQL OR SELECT... FROM [Facts] WHERE [Country] = 'United Kingdom' OR [ProductCategory] = 'Clothing' We are in a multidimensional world!

Demo Multiple Roles

Multiple Roles different Dimension Role Sales Territory Product Clothing No Restrictions [Category] = Clothing UK [Country] = United Kingdom No Restrictions {Clothing, UK} No Restrictions No Restrictions

Multiple Roles Tabular vs. Multidimensional UK Clothing SELECT... FROM [Facts] WHERE ([Country] = 'UK' OR 1 = 1 ) OR ( 1 = 1 OR [ProductCategory] = 'Clothing') SELECT... FROM [Facts] WHERE ([Country] = 'UK' ) OR ( [ProductCategory] = 'Clothing')

Combining Roles and Permissions in Tabular Same Role, Same Table Same Role, Different Tables Multiple Roles, Same Table Multiple Roles, Different Tables

Evaluation of Security

Evaluation of Security Multidimensional At first connect Per Dimension Propagated to Facts by setting VisualTotals Tabular At query runtime Propagated to all related Tables Not relating Tables! Product SubCategory Category Filtered Not Filtered

Evaluation of Security Multidimensional: Evaluated per Dimension Security gets translated to all Attributes AutoExists This can take some time! Especially for Big Dimensions!

Demo Evaluation in Multidimensional

Evaluation of Security Several Issues: AutoExists Remove Attributes / Rows Move secured Attributes to separate Dimension no AutoExists Single-Threaded Evaluation Remove Attributes / Rows (Faster CPUs) Expensive Allowed/Denied Set Pre-Calculate Cache Sets (Assembly)

Evaluation of Security Tabular Simple Expression at Query Time e.g. [Category] = Bikes AND / OR Complex Expression at First Query / Query Time DAX Username() / CustomData()

Caching of Security

Caching Multidimensional Simple / Fixed Complex / Dynamic Evaluated at First connect First connect Cache Global Scope Global Scope Tabular Simple / Fixed Complex / Dynamic Evaluated at Query time First Query Cache No Yes, RowFilter

Caching Multidimensional Global Scope Cache 1) User connects 2) Determine User s Role(s) 3) Check if Global Scope Cache exists for Role(s) 4) Evaluate Security 5) Evaluate MDX Script 6) 7) Execute Query No Yes

Caching Multidimensional Global Scope Cache For Static Roles: Cache is shared among Users with same Role(s) For Dynamic Roles: Cache is shared if: - Same Role(s) - Same UserName() - Same CustomData()

Demo Caching Multidimensional

Caching Tabular In General: Only Storage Engine Cache No Formula Engine Cache for DAX Queries But for MDX Queries! In terms of Security: Simple: Pushed down to xvelocity Engine No Caching Complex: RowFilter is evaluated once and cached

Demo Caching Tabular

RowNumber and $RowFilter [Product Category].$ROWFILTER IN '0x0 004'; $RowFilter Binary encoded RowNumber RowNumber SQLQueryMode=DataKeys SELECT TOP 10 * FROM [Adventure Works].[$Product Category] RowNumber Product Category Binary 0 Bikes 0b00001 1 Components 0b00010 2 Clothing 0b00100 3 Accessories 0b01000 Role Binary Bikes + Clothing 0b00101 0x5

Dynamic Security

Dynamic Security A Role is dynamic if USERNAME() CUSTOMDATA()... is used Security can be derived from Mapping table Assembly (only MD)

Dynamic Security Using a Mapping table Part of the Model MeasureGroup Table Strongly tied to Model structures DomainUser DOM\User1 DOM\User1 DOM\User2 DOM\User3 Company A B A C

Dynamic Security Using an Assembly Security is loaded from the outside SQL Table Web Service Complex Development C# /.Net Great flexibility Not tied to Model structures

Dynamic Security Using an Assembly public static AdomdServer.Set GetAllowedSet( string dimension, string attribute, string username) { // Connect to SQL/WebService/... // Pass in Parameters // Get ResultSet // Convert ResultSet to MDX Set // Return MDX Set } Compile the DLL

Dynamic Security Using an Assembly Add the DLL to the Project Use the Assembly in the role s security definition MDX Expression for Allowed member set: Security. GetAllowedSet("Product", "Category", USERNAME())

Dynamic Security Using an Assembly Common Pitfalls: Assembly throws an Error Using an Assembly slows down initial connect Security Settings

Demo Assembly Error

Dynamic Security Using an Assembly Initial Connect is slowed down Assembly is called several times Remember: Security gets translated to all Attributes AutoExists Assembly is called for each Attribute!

Dynamic Security Using an Assembly Single Result/Execution is not cached Cache within Assembly string uniquetoken = username + dimension + attribute; if (!CachedSecuritySets.TryGetValue(uniqueToken, out s)) { s = new Set(...); CachedSecuritySets.Add(uniqueToken, s); } return s;

Dynamic Security Multidimensional Can be set on Attribute-Level Can be controlled by Assembly only via AMO, not via UI ocubeattributepermission.visualtotals = "Security.GetVisualTotals(...)"; Tabular Cannot be controlled Always On!

Dealing with Multiple Roles Multiple Roles secured on independent Dimensions Combine secured dimensions into one (by Chris Webb) Use Union() + Exists() Use an Assembly and CustomData() Business Role Only one role at a time

Dealing with Multiple Roles Assembly and CustomData() What is a business role? User can select his business role using CustomData() Connection String Custom UI User has a default business role

Dealing with Multiple Roles Advantages: Only one business role at a time Flexible, no need to change cube structure Change default-role Server-side solution Applied to all client tools (SharePoint Web Part) Maintained in SQL

Key Takeaways Analysis services offers a rich set of features to secure the cube Use Dimension Security if possible Can be further extended by custom code/assemblies But use with caution! Keep evaluation and caching in mind Especially for big cubes/models Be aware of the implications of Multiple Roles

Thank You! Please submit your feedback! http://www.sqlbits.com/sqlbitsxiisaturday Gerhard Brueckl gerhard@gbrueckl.at http://blog.gbrueckl.at