Skip to content

Cedar: reject policy entries that contain more than one statement #7229

Done

Description

@rdimitrov

Summary
Each entry in a Cedar policy list is parsed with cedar.Policy.UnmarshalCedar, which reads one statement and ignores anything after it (pkg/authz/authorizers/cedar). An entry holding several statements is accepted, but only its first statement takes effect. The operator's validation (cmd/thv-operator/pkg/validation/cedar_validation.go) has the same gap.

Proposed change
Parse each entry as a policy set and reject entries that hold more than one statement, or accept them and load every statement. Do the same in the operator's validation. Add a docs note that each list entry must hold exactly one statement.

Activity

  1. added
    bug
    on Nov 23, 2026
  2. added
    needs-triage
    on Nov 23, 2026
  3. removed
    needs-triage
    on Nov 24, 2026
  4. added a commit that references this issue on Nov 25, 2026
    8db3529
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authorizationbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions