-
Notifications
You must be signed in to change notification settings - Fork 139
Provide Getter for Context from Request and attributes of the Entity #363
Description
Category
User level API changes
Describe the feature you'd like to request
Currently, both Request and Entity do not expose the API for user to retrieve the Context of the Request and Attribute of the Entity.
In my use case, I need to access both Request and Entity information for purposes like authorization logging and mapping these fields into the OCSF (Open Cybersecurity Framework) format. However, my current option is limited to using the to_string() method to store the entire context of the entity and request in the authorization log.
If cedar could introduce features such as Request.context() -> Option<impl Iterator<Item = (String, RestrictedExpression)>>, Entity.attributes() -> Option<HashMap<String, RestrictedExpression>> , it would significantly enhance my authorization log by providing additional information. It would be beneficial for user to access both fields such that user could do some data manipulation and other purpose.
Describe alternatives you've considered
I used to_string() to log the whole string into the authorization log.
Additional context
No response
Is this something that you'd be interested in working on?
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change