SpacetimeDB
SpacetimeDB copied to clipboard
Adding the system table for row level security
Description of Changes
Add a new system table st_row_level_security to store the SQL queries for row-level security.
This is a first step to add support for authorization. This PR doesn't validate that the queries are valid, that will done when #1602 is implemented.
Closes #1600.
Expected complexity level and risk
2: It adds a new system table and because we haven't yet migrated support for them, it needs a recreate of the db.
Testing
- [x] Add extra test for RLS
- [x] Because we don't have any RLS in the initial bootstrap I also add a test for reload after creating one
- [x] Check using the
SQL clithe new table
It seems to me that arbitrary changes to row-level security can be performed automatically.
If we need to check the validity of the sql then probably not.
My main questions are:
- Can we get rid of the
namecolumn? I believe we can.- Do we need a primary key column? I believe we don't.
Yes, is already done