Hello, we need some use-case/schema modelling assistance -
We're trying to model a sort-of-attribute-based authz with our existing SpiceDB Schema. We looked at the ABAC guide here -
https://authzed.com/docs/spicedb/modeling/attributes and while it would work for some of our cases (not all), it seems like the recommended way to do it is via Caveats.
We need to be able to give permissions to a resource(A) in a few ways
1. Only if a 'setting' is enabled in a
related resource(B).
2. Only if a certain condition (ideally sent in the caveat context) in the
related resource(B) is true
The problem we're running into is that caveats seem to be defined only against relations and not permissions. With that constraint, we cannot use the same relation across multiple permissions, only some of which might require that caveat.
I've made a small reproducible schema with comments on what we're stuck on -
https://play.authzed.com/s/C2CfvNEhS2mj/schema
Any help/alternative ways to achieve what we want would be highly appreciated!