Skip to content

Conversation

hobbescodes
Copy link
Contributor

@hobbescodes hobbescodes commented Jan 27, 2025

Description

Task link: https://linear.app/omnidev/issue/OMNI-149/rbac

This PR adds RBAC for API access. Each table from the database schema has been provided its own postgraphile plugin to handle access control on mutations. A few other adjustments were made like limiting the exposed mutations to being just those that perform CRUD operations through the PK relation (i.e. there is no updatePostBySlugAndOrganizationId anymore). Other additions include setting up a few key features and security benefits such as graphql-armor, as well as adding proper index support for PKs and FKs.

Test Steps

  1. Verify that logic is sound
  2. Verify that all plugins work as expected and appropriately restrict API access. Please be thorough in testing as many edge cases and you can think of.
  3. Validate / check the additional security of graphql-armor plugins

@hobbescodes hobbescodes marked this pull request as ready for review January 29, 2025 22:42
@hobbescodes hobbescodes merged commit 0b64c51 into master Feb 14, 2025
@hobbescodes hobbescodes deleted the feature/rbac branch February 14, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants