Skip to content

EST parser does not error for action constriant with non-action entity type #925

@john-h-kastner-aws

Description

@john-h-kastner-aws

Before opening, please confirm:

Bug Category

Cedar Parser

Describe the bug

The following JSON parses as policy

{
    "effect": "permit",
    "principal": {
        "op": "All"
    },
    "action": {
        "op": "==",
        "entity": { "type": "Other", "id": "view" }
    },
    "resource": {
        "op": "All"
    },
    "conditions": [ ]
}

but

permit(principal,action == Other::"view",resource);

does not

Expected behavior

.

Reproduction steps

.

Code Snippet

// Put your code below this line.

Log output

// Put your output below this line

Additional configuration

No response

Operating System

No response

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. This is as high priority issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions