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

EST parser and Cedar parser return different ASTs on policies with functions named "unknown" #1061

Closed
3 tasks done
vasumv opened this issue Jul 11, 2024 · 0 comments · Fixed by #1062
Closed
3 tasks done
Assignees
Labels
bug Something isn't working. This is as high priority issue. good-first-issue Good for newcomers. A smaller issue that someone new to the Cedar codebase should be able to tackle

Comments

@vasumv
Copy link
Contributor

vasumv commented Jul 11, 2024

Before opening, please confirm:

Bug Category

Cedar Parser

Describe the bug

The following policy EST fails this check in convert-policy-json-to-cedar.

{
    "effect": "permit",
    "principal": {  "op": "All"  },
    "action": {  "op": "All"   },
    "resource": {  "op": "All"  },
    "conditions": [
        {
            "kind": "when",
            "body": {
                "unknown": [
                    {
                        "Value": ""
                    }
                ]
            }
        }
    ]
}

This is due to the difference in AST expression kind built when parsing the EST (Unknown) vs parsing Cedar (ExtensionFunctionApp).

Also related to #891

Expected behavior

.

Reproduction steps

.

Code Snippet

No response

Log output

No response

Additional configuration

No response

Operating System

No response

Additional information and screenshots

No response

@vasumv vasumv added bug Something isn't working. This is as high priority issue. pending-triage The cedar maintainers haven't looked at this yet. Automicaly added to all new issues. labels Jul 11, 2024
@vasumv vasumv self-assigned this Jul 11, 2024
@shaobo-he-aws shaobo-he-aws added good-first-issue Good for newcomers. A smaller issue that someone new to the Cedar codebase should be able to tackle work-in-progress and removed pending-triage The cedar maintainers haven't looked at this yet. Automicaly added to all new issues. labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. This is as high priority issue. good-first-issue Good for newcomers. A smaller issue that someone new to the Cedar codebase should be able to tackle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants