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

feat: make guardian multi-tenant using postgres RLS #389

Merged
merged 2 commits into from
Sep 3, 2023
Merged

Conversation

kushsharma
Copy link
Member

@kushsharma kushsharma commented Sep 2, 2023

  • using namespace_id in the database to shard different tenants
  • default namespace id will be a nil id, this will ensure if app is not used in multi-tenant envs, it still works as usual
  • namespace is extracted from the jwt claim and for now this claim key is configured under auth.fronter.namespace_claim_key with the default value as project_id
  • To enforce RLS, it's mandatory to not use super user in postgres connection credentials

- using namespace_id in the database to shard different tenants
- default namespace id will be a nil id, this will ensure if this
app is not used in multi-tenant envs, it still works as usual

Signed-off-by: Kush Sharma <thekushsharma@gmail.com>
Signed-off-by: Kush Sharma <thekushsharma@gmail.com>
@kushsharma kushsharma merged commit 5c8a46d into main Sep 3, 2023
4 checks passed
@kushsharma kushsharma deleted the multi-tenant branch September 3, 2023 13:01
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.

1 participant