Friday, 9 February 2018

Row Level Security

I am not actually going to put any code into this post but rather just discuss a concept, hopefully going forwards I will find the time to create the time to allow me to make a detailed post on this. Basically I want to discuss row level security. This is something I have experience implementing on Oracle having designed and maintained this system in one of my jobs for several years and I have also investigated implementing on SQL server and plan to do so shortly, either on my home system or at work if the opportunity presents itself. 

Row Level Security means allowing certain users access to certain rows based on their security, hence the name. This is implemented though the addition of a where clause based on the users role. For example say you have a group of users called team super secure and in a table on contracts I have a security column and some of the rows are listed a super secure. Only users in the super secure group will be able to see these rows because all row level security allows you to add a predicate to all SQL statements that are run against the table. So based on the user it will add something like SecurityColumn in ('All',Super Secure') for the super secure users but other users will only have the rows will the 'All' tags as their predicate will have SecurityColumn in ('All'). 


No comments:

Post a Comment