{"repo":"suus-io/rls_rails","free":true,"listed":false,"github":"https://github.com/suus-io/rls_rails","clone":"git clone https://github.com/suus-io/rls_rails.git","description":"Row Level Security for Ruby on Rails","language":"Ruby","stars":81,"topics":["ruby-on-rails","row-level-security","postgresql","rails","rls"],"license":"MIT","category":"databases-storage","readme_excerpt":"Row Level Security for Ruby on Rails Row Level Security (RLS) is a feature of PostgreSQL (see PG Docs: About RLS and PG Docs: CREATE POLICY) that allows you to define rules to check whether SELECT, INSERT, UPDATE or DELETEs are accessing or creating legitimate rows. RLS gives your application a second line of defense when isolating data in a multi-user application. A mistake in the rapidly changing application code may easily leak data or introduce severe security threads. With RLS PostgreSQL always double checks whether the data going in or out complies with the defined policies. Note that some database roles bypass RLS however, eg. in order to take backups: Superusers and roles with the BYPASSRLS attribute always bypass the row security system when accessing a table. Table owners normally bypass row security as well, though a table owner can choose to be subject to row security with ALTER TABLE ... FORCE ROW LEVEL SECURITY. (https://www.postgresql.org/docs/current/ddl-rowsecurity.html) Compatibility This gem is tested with Ruby 2.7 and Ruby 3.0 against Rails 6.0, 6.1 and 7.0. Tests for Ruby 3.1 are not running due to a problem with psych 4.0 which is responsible for loading the ruby-interpolated database.yaml configuration (details here). This does not mean this Gem is not compatible with Ruby 3.1, it may be anyway, we haven't tried yet. PRs welcome ;-) Usage Migrations - enable rls(table, force: false) : Enables RLS for table . Option force yields to application of RLS for","default_branch":null,"files":null,"tree":[],"storefront":"/r/suus-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/suus-io/rls_rails/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}