eager-doctor-25844
10/17/2022, 7:06 AMfreezing-solstice-24704
10/17/2022, 11:23 AMnamespace:object#relation@subject
then maybe setup a basic proof of concept to see if it satisfies your needs ory ketoeager-doctor-25844
10/17/2022, 11:30 AMfreezing-solstice-24704
10/17/2022, 11:43 AMList
endpoint and the Check
endpoint you could find a solution that works.
You could perform a List call to fetch a list of objects a user has access to and cache that response. You could use this to influence your UI state (e.g. not a clan owner so you don’t see the options for deleting the clan).
You would only have to perform Checks
when you are validating an action (e.g. clan management owner can delete clan, admin can edit, moderator can kick, member can join, etc.). This should be done server side, as malicious users could easily bypass the checks if they are client-side and could gain access to whatever they like.
Also, Keto just released subject set rewrites that allows you to define a hierarchy of relations in Ory’s Permission Language which will be really useful for setting up the hierarchies of things like clan relations (e.g. owner inherits admin, which inherits moderator, which inherits member, so when you add a new admin you don’t have to add all 3 relation tuples, but can still simplify your Checks
to one of the lower levels (e.g. checking if an admin is a member = true)eager-doctor-25844
10/17/2022, 11:52 AMList
endpoint is exactly what I need. About the Ory's Permission language, I am wondering what will happen if the tuples disagree with the global permission rules? e.g. The manager of the clan can't modify clan name by default in global rules. But I add a tuple that one manager can modify his clan name.freezing-solstice-24704
10/17/2022, 12:00 PMRBAC
and ABAC
, where you have RBAC for default behaviour and ABAC for fine grained control.
e.g. user is a clan manager
and by default can only do the actions that have been programmed to work on a successful manager
check (RBAC - manager
is the role), then a secondary check (or maybe a single check if the permission language supports it) for the specific action (ABAC - action/attribute here is changing the clan name can_change_name
). If a user is given the relation tuple for being able to perform the specific action, the check will be true regardless of whether or not they are a manager. Pairing the checks in the server could force both to be required (has to be manager + has to have name changing relation)
I wouldn’t be able to tell you if there is a nice way of mixing the two using the permission language as I have yet to properly sink my teeth into it, but will be doing soon!eager-doctor-25844
10/17/2022, 12:09 PMDefault Rules
, and we also want our player can change the Rules as their wish within limitation. I think Casbin
has similar functionality of handling default and exception.steep-lamp-91158
steep-lamp-91158