Skip to content

Does Cedar agent support when condition? #46

@IdleSys

Description

@IdleSys

Hi.
I'm wondering if Cedar Agent can use when condition. i found it no where in the examples to user when or attributes.
I found my way over attributes but i cannot find an answer for the when clause.

permit(principal, conditoin) when{ user.department == 2};

when i user the above as content of the policy I get the below error:

CedarApiExeption: Cedar ,/policies API, is returning with 400 status code
            Path: http://127.0.0.1:8000/v1/policies
            Here is the response (this will be removed in production):
                {"reason":"You have malformed a bad request","description":"The content in the request does not match the specifications: unexpected token `when`","code":400}
            

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions