Skip to content
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

Updates to policies #589

Open
CarlosNZ opened this issue Sep 22, 2021 · 1 comment
Open

Updates to policies #589

CarlosNZ opened this issue Sep 22, 2021 · 1 comment
Assignees
Labels
Epic #45: Applicant view applications permission Applicant view applications by permission Epic #60: Reviewer view applications by permission Reviewer view applications by permission Feature: refactor Code needs refactoring/optimising
Milestone

Comments

@CarlosNZ
Copy link
Collaborator

CarlosNZ commented Sep 22, 2021

After discussion with @andreievg:

Top priority

  • update View policies for user and organisation tables so that there is a policy to restrict by org (only see users in own orgs), restrict by user (only see orgs users belong to), and a non-restricted policy (for senior staff to see all users/orgs)
  • revoking (disabling) permissions needs to be enforced with row-level permissions (and front-end, for available options). User with disabled permission needs to be able to see their existing applications of that type, but not start new ones.

Next priority

  • check (at least) view policies for all "core" tables to ensure that they have row-level permissions enabled and that at least a valid JWT is required to view at all
  • write (update?) policies for tables with triggers to restrict by userID (or sessionID)
  • update Modify Record "Create Table" method to insert a policy for it to require an Admin JWT by default (For new Outcome tables -- should only be accessed via Outcomes API)

For safety

  • look into handling errors when updating row-level policies, ensuring that we don't inadvertently open access if policy update fails (Also, probably want to figure out solution for when the Update script runs on the server -- should it be triggered by an event? On a schedule?)

Regarding new Outcomes, it was agreed that ultimately a full row-level solution would be desirable, building the methodology to create appropriate policies on the fly for new tables is not trivial and would be tricky to customise for multiple outcome layouts, so we will create a "filtering" option also on OutcomeDisplay configs to handle this through the API -- and Outcomes will only be accessed outside the server via the API -- see #590

@nmadruga
Copy link
Contributor

Should only allow user who is deleting an applicant (that they have applied for) if the status of it is on Draft. Maybe we would like to prevent deleting if on Draft after being set to Changes-Required too? Not sure. If that's the case I would suggest using another status for application during changes to simplify the complexity of this row-level restriction.

@nmadruga nmadruga added Sprint52 27/09/2021 - 01/10/2021 Sprint53 04/10/2021 - 08/10/2021 and removed Sprint51 20/09/2021 - 24/09/2021 Sprint52 27/09/2021 - 01/10/2021 labels Sep 29, 2021
@nmadruga nmadruga pinned this issue Oct 5, 2021
@nmadruga nmadruga added Feature: refactor Code needs refactoring/optimising and removed Sprint53 04/10/2021 - 08/10/2021 labels Mar 17, 2022
@nmadruga nmadruga added this to the 0.2.1 milestone Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic #45: Applicant view applications permission Applicant view applications by permission Epic #60: Reviewer view applications by permission Reviewer view applications by permission Feature: refactor Code needs refactoring/optimising
Projects
None yet
Development

No branches or pull requests

3 participants