You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cedar: reject policy entries that contain more than one statement #7229
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
Reject Cedar policy entries containing more than one statement (stack…