-
Notifications
You must be signed in to change notification settings - Fork 31
rename RequestType to ActionSignature #724
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Craig Disselkoen <[email protected]>
| def InstanceOfRequestType (request : Request) (env : TypeEnv) : Prop := | ||
| InstanceOfEntityType request.principal env.reqty.principal env ∧ | ||
| request.action = env.reqty.action ∧ | ||
| InstanceOfEntityType request.resource env.reqty.resource env ∧ | ||
| InstanceOfType env request.context (.record env.reqty.context) | ||
| def InstanceOfTypeEnv (request : Request) (env : TypeEnv) : Prop := | ||
| InstanceOfEntityType request.principal env.sig.principal env ∧ | ||
| request.action = env.sig.action ∧ | ||
| InstanceOfEntityType request.resource env.sig.resource env ∧ | ||
| InstanceOfType env request.context (.record env.sig.context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was arguably misnamed previously -- it defines alignment with a TypeEnv, not just a RequestType. I renamed to InstanceOfTypeEnv rather than InstanceOfActionSignature. Note that RequestType/ActionSignature is not one of the parameters here
What is IIRC,
|
|
Ha, you're right that in the main Cedar library, it's called RequestEnv. Should I rename to RequestEnv in the Lean instead? |
We have a lot of In either case, I agree that having them match is preferable. @john-h-kastner-aws Any preferences on what this should be called, in both Rust and Lean? |
|
For completeness, I see that the Rust also defines, |
|
Interesting! The two Rust I slightly prefer |
|
Ah, actually, the Rust |
|
The |
|
That's true. We keep it around in Lean because it would be pretty annoying to have to constantly lookup the |
I'm happy with this, but then we'll have three |
Yep, 1 > 3 in this case :)) |
Renames
RequestTypetoActionSignature, to align some names better between our Rust and Lean code. Also renames related variables and field names (e.g.reqtytosig).