-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding row level security to sample and genomics tables #328
Conversation
Adding security invoker to shipping views to enforce row-level security policies on the underlying tables. By specifying this option, the current user's permissions are applied rather than the default (view owner's) permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good Dave and is working for me on my local (upgraded to 15.3). Unless I'm mistaken on the SSH tunnel, we will also need to update sqitch.conf
to point to localhost and access ID3C via SSH to deploy this via Sqitch.
Just making sure I understand the Metabase side: We would have add a new Metabase user that has access to the marked Cascadia data (the default metabase user would not have that access). We'd then create a new Metabase database connection using that user to hit ID3C.
Then Metabase users with Cascadia privileges would be inside a Cascadia group, which would then be the only group with access to that new Cascadia database connection.
Thanks, you're right That's correct on Metabase data access, there will also be a Cascadia group role for direct connections. |
Databases are no longer directly accessible, and each environment may have connections to ID3C configured differently, so replacing hard coded URIs with placeholders. `sqitch.template.conf` should be copied to `sqitch.conf` and the database connection URIs should updated in that file prior to running sqitch commands.
cb52e76
to
fdaa5da
Compare
… and receiving.sequence_read_set
0d1423a
to
05bb235
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, we will need to ensure that no additional users are members of the dumper
role before deploying to ensure that no one retains undesirable access to the receiving tables.
Deployed via sqitch. |
Adds row-level security to the following tables in warehouse schema:
An
access_role
column has been added to each table to store an optional role name that the data is accessible to. The default behavior (with access_role=NULL) will remain unchanged, with no row-level security enforced.Note: I did not add verify scripts for each table, as some of the them have foreign key constraints that can cause those fail if things aren't populated yet. I may revisit this if I have more time, but for now, testing sqitch deploy and revert should be sufficient.