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

Filtering MySQL data by rails session parameter

I've got a rails application, backed by MySQL. It's using a row-level permissions model. i.e. I have a few columns (permission1, permission2, permission3) on a table called projects and I need to check if the user who has details of the permissions…
rich
  • 18,987
  • 11
  • 75
  • 101
0
votes
1 answer

Use SA_USER_NAME in function

I tried to create a simple function like this but it not working. Data is returned but it's the same as if there were no policy. CREATE OR REPLACE FUNCTION test (schema in varchar2, tab in varchar2) RETURN varchar2 AS predicate varchar2(4000); …
0
votes
3 answers

Row-level ACL in Laravel 4

Is it possible to create row-level authentication in Laravel 4? Is there any bundle or package for it?
Ajay Patel
  • 791
  • 11
  • 24
0
votes
1 answer

Performance implications of using (DBMS_RLS) Oracle Row Level Security(RLS)?

If we use Oracle Row Level Security(RLS) to hide some records - Are there any Performance Implications - will it slow down my SQL Queries? The Oracle Package for this is: DBMS_RLS. I plan to add: IS_HISTORICAL=T/F to some tables. And then using RLS,…
Jasper
  • 8,440
  • 31
  • 92
  • 133
-1
votes
1 answer

How to check if the current user inherits the BYPASSRLS attribute from a role?

I need to check whether row-level-security applies to the current_user in a Postgres query. As far as I can tell, I need to check whether the current user is the owner of that table, or has the BYPASSRLS attribute, or is member of a role that has…
Bergi
  • 630,263
  • 148
  • 957
  • 1,375
-1
votes
1 answer

RLS Policy doesn't applied for table in PostgreSQL while the RLS has been enabled

I've trying to apply RLS on my PostgreSQL 14. But it seems didn't work. Here it's my SQL (i run it on PgAdmin4): CREATE TABLE IF NOT EXISTS public.employee ( tenant_id character varying(255) NOT NULL, username character varying(255) NOT…
-6
votes
1 answer

SQL Server Row Level Security with condition

I am trying to implement RLS on a Table (fin.RLS_Data) with following Function. I have another table stg.UserAccess to control who can access the Data Table (RLS_Data). I am testing this on Microsoft SQL Server 2022 (RTM-CU5) (KB5026806) -…
roy
  • 6,344
  • 24
  • 92
  • 174
1 2 3
24
25