Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

RLS sounds great until it isn't

DEV Community·Meg528·21 days ago
#OvZbBTvh
Reading 0:00
15s threshold

By Josh Brown When you leave your house, go to sleep, or go do work in the yard, you lock your door. Maybe you have a gate or fence you lock too. Without these, anyone can waltz into your house and snoop around. Row Level Security (RLS) can be attractive to developers for numerous reasons, but the foot-guns and gotchas in RLS often outweigh the benefits. You probably want to keep your doors locked. Friends and family: Managing access RLS for Postgres lets administrators define security policies in their database, instead of the application layer. Let's imagine your house is your database, and the rows, tables, and data are like the things inside. When your friends or family come over, you give them keys to every drawer they are allowed to have access to. Maybe everyone gets access to the silverware, but only the family can access your laundry room. This is similar to how policies work in RLS. The rules for who gets which keys are your policies.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More