Skip to content

Modelling Tenant wise module access using Cerbos #2134

Answered by charithe
yogimogi asked this question in Q&A
Discussion options

You must be logged in to vote

The tenant to module mapping should be stored in your own database because it can be very efficiently queried to find the set of modules enabled for a given tenant. If all users belonging to the tenant have complete access to the enabled modules, then you can make the decision at the application level itself using just a query. If you require more fine-grained control, you can make a request to Cerbos with the set of enabled modules as a principal attribute. Your policies can then make access control decisions based on that set.

---
apiVersion: api.cerbos.dev/v1
resourcePolicy:
  resource: "foo" 
  version: "default"
  rules: 
    - actions: ['frobnicate']
      effect: EFFECT_ALLOW
      r…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yogimogi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants