Change EntityUID
to always be concrete
#72
Labels
backlog
We hope to work on this in the future
internal-improvement
Refactoring, performance improvement, or other non-breaking change
Category
Other
Describe the feature you'd like to request
Currently, an
EntityUID
stores a reference to itsEntityType
, which can be eitherConcrete
orUnspecified
. We introduced theEntityType
type to support omitting entities in the input query. For example: when the "resource" of a query should have no impact on the authorization result, then users should not need to provide a resource entity when callingis_authorized
.However, we never actually expect an
EntityUID
to be "Unspecified", which leads to extra error handling code in several locations.Describe the solution you'd like
In CedarCore, the type
EntityUID
should always be concrete (i.e., itsEntityType
component should just be aName
), and "Unspecified" entities should only be possible when constructing aQuery
. This requires some refactoring of the code, but should introduce no breaking changes.Describe alternatives you've considered
The current implementation works, but is more complicated than necessary.
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: