Jesum Yip
08/24/2023, 4:06 AMDung Truong
08/24/2023, 9:52 PMarbitrary object
instead of just EFFECT_ALLOW/DENY
The use case of mine is, i want to return list of fields
user could access based on action
.Ayesha
08/25/2023, 1:05 PMJoseph Harkins
08/28/2023, 7:17 PM"error": "failed to get check for [attendee.default]: policy compilation error: 1 compilation errors:\nresource_policies/attendee.yaml: Derived roles import 'common_roles' cannot be found (import not found)"
+ same error for variables cannot be found
but it is not happening with the meeting policy...Kamran Biglari
08/29/2023, 3:02 PMNick Belovoskey
08/29/2023, 10:43 PMJoseph Harkins
08/30/2023, 11:12 PMJesum Yip
08/31/2023, 7:35 AMversion
? https://docs.cerbos.dev/cerbos/latest/policies/derived_roles. I know I can add it in as an attribute but I'm just wondering why this was engineered this way.LinenBot
08/31/2023, 2:54 PMkam
joined #help.ANILA SOMAN
09/02/2023, 3:56 PMBalwan singh
09/05/2023, 9:00 AMBotros Toro
09/05/2023, 5:30 PMIbrahim Bou Ncoula
09/07/2023, 10:51 AM# Annotations to add to the deployment.
deployment:
annotations:
<http://linkerd.io/inject|linkerd.io/inject>: enabled
<http://config.linkerd.io/skip-outbound-ports|config.linkerd.io/skip-outbound-ports>: "27017,4222,80,81"
<http://config.linkerd.io/shutdown-grace-period|config.linkerd.io/shutdown-grace-period>: "120"
<http://cluster-autoscaler.kubernetes.io/safe-to-evict|cluster-autoscaler.kubernetes.io/safe-to-evict>: "true"
Ibrahim Bou Ncoula
09/07/2023, 10:51 AMIbrahim Bou Ncoula
09/07/2023, 11:09 AMMesh Test 1
09/08/2023, 10:58 AMFarzad Soltani
09/09/2023, 11:58 AMMesh Test 1
09/11/2023, 9:16 AMKamran Biglari
09/11/2023, 9:25 AMlocation ~ ^/cerbos {
rewrite /cerbos/(.*) /$1 break;
proxy_pass <http://cerbos>;
}
Stephan Stylianides
09/11/2023, 5:52 PMRael Max
09/13/2023, 3:26 PMattr
of my Principal(user:1), associated with a role(e.g.: {"user": {"categories": [1, 2]}, "admin": {"categories": ["*"]}}
. Are the policy outputs
suitable for returning this category list to my application to perform some kind of filtering in the database, or do you have another recommendation for approaching this kind of problem?"Balwan singh
09/15/2023, 9:26 AMFarzad Soltani
09/19/2023, 11:29 AMcheckResources
method:
auxData: {
jwt: {
token,
keySetId: 'default',
},
},
The token comes from request.headers
in my Express app.
Since I'm doing all the decoding business in Cerbos, I was wondering how I was supposed to pass the user's id as the principal's id without decoding the token:
const {results} = await cerbos.checkResources({
principal: {
id: String(user.id),
roles: user.roles,
},
...
Farzad Soltani
09/19/2023, 12:30 PMexpr: request.resource.attr.roles == null
Rob Edwards
09/20/2023, 9:30 AMPeter Vicherek
09/20/2023, 4:10 PMFailed to load the test suite: invalid test "[RESOURCE] CRUD Actions": resource "[RESOURCE]" not found
My project structure looks like this
resource_policies/
|- [RESOURCE]/
|- [RESOURCE]_test.yaml
|- [RESOURCE].yaml
I skimmed through the testing docs to see if I missed anything, but without any luck. Could someone point me in the right direction pleasePeter Vicherek
09/20/2023, 4:28 PMANILA SOMAN
09/21/2023, 4:36 AMAnkit Khosla
09/24/2023, 8:20 AMattr
is empty. Should return DENY
, right?
derived role
# yaml-language-server: $schema=<https://api.cerbos.dev/latest/cerbos/policy/v1/Policy.schema.json>
# docs: <https://docs.cerbos.dev/cerbos/latest/policies/derived_roles>
apiVersion: api.cerbos.dev/v1
derivedRoles:
name: customer_roles
definitions:
- name: OWNER
parentRoles: ["USER"]
condition:
match:
expr: R.attr.owner.id == P.id
principal.json
{
"id": "12312312",
"roles": [
"OWNER"
],
"attr": {
"storeDetails": {
"id": "123",
"tenantId": "1234"
}
}
}
resource.json
{
"id": "13123123",
"kind": "order",
"attr": {}
}
resource policy:
- actions: ["order:read"]
effect: EFFECT_ALLOW
roles:
- OWNER
condition:
match:
expr: ("OWNER" in P.roles)
name: order_owner_rule
ANILA SOMAN
09/25/2023, 6:16 AM