Just want to confirm that Resources need to be uni...
# help
m
Just want to confirm that Resources need to be uniquely named, yes? And if there is a case where, let's say two different business realms have a concept of a
contract
, would the best thing be to just specify
accounting_contract
as one resource and
label_contract
as another?
c
Yes, resource names have to be unique and adding a prefix to the name is certainly the easiest way to do it. Another (slightly harder) way is to keep the resource name as
contract
but change the
version
to
accounting
or
label
or so on. The downside to that is that you need to remember to use the correct
version
in all your API requests.
Uniqueness is checked based on the combination of kind, name, version and scope of each policy. You can't have two policy files that have the same values for those four fields.
m
thanks for clarifying!
@Charith (Cerbos) what is the difference between kind and name?
c
Oh, by
kind
I meant the policy kind (resource, principal, derived role). You can't really change that.
m
ahhh got it
c
Sorry, I should have made that clearer
m
all good!