Tableau Row Level Security Reference

Tableau Row Level Security Reference

There are many options to implement row level security:

  1. ISMEMBEROF as data source filter or workbook filter
  2. USERNAME() x-db join with user entitlement table outside main data source (v10 feature) - can be either data source filter or workbook filter
  3. USERNAME() data source blending with user entitlement table outside main data source  - can be either data source filter or workbook filter
  4. USERNAME() x-db filter with user entitlement table outside main data source (v10 feature)
  5. Query banding for TeraData DB that has both user entitlement and main data source
  6. Initial SQL for Vertica, Oracle, SQL Server, Sybase ASE, Redshift etc where DB has both user entitlement and main data source

Key Takeaways

1.Tableau row level security works for extracts

2.Multiple options available for Tableau row level security

3.Use published data sources to integrate row level security

Data security has been one of the top concerns for Tableau enterprise adoption. Tableau handles data security by permission and row level security. Permission controls what workbooks/views an user can see. Row level security controls what data sets this user can see. For example APAC users see APAC sales, EMEA users see EMEA sales only while both APAC and EMEA users have the same permission to the same workbook.

Does Tableau row level security works with extracts? Yes. This blog provides everything you need to know to create row level security controls for extracts and live connections, includes a new approach leveraging V10 x-db join features.

Use case : To create one workbook that server users can see subset of the data based on their Region (Central, East, South and West) and segments (Consumer, Corporate and Home Office) they are assigned to.

Solution A – Workbook filter for Row Level Security by Group

  1. Create following 12 Tableau server groups (Central-Consumer, Central-Corporate, Central-HomeOffice, East-Consumer, East-Corporate, East-HomeOffice,….). Central-Consumer group has all the Central region users who are assigned to Consumer segment….
  2.  Create calculated field
  3. ISMEMBEROF(‘Central-Consumer’) AND [Region] = ‘Central’ AND [Segment] = ‘Consumer’ OR
  4. ISMEMBEROF(‘Central-Coporate’) AND [Region] = ‘Central’ AND [Segment] = ‘Coporate’ OR
  5. ISMEMBEROF(‘Central-HomeOffice’) AND [Region] = ‘Central’ AND [Segment] = ‘HomeOffice’ OR
  6. ISMEMBEROF(‘West-Consumer’) AND [Region] = ‘West’ AND [Segment] = ‘Consumer’ OR
  7. ISMEMBEROF(‘West-Coporate’) AND [Region] = ‘West’ AND [Segment] = ‘Coporate’ OR
  8. ISMEMBEROF(‘West-HomeOffice’) AND [Region] = ‘West’ AND [Segment] = ‘HomeOffice’ OR
  9. ISMEMBEROF(‘East-Consumer’) AND [Region] = ‘East’ AND [Segment] = ‘Consumer’ OR
  10. ISMEMBEROF(‘East-Coporate’) AND [Region] = ‘East’ AND [Segment] = ‘Coporate’ OR
  11. ISMEMBEROF(‘East-HomeOffice’) AND [Region] = ‘East’ AND [Segment] = ‘HomeOffice’ OR
  12. ISMEMBEROF(‘South-Consumer’) AND [Region] = ‘South’ AND [Segment] = ‘Consumer’ OR
  13. ISMEMBEROF(‘South-Coporate’) AND [Region] = ‘South’ AND [Segment] = ‘Coporate’ OR
  14. ISMEMBEROF(‘South-HomeOffice’) AND [Region] = ‘South’ AND [Segment] = ‘HomeOffice’
  15. Add the calculated field to filter and select ‘true’
  16. After publish the workbook, set interactor permission to all the above 12 groups.
  17. Make sure Web Editing as No, Download as No.

That is all. ISMEMBEROF returns true if server current user is member of given group. ISMEMBEROF is the key function to use here. It  works for both extracts and live connection.

Notice that the control is a workbook filter. If workbook is downloaded, filter can be changed so the row level security will not work anymore, which is why workbook permission has to set download permission as No.

The better solution is to use data source filter for ISMEMBEROF calculation instead of workbook filter

Solution B – Data Source Filter for Row Level Security by Group

  1. You have the groups and calculated field from Solution A step 1 and step 2
  2. Edit data source filters to include the calculated field and select ‘true’
  3. Publish the data sources and set connect only permission (no edit)
  4. After publish the workbook, set permission to all the above 12 groups. There is no need to put the above calculated field to workbook filter anymore since filter is at data source level now.

Published data sources are reusable, single source of truth, less loads to data sources and now you have governed row level security built-in.

The Solution B works extracts. The only thing is that it is little tricky during workbook development process where you will need to make local extract local copy to simulate the user behavior from Desktop, and replace data sources from local to server published data source before publish the workbook, you will need to copy & paste all calculations.

The above approaches control user’s visibility of data sets by Tableau server groups. It assumes that you will manage the group members outside Tableau. When have too many data security groups to manage manaually, you can automate the group member creation by using Server REST API or your corp directory automation tool.

When group approach in Solution A & B can’t scale, the following USERNAME() approach will be another good option.

Solution C – Entitlement table x-db join for Row Level Security

Same use case but you want to add category as dimension for row level security in additional to Region and Segment. Now you will need 100+ groups just for row level security purpose which can be a lot to manage. We are going to use Tableau’s USERNAME() function which returns current server user name.

要查看或添加评论,请登录

Hemant D.的更多文章

  • Advanced Data cleaning technique in Python

    Advanced Data cleaning technique in Python

    1. Load and Inspect the Data Start by loading the dataset and inspecting its structure to identify issues.

    2 条评论
  • DATA ANALYSIS IN PYTHON

    DATA ANALYSIS IN PYTHON

    Data analysis in Python typically follows a structured process. Here’s a step-by-step outline to guide you: 1.

  • Numpy

    Numpy

    What is NumPy? NumPy (Numerical Python) is an open-source library used for numerical computing. It provides support for…

    2 条评论
  • Python 3.13

    Python 3.13

    Python 3.13.

  • Tableau Pulse :

    Tableau Pulse :

    Tableau Pulse is a feature introduced by Tableau as part of its broader focus on enhancing the data experience for…

  • Pyhton Notes Edition 6:

    Pyhton Notes Edition 6:

    Do you realize that how to generate a sequence number in python? There are several ways to generate a sequence number…

  • How to generate OTP in Python?

    How to generate OTP in Python?

    You can generate a One-Time Password (OTP) in Python using various methods. Here are a few common approaches: 1.

  • IDENTFIERS

    IDENTFIERS

    In Python, identifiers are names given to entities like variables, functions, classes, modules, etc. Here are the rules…

    2 条评论
  • Python Notes Edition 3

    Python Notes Edition 3

    Freeware: =>If any software downloaded Freely and that Software comes under Freeware Examples: Python, Java-----…

    1 条评论
  • Python Version

    Python Version

    ==================================================== Python programming language contains 3 Types of version. They are…

社区洞察

其他会员也浏览了