Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type constraints on partial-evaluation unknowns #812

Open
1 of 2 tasks
cdisselkoen opened this issue Apr 24, 2024 · 0 comments
Open
1 of 2 tasks

Type constraints on partial-evaluation unknowns #812

cdisselkoen opened this issue Apr 24, 2024 · 0 comments
Labels
backlog We hope to work on this in the future feature-request Request for a new feature

Comments

@cdisselkoen
Copy link
Contributor

Category

User level API features/changes

Describe the feature you'd like to request

It would be nice if partial evaluation could answer questions like, can the principal access any resource of type “Order”. (Or similarly, can any principals of type "Contractor" access a given resource.) Users have been asking for this, e.g., for UX usecases to decide whether to show the user a “list orders” button.

To support this, we would like to support type constraints on partial-evaluation unknowns. Specifically, instead of just leaving resource completely unknown, the API would allow specifying the type of resource but leaving the entity ID, parents, attributes, etc unknown. And likewise for principal. (And probably action, if we wanted to also handle questions like, can the principal perform any action in the Foo namespace on this resource.)

Related to #325, but #325 focuses on type-checking specifically, while this issue is about enabling new kinds of partial-evaluation queries. This issue would hopefully be able to share implementation with #325, although since the motivations are different, it's possible the user experience ends up looking different than it would for #325 alone.

Describe alternatives you've considered

We could contemplate a more powerful and general version of this, allowing more kinds of constraints on unknowns or even arbitrary constraints written as Cedar expressions. For example, "can the principal access any resource in this group". However, this issue was written for type constraints specifically, envisioning that this might be significantly easier (in API design or implementation or both) than the general case.

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
@cdisselkoen cdisselkoen added backlog We hope to work on this in the future feature-request Request for a new feature labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to work on this in the future feature-request Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant