cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
889 stars 80 forks source link

[partial-eval][cli] Add schema support to `partially-authorize` CLI command #1332

Open palpatim opened 17 hours ago

palpatim commented 17 hours ago

Category

CLI features/changes

Describe the feature you'd like to request

The authorize CLI command includes schema and schema-format options that inform the evaluation, but partially-authorize lacks that support. This came up as I was trying to get a partial evaluation for an action that was a member of an action group. My policy was written to specify the action group, and my entities file did not include the action hierarchy, so partially-authorize returned a DENY instead of the expected residual.

Describe alternatives you've considered

Do not support this feature. I'm unclear on the benefits of providing a schema to the decision -- it may be that it's redundant with providing the hierarchy definitions in an entity slice, and there may be design reasons for preferring to receive that information in entities rather than schemas.

Additional context

No response

Is this something that you'd be interested in working on?