Questions tagged [row-level-security]

Row-level security is database security term which relates to the ability to define and enforce access control logic on rows of data such that a user can only retrieve the rows of data he or she is allowed to view.

Row-level security is database security term which relates to the ability to define and enforce access control logic on rows of data such that a user can only retrieve the rows of data he or she is allowed to view.

Several database vendors provide row-level security mechanisms. For instance:

  • Oracle provides Virtual Private Database (VPD), a free feature of the Oracle Enterprise Database.
  • MySQL provides fine-grained access control (FGAC). This is further detailed in this 2006 article.
  • IBM DB2 provides row/column-level access control (RCAC). This is further detailed in this IBM knowledge base.
  • SQL Server and Azure SQL Database provide Row-Level Security (RLS). This is further detailed in the MSDN product documentation.

In row-level security, a user can ask to view a set of data e.g. medical records. The database table (or view) contains a complete set of medical records but only returns those records the user is entitled to view. The authorization is typically driven through the configuration of VPD/RCAC/FGAC or through an access control policy e.g. doctors can view the medical records of patients they are assigned to.

Row-level security is becoming more prevalent with the rise of and , technologies that help standardize access control.

An extension of row-level security is the ability to apply cell-level security. This space has been coined as dynamic data masking by Gartner analyst Joseph Feiman (see this report and these videos on data masking).

There are several third party vendor solutions which provide row-level security / dynamic data masking:

  • GreenSQL
  • Informatica DDM
  • Axiomatics Data Access Filter MD

Additional information and vendors are listed on Wikipedia.

367 questions
0
votes
1 answer

Using USERNAME as part of a condition in Power BI

Let's suppose I've got a simple table with two columns: user, value Is it possible to use the function USERNAME within a code in order to filter the information that corresponds only to the user that is logged? Something like this: Select username,…
0
votes
1 answer

DAX SUMMARIZE function isn't respecting row-based security in my Power BI Model

I'm adding Row-level security to a Power BI model and it's working on all the normal tables, but there's a DAX table created from a SUMMARIZE that's ignoring the security. I've created a small model that reproduces the issue - am I doing something…
SqlRyan
  • 33,116
  • 33
  • 114
  • 199
0
votes
1 answer

Can we implement row level security in Tableau version 9.2?

I am working on a POC where I need to know some features which are available in tableau version 9.2 Due to type of license available, we cannot upgrade to higher version as it will required a different tableau server license.
conetfun
  • 1,605
  • 4
  • 17
  • 38
0
votes
0 answers

SQL Server Row Level Security not working on Foreign Keys

I do have an Azure SQL Database running. In there I do have 3 Tables Users UserProject Projects A normal many-to-many relationship. A user can have multiple projects and a project can have multiple users. The rows are linked by IDs and…
Stefan
  • 1,007
  • 1
  • 11
  • 32
0
votes
1 answer

Row Level Security Enabled update is not working while standard update does using the same logic

Working on postgres 10.4 (on RDS if it makes a difference) I am trying to enforce application user permissions using Row Level Security. I have a permissions table which looks something like user_group_id | entity1 | entity2 | entity3 |…
Pyrocks
  • 401
  • 3
  • 14
0
votes
0 answers

postgres "force row level security" executed, but associated policies disabled

In my pg migrations, I execute the following SQL: grant all on all tables in schema denolandia to my_user; ... alter table denolandia.packages force row level security; create policy update_packages on denolandia.packages for insert …
cdaringe
  • 1,274
  • 2
  • 15
  • 33
0
votes
1 answer

Row level security does not work for table owner

I have a table, customer on which I did the following: ALTER TABLE customer FORCE ROW LEVEL SECURITY; CREATE POLICY customer_rls ON customer USING (false); However, doing SELECT * FROM customer still returns all the rows. The current role is…
Luka Horvat
  • 4,283
  • 3
  • 30
  • 48
0
votes
2 answers

How to get permissions in cakePHP

First, sorry for my language skills, I am not used to writing in English. ;) I'm trying to develop my first cakePHP application. What I'm trying to do: Users are in groups and groups have access to different locations. Users can add reservations…
0
votes
1 answer

Sharing Power BI published reports with RLS as public

I am building several reports in Power BI and I applied RLS (Row Level Security) to them in Power BI Desktop and the service. But I am not being able to generate a public link to share with external people (outside the organization or even without…
0
votes
1 answer

Find out what Data Security Profiles look like

A colleague has left the company. We know she implemented Data Security Profiles in our SAP BO 4.1 (unx universes) She somehow implemented row-level security. We do not know how. There are questions now how this row-level security is working. To…
Henrov
  • 1,610
  • 1
  • 24
  • 52
0
votes
0 answers

PostgreSQL - Restrict Delete/Update on a table to a specific role depending on value of a field

Is it possible to prevent the update/delete of a row in a table to a specific role depending on a value of the row? This role should be able to query rows using select. Example: Saying that we have an user bob and admin. flag = 0, bob should be…
0
votes
0 answers

Row Level Security: Same query is running with less time at Test Environment and Its taking long to execute at PROD

I have come across a strange scenario of performance in data warehouse where we are maintaining data for multi tenants. Same query is running in less time at Test Environment and Its taking long to execute at PROD. I have tried these things: When…
0
votes
1 answer

Performance issue using Row Level Security using lookup table

I have implemented Row Level Security using on SQL Server 2016. I think I have a failry complex setup, but our security requirement is complex. This is in the context of a data warehouse. I have basic fact and dimension tables. I applied row level…
0
votes
0 answers

intersect usage on postgresql with row level security

create table user_table( idx text, _section text[] ); create table section_table( _section text, sub_section text[] ); alter table user_table enable row level security; create policy user_p on user_table for select using (section…
lin
  • 167
  • 1
  • 3
  • 13
0
votes
1 answer

Row level policy doesn't work on my table

I have a table which I'm trying to apply a policy on, the setup looks something like this: create role anonymous nologin; create schema api; create schema private; create table private.mytable( id serial primary key, description text…
Alex Kubica
  • 67
  • 10