warrant-dev / warrant

Warrant is a highly scalable, centralized authorization service based on Google Zanzibar. Use it to define, enforce, query, and audit application authorization and access control.
https://warrant.dev
Apache License 2.0
1.12k stars 39 forks source link

Allow Object Types with Empty Relations #317

Closed kkajla12 closed 5 months ago

kkajla12 commented 5 months ago

Is your feature request related to a problem? Please describe. For leaf object types (e.g. users) that won't have any relations assigned directly on them but will have relations assigned to them, it's currently required to create an object-type with a dummy/placeholder relation like this:

{
   "type": "user",
   "relations": {
      "placeholder": {}
   }
}

Describe the solution you'd like We should add support for creating object-types with an empty relations block to prevent having to do this. Instead, the user object-type would look like this:

{
   "type": "user",
   "relations": {}
}

Describe alternatives you've considered N/A

Additional context N/A