Reputation: 31
In the past I have implemented Row level security in Oracle and SQL Server databases using the security policies and predicate functions.
Now my organization is moving to Amazon Redshift as the data warehouse, looking for inputs on ways to implement RLS in Redshift for raw sql access by users.
example: table A has data for many regions. Columns "REGION" in table contains the region for which the row corresponds to. In the user_setup table, each user has the list of regions to which user should have access to.
table A:
table user_setup:
result expected: if Usr1 executes select * from A; Output should be:
if Usr2 executes select * from A; Output should be:
if Usr3 executes select * from A; Output should be: No rows returned.
Upvotes: 3
Views: 2540
Reputation: 111
I'm guessing after a year you found a solution, but just in case...
Implementing row based security (or row based access control) in AWS Redshift is not straightforward, but doable by:
You can find a proof of concept in this Redshift security guide I wrote.
Upvotes: 4