Hi! I'm trying to get into the Keto permissions on...
# talk-keto
a
Hi! I'm trying to get into the Keto permissions on Ory Network and I'm struggling a bit. I tried following the example in https://www.ory.sh/docs/guides/permissions/overview. Running
Copy code
ory is allowed User:Patrik view File keto/src/main.go
works as expected, returning
Allowed
. Now I'm trying to get the same result using the REST API (from https://www.ory.sh/docs/keto/reference/rest-api#tag/permission/operation/postCheckPermissionOrError) like
Copy code
curl "https://${ORY_PROJECT_SLUG}.<http://projects.oryapis.com/relation-tuples/check|projects.oryapis.com/relation-tuples/check>" -d '{"relation": "view", "subject_id": "User:Patrik", "namespace": "File", "object": "keto/src/main.go"}' -H "Authorization: Bearer ${ORY_SECRET}" -H "Content-Type: application/json"
I get
{ "allowed": false }
. Am I mixing something up?
I managed to get it working, the correct query is:
Copy code
curl "https://${ORY_PROJECT_SLUG}.<http://projects.oryapis.com/relation-tuples/check?relation=view&namespace=Folder&object=keto/&subject_set.namespace=User&subject_set.object=Patrik&subject_set.relation=|projects.oryapis.com/relation-tuples/check?relation=view&namespace=Folder&object=keto/&subject_set.namespace=User&subject_set.object=Patrik&subject_set.relation=>" -H "Authorization: Bearer ${ORY_SECRET}"  -v | jq