-
Hi, I created the policy file look like this
But once I use dcheckResources API, only project policy can work correctly, not for user. Do I miss something in the policy file? |
Beta Was this translation helpful? Give feedback.
Answered by
haines
Jun 21, 2023
Replies: 1 comment
-
Hi @9m-pwn, you need to create two separate YAML files (e.g. user.yamlapiVersion: api.cerbos.dev/v1
resourcePolicy:
version: default
resource: user
rules:
- actions:
- "*"
effect: EFFECT_ALLOW
roles:
- admin
- super_user
- actions:
- read
effect: EFFECT_ALLOW
roles:
- user
- guest project.yamlapiVersion: api.cerbos.dev/v1
resourcePolicy:
version: default
resource: project
rules:
- actions:
- "*"
effect: EFFECT_ALLOW
roles:
- super_user
- actions:
- read
effect: EFFECT_ALLOW
roles:
- user
- guest |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
haines
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @9m-pwn, you need to create two separate YAML files (e.g.
project.yaml
anduser.yaml
) instead of putting them together in the same file.user.yaml
project.yaml