#Hi again! I'm back with a multi-tenant
1 messages · Page 1 of 1 (latest)
Hi @rigid needle, thanks for sharing your use case. Regarding the model if you can share the whole schema - with explanations if poosible - we can examine and improve if needed. Right now it look ok though. Just confused at some part
object:business#view@role:viewer#members
So in this tuple you defined view as relation, but you express view as permission. As far as I understand you're saying every member that has viewer role have view permission in business object. Is that it ?
Regarding with the issue you have, I will discuss it with the team and circle back to you asap. Quick question on there, will the authorization logic can differ between tenants within time or it always stay same and your only concern is dublicated data and schema management ?
@proud dove yup that's correct, I'm based on the example "Custom Roles" (https://docs.permify.co/use-cases/custom-roles)
So far and from what I have in mind, the logic should be the same for all tenants, but it differs in that the user can have different roles and instances depending on the tenant they are in. And yes, I am concerned about the efficiency that the service may have given the duplication of these same rules (even the roles part) in each tenant, in addition to the fact that perhaps the only thing that can change is adding a new permission (which implies updating the schema for all tenants) or add new roles (which involves adding the same tuple in each tenant). In these cases I feel that it could be simpler than an update to all tenants
Hi @rigid needle, I've discuss this with the team and seems like we have two approaches for different use cases:
- If you're expecting the schema to not vary for different tenants, then managing it with a single schema and writing the data accordingly makes sense. You can create tenants in a model rather than using our tenant-based infra. For example:
entity user {}
entity tenant {
// Tenant-specific attributes & relations
}
entity organization {
// organization attributes and relations
}
- If you expect differences between policies for different tenants, we have an approach, but it hasn't been scheduled yet: https://permify.notion.site/Custom-Roles-7efcafec1b2a4a1b8e2c05a445b3be1a?pvs=74. Could you take a look and see if this solves your issue?
Hi @rigid needle, I noticed I sent the wrong link. Here's the correct one for your reference.