Adatis BI Blogs

Data Source Permissions and On-Premises Data Gateway: SQL Server and Analysis Services

In Microsoft’s documentation surrounding the On-Premises Data Gateway, the advice on permissions for the account used to authenticate the Data Source in the Power BI Service can be concerning for most, especially DBAs. In the Analysis Services section of the documentation, the advice is:The Windows account you enter must have Server Administrator permissions for the instance you are connecting to. If this account’s password is set to expire, users could get a connection error if the password isn’t updated for the data source.Server Administrator permissions…? What happened to the principle of least-privilege? In a practical sense, the On-Premises Data Gateway has to deal with two very different implementations of Analysis Services: Multidimensional and Tabular. Each are setup and configured differently from the other, and the nature of their security models are also different. As a one size fits all approach, it works. As we will soon see, the permissions do not have to be set as Server Admin The SQL section of the documentation, on the other hand, doesn’t actually specify what permissions are required for the Data Source to be established in the Power BI Service. PermissionsExactly what permissions are required for these common data sources, I hear you ask. As data sources are established at a database level, so too are the permissions set.Data SourceMinimum Permissions LevelSQL Server Databasedb_datareaderSSAS Tabular DatabaseProcess database and ReadSSAS Multidimensional DatabaseFull control (Administrator) Principle of least-permissions is now restored. Though there still are the curious incidents of Analysis Services data sources requiring permissions in addition to read. I am unsure, I have my suspicions, and have tried to find out. If you know, please leave a comment below!

Introduction to Dynamic Data Masking

What is it SQL Server Dynamic Data Masking is a new feature which has been released with SQL Server 2016. It is designed to allow the creation of a pre-defined rule which can be applied to the data in a column limiting the exposure of the actual data. For example, if you have the following password column in a table which contains user passwords and has a datatype of nvarchar; Password Kingston123 Sh@r0na you can apply a data masking rule to the column which will make is appear as the following to any unauthorised user; Password XXXX XXXX Masking Options Dynamic Data Masking currently has 4 possible masking options which can be applied to a column; Default This will mask the full value depending on the column’s data type. For string data types; char, nchar, varchar, nvarchar, text and ntext the value will be replaced with XXXX. If the length of the field is less than 4 characters, then that number of X’s will be used. For numeric data types; bigint, bit, decimal, int, money, numeric, smallint, smallmoney, tinyint, float and real the value will be replaced with 0. For date and time data types; date, datetime2, datetime, datetimeoffset, smalldatetime and time the value will be replaced with 01.01.2000 00:00:00.0000000. For binary date types; binary, varbinary and image the value will be replaced with 0. Email This will mask the full value exposing the first letter of the string and masks the rest with For example, ‘’ will be masked as ‘’. Custom String This will mask part of a value exposing a number of characters at the start of end of the string based on a prefix and suffix padding value. For example, ‘abcdefghij’ when given a prefix padding of 2 and a suffix padding of 4 will be masked as ‘abXXXXghij’. Random This can be used with any numeric data type and will mask the original value with a random value based on the supplied range. For example, ‘123456789’ when given a range of 1-5 will be masked as either 1, 2, 3, 4 or 5. Uses and Limitations Dynamic data masking is designed to restrict the exposure of sensitive to non-privileged users with minimal impact on the application layer. As its application only effects the result set of a query over designated database fields while keeping the actual data in the database the same, it is perfect for reporting or Business Intelligence uses; this also means that it can be incorporated without modifying pre-existing queries. This feature is implemented by running Transact-SQL commands in SQL 2016 or by using the Azure portal for Azure SQL Databases. It is important to note that dynamic data masking is not designed with the purpose of extensive database security and will not be able to prevent database users from running intrusive queries to expose extra pieces of the sensitive data by connecting directly to the database. The feature can however be used in conjunction with other SQL security features such as encryption, row level security and auditing. There are a number of other restrictions\applications that should be noted; · Dynamic data masking will not work with; encrypted columns using Always Encrypted, FILESTREAM column types, COLUMN_SET or a sparse column that is part of a column set, computed columns (if the computed column depends on a masked column then the result will be masked data), keys for a FULLTEXT index. · Updates can still be made to a masked column, even though when queried the user will see masked data. · Using SELECT INTO or INSERT INTO to copy data from a masked column into another table will result in masked data in the target table. · When using SQL Server import and export functionality on a database containing masked data the resulting backup file or imported table will contain masked data. I will be posting a future blog showing in-depth real-life applications of dynamic data masking with examples, applied permissions and further applications for both on-premises SQL 2016 and Azure SQL Databases. Further Reading I will be posting a future blog showing in-depth real-life applications of dynamic data masking with examples, applied permissions and further applications for both on-premises SQL 2016 and Azure SQL Databases. For more detailed information see the following links;        MSDN Dynamic Data Masking, Get started with SQL Database Dynamic Data Masking (Azure Portal)

PerformancePoint Monitoring Dashboard Object Security

On the properties tab of every object in PPS Monitoring you will find a permissions section that allows you to assign either reader or editor rights.  These permissions actually relate to two quite different areas: What you will see when you view the deployed dashboard; and What objects you can use and edit to build a dashboard using dashboard designer. For the latter you'll also need be in a suitable dashboard designer security role which I've posted about previously but otherwise the concepts are fairly clear;  Reader will allow you to use the objects in your dashboard and Editor will allow you to edit the objects as well. For the viewing of dashboards things are a little less straight forward: DashboardsTo view a dashboard you'll need to be at least a member of the reader role otherwise you'll get a "dashboard is unavailable" message.  Being in the editor group adds no additional permissions when viewing the dashboard (that i can see) Data sourcesDashboard viewers need to have at least reader permissions on a data source if it used in a kpi or report or you will get an error message ScorecardsYou must be at least a reader on a scorecard to be able to view it in a dasboard otherwise it is just not displayed.  This, as with reports also, can obviously cause an issue with the layout of your dashboard as things will get moved depending on your permissions.To be able to add comments to KPI's you need to be a member of the editor role but only be a reader to view them KPIsIf a KPI is used on a dashboard that you have access to, the kpi will be displayed but you must have at least reader access on that particular KPI to see any values otherwise they will be blank.  Strangely, if you have editor permissions on the scorecard you will be able to add a comment to the KPI whether you have permission to see it or not ReportsTo view a report on a dashboard you need to be at least a reader.  If not the report will not appear at all (no message).  No additional permissions seem to be available in the editor role. IndicatorsFrom a display point of view Indicators inherit permission from the kpi they are displayed in, so there is no need to set any specific user permissions.  This seems to be the only area where any form of permission inheritance is used. Note that all roles can either use Groups or specific users. Note also that you only need to publish dashboards to PPSM server to update security permissions - there is no need to re-deploy to Sharepoint unless you have changed the layout of the dashboard.

Setting up PerformancePoint Monitoring Design Role Security

There's lot of info out there about setting up the application pool identity so that you can set up data sources for dashboards (For example).  However there seems to be very little about the various roles that are used in the Dashboard Designer and how to set them up. If you try and connect to the Dashboard designer without appropriate access it will let you open the application and try and create data sources etc but you'll just get an error message like the one below when you try and connect to a server. Granting Permissions is a bit hidden away if you don't know where to look and you need to be logged as an existing monitoring server administrator to do this: Click on the office icon top left and then the Options button. On the Server tab of the new window that pops up you'll see a Connect button. Enter the server name e.g. http://servername:40000/WebService/PmService.asmx Click the Connect button - if you're not an existing Monitoring Server admin (or a local admin on the monitoring box) you'll get an error message here If all is well the Server Options and Permissions buttons will get enabled Click Permissions and then Add on the next window and you'll see the window at the centre of the image below. Enter the user name and select the role you want to put that user in. If you want to put someone in two different roles (e.g. Power Reader and Data Source Manager) just add them twice. There are four different roles available: Admin. (unsurprisingly) full rights over the server to build dashboards, administer security etc.  Members of the (windows) administrator group on the Monitoring server are automatically put in this group. Data Source Manager. Create, delete and publish data sources on the monitoring server. Creator. Create any dashboard element (and delete any that they own - see below). Power Reader. Read-only access to everything. Finally, there is a further level to the security that allows you to assign any domain user to have rights to a particular dashboard element without them having to be members of any role on the server. To do this open the element that you wish to amend the permissions for and select the  Properties tab.  At the bottom you'll see a Permissions section.  In here you can add any domain user as an editor or reader. Don't forget to click publish after you've changed the security for any dashboard element. Happy Day of the Dead!!