unexpected expand/lookup behaviour with wildcard permissions #358
Labels
area/api v0
Affects the v0 API
area/tooling
Affects the dev or user toolchain (e.g. tests, ci, build tools)
kind/bug
Something is broken or regressed
priority/2 medium
This needs to be done
Reproduction: https://play.authzed.com/s/Ay9ZZJBrGDKu (check validation tab)
As I run some experiments with the new wildcard permissions feature, I stumbled upon an apparently unexpected behaviour when doing lookup/expand. Permissions that effectively end up in
user* & userset
behave correctly with Check API, but not with Lookup/Expand API (which is presumably what's used in thevalidation
tab in the playground).In the original issue, we discussed that SpiceDB will have special treatment to
user:*
relationship when performing Lookup/Expand API, which is reasonable because it would lead to "listing all public resources" phenomenon. However, whenuser:*
is chained with other algebraic operators like&
and-
, I think the current implementation semantics seem unexpected. The desirable outcome would be:<user:userset> - <user:*> = empty
<user:userset> & <user:*> = <user:userset>
The text was updated successfully, but these errors were encountered: