ory / keto

The most scalable and customizable permission server on the market. Fix your slow or broken permission system with Google's proven "Zanzibar" approach. Supports ACL, RBAC, and more. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.

Home Page:https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=keto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cats video example broken in v0.7.0-alpha.0

Uli-Tiger opened this issue · comments

Describe the bug

When following the guide https://www.ory.sh/keto/docs/next/quickstart you clone the latest and greatest :-) keto, so basically v0.7.0-alpha.0 . When starting the cats example via docker compose you get the following init output.

NAMESPACE OBJECT RELATION NAME SUBJECT
videos /cats/1.mp4 owner
videos /cats/1.mp4 view
videos /cats/1.mp4 view
videos /cats/2.mp4 owner
videos /cats/2.mp4 view
videos /cats owner
videos /cats view

So all tuples are created with empty subject, which is already contra-dictionary to the example output given in the guide. Anyways when you follow the guide the application continuous to behave differently.
For example keto check "*" view videos /cats/1.mp4 should return ALLOWED, but instead it returns DENIED. Considering the fact that subjects were initialized withe empty values, this somewhat expected.

Reproducing the bug

Potential fix
i could fix this locally, by upgrading the keto version in
contrib/cat-videos-example/cats-exmapleketo.yml
contrib/cat-videos-example/docker-compose.yml
to v0.7.0-alpha.0

The relation tuple files were updated accordingly, but the image versions in the docker-compose.yml were not, sorry for that.
Don't we have automation for that already @aeneasr? Otherwise it would be a good use of the pre-release hooks 😉

We do have that. The problem is that the docs need to be updated before the tag is done so this is now part of the Ory CLI publish task. The replacements are defined here: https://github.com/ory/kratos/blob/master/docs/config.js

But this is not part of the docs, but the docker-compose.yml for the quickstart.