v4.11.0
Release 4.11.0, available on crates.io
Added
- Public syntax tree (
pst) module for programmatic construction, inspection, and manipulation of Cedar policies. Accessible viato_pst()/try_into_pst()/from_pst()onPolicy,Template, andPolicySet.try_into_pst()consumes the value to avoid cloning. TPE residual policies can be converted to PST for structured inspection of residual expressions. Third-party types used in PST fields (SmolStr,LinkedHashMap,NonEmpty) are re-exported from thepstmodule. (#816, #366) - The Type-aware partial evaluation (TPE) experimental feature now supports template-linked policies. This would previously return a
SlotNotSupportedErrorerror.
This error variant is removed and replaced withUnlinkedSlotError, occurring only when slot in a linked policy is not bound. (#2314).
Fixed
- Improved Cedar schema parse help for two common syntax mistakes: forgetting
appliesTobefore an action block, and adding;after a namespace declaration. (#1043, #1044) FunctionArgumentValidationerrors now include a help message describing the expected format for extension function arguments:decimal,ip,datetime, andduration. (#834)- Serialization of residual policies with
error()nodes does not fail, instead results in JSON with{"error": []}. (#2202) - Fixed conversion from
protobufpolicy sets to public type for policy sets containing templates and template-linked policies. (#2330) - Fixed deserialization from protobuf of entity and context attributes containing extension values. (#2344)