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

PostgREST: Batch uploading of older data #42

Open
freol35241 opened this issue Aug 9, 2023 · 1 comment
Open

PostgREST: Batch uploading of older data #42

freol35241 opened this issue Aug 9, 2023 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@freol35241
Copy link
Contributor

freol35241 commented Aug 9, 2023

How to deal with the following constraints:

  • A user may only INSERT data for her allowed set of vessel_ids (defaulting to no permission to insert)
  • The inserted data must conform to the allowed tag names
@freol35241
Copy link
Contributor Author

freol35241 commented Aug 11, 2023

This should all be possible by combining:

  • A CHECK constraint on the tag parameter_id column to ensure nothing but the acceptable tag names gets inserted
  • A new role with INSERT permissions on the vessel_data view
  • Introduce row level security on vessel_data.master
  • Apply a permissive policy on SELECT for the
  • Apply a specific policy for INSERTing data that makes use of current_setting (see here) that checks a JWT claim of choice.
  • Make sure that RLS is performed using the invoking user by enabling security_invoker on the view (see here)

This way it should be configurable from a specific claim in the JWT which vessel_ids the token bearer may insert data to.

@freol35241 freol35241 added the enhancement New feature or request label Aug 29, 2023
@freol35241 freol35241 added the wontfix This will not be worked on label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant