Skip to content

Fix typechecking in for action in different namespaces#704

Merged
john-h-kastner-aws merged 4 commits intomainfrom
jkastner/cross_ns_action_in
Mar 8, 2024
Merged

Fix typechecking in for action in different namespaces#704
john-h-kastner-aws merged 4 commits intomainfrom
jkastner/cross_ns_action_in

Conversation

@john-h-kastner-aws
Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws commented Mar 7, 2024

Description of changes

Makes the easy fix to #642. Actions in different namespaces were incorrectly considered incomparable by the typechecking rule for in. Update that function so that the comparison is allowed.

This can be released in the next patch/minor release. Per #638, we might be able to get rid of this error variant entirely, but that would likely wait for 4.0.

This changes a typechecking rule, so it might seem to require a spec update, but IIRC, the Lean spec would already allow these policies, and DRT allows for this difference. Also, we don't generate schema with multiple namespaces, so DRT couldn't fail anyways.

This bug was introduced by #282 which was released with version 3.0, so we don't need to backport the fix.

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A bug fix or other functionality change requiring a patch to cedar-policy.

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

Disclaimer

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@cdisselkoen cdisselkoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Fix #642

Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
@john-h-kastner-aws john-h-kastner-aws force-pushed the jkastner/cross_ns_action_in branch from 77a7e87 to 00e6051 Compare March 8, 2024 20:43
@john-h-kastner-aws john-h-kastner-aws merged commit 3edf5e2 into main Mar 8, 2024
khieta pushed a commit that referenced this pull request Mar 11, 2024
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: Kesha Hietala <khieta@amazon.com>
@john-h-kastner-aws john-h-kastner-aws deleted the jkastner/cross_ns_action_in branch March 12, 2024 19:30
khieta pushed a commit that referenced this pull request Mar 12, 2024
Signed-off-by: John Kastner <jkastner@amazon.com>
benelser pushed a commit to benelser/cedar that referenced this pull request Jan 16, 2026
…y#704)

Signed-off-by: John Kastner <jkastner@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants