Using Postgres Row-Level Security in Ruby on Rails
29-May-2021 1465
Securing access to your Postgres database is more important than ever. With applications growing more complex, often times using multiple programming languages and frameworks within the same app, it can be challenging to ensure access to customer data is handled consistently. For example, if you are building a SaaS application where different companies use the application, you don't want users of Company A to see the data of users in Company B by accident.Sure, you could use create a separate Postgres schema for each customer, or try to ensure the WHERE clause of every single query includes the particular company—but what if you forget a WHERE clause? That means users from company A will be able to see or manipulate data from company B and maybe other companies, at some point. You don't want that to happen.
Using Postgres Row-Level Security in Ruby on Rails #ruby #rubydeveloper #rubyonrails #Using #Postgres #Row-Level #Security #Rails #security https://rubyonrails.ba/link/using-postgres-row-level-security-in-ruby-on-rails