cedar-policy-core
Core implementation of the Cedar policy language
4.12.0
8.5M downloads/mo
#3411 most downloaded on crates.io
cedar-policy/cedar
What this package is like to depend on
Last release 26 days ago
28 Jul 2026
Ships fairly regularly
a new release about every 4 weeks
Rarely documented
notes for 12 of 76 stable releases
7 versions withdrawn
withdrawn after publishing
3 years old
83 releases · first in 2023
33 releases in the last 12 months
see the full history below
Release timeline
83 releases · May 2023 to Jul 2026Releases
latest 60 of 83-
4.12.028 Jul 2026Release notes
Open source →Release 4.12.0, available on crates.io
Fixed
- Fixed
schema_to_json_with_resolved_typesto support converting schemas that use theActionentity type as an attribute type.
Previously this was reported as an error; it now converts to a correct JSON schema. (#2400) - Added missing validation check when decoding a protobuf policy set that template-linked policy IDs do not collide with template IDs. (#2441)
PolicySet::from_pstnow returns an error if a map key doesn't match the id of its corresponding template or policy, instead of silently accepting the malformed input (#2444).- For the experimental
tpefeature, fixedPartialEntities::from_json_valueto return an error given two entities with duplicate ids. - Fixed issue where the derived implementations of
OrdandPartialOrdforEntityUids did not order instances lexicographically by type, then by entity id (#2463, #2483).
Added
- Public syntax tree (
pst) support forvariadic-is-in-rangefeature: a variadicisInRangeis modelled by apst::Expr::VariadicOp{...}in the PST (#2380). - For the experimental
tpefeature, added functions for inspecting partial evaluation results. AddsTpeResponse::reasonto get the ids for policies
contributing to the authorization decision, and specific iterators to list true/false/error/residual permit/forbid policy IDs. Also addsTpeResponse::get_policy
to lookup a partially evaluated policy by id, andTpeResponse::policy_setto retrieve all partial evaluated policies as aPolicySet.
Changed
- The experimental protobuf
encodemethod now returnsResult<Vec<u8>, EncodeError>instead ofVec<u8>. Encoding rejects expressions and schema types whose nesting depth would exceed prost's decode recursion limit, returningEncodeError::MaxDepthExceeded. This prevents a class of bugs where successfully encoded data could not be decoded. - The experimental protobuf decoding API now validates its inputs, checking structural invariants on entities, expressions, templates, policy sets, and schemas. Additionally,
Entities::decodenow computes the transitive closure instead of assuming it is already computed. These changes may result in lower performance for protobuf decoding. The previous, unvalidated behavior is available via the newdecode_uncheckedmethods (e.g.,Entities::decode_unchecked) for trusted encoded data. - For the experimental
tpefeature,TpeResponse::residual_policiesis updated to return only non-trivial residuals and
TpeResponse::nontrivial_residual_policiesis deprecated. The previous behavior (iterating all residuals including trivial ones)
is available viaTpeResponse::policies. - Validating policies with
Validatoragainst aSchemawith a large action set now uses substantially less peak memory and avoids redundant per-request work, especially under concurrent load. (#2439)
Release notes
Open source →Install cedar-policy-cli 4.12.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/cedar-policy/cedar/releases/download/cedar-policy-cli-v4.12.0/cedar-policy-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/cedar-policy/cedar/releases/download/cedar-policy-cli-v4.12.0/cedar-policy-cli-installer.ps1 | iex"Download cedar-policy-cli 4.12.0
File Platform Checksum cedar-policy-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cedar-policy-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum cedar-policy-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum cedar-policy-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum cedar-policy-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum - Fixed
-
4.11.222 Jun 2026Release notes
Open source →Fixed
- Fixed transitive closure computation for schemas with cyclic entity type hierarchies of length ≥ 3 (introduced in 4.11.0).
Full Changelog: v4.11.1...v4.11.2
-
4.11.109 Jun 2026Nothing published for this version
-
4.11.018 May 2026Nothing published for this version
-
4.10.023 Apr 2026Nothing published for this version
-
4.9.127 Feb 2026Nothing published for this version
-
4.9.009 Feb 2026Nothing published for this version
-
4.8.209 Dec 2025Nothing published for this version
-
4.8.125 Nov 2025Nothing published for this version
-
4.8.017 Nov 2025Nothing published for this version
-
4.7.125 Nov 2025Nothing published for this version
-
4.7.013 Oct 2025Nothing published for this version
-
4.6.226 Nov 2025Nothing published for this version
-
4.6.110 Oct 2025Nothing published for this version
-
4.6.006 Oct 2025Nothing published for this version
-
4.5.226 Nov 2025Nothing published for this version
-
4.5.114 Aug 2025Nothing published for this version
-
4.5.030 Jun 2025Nothing published for this version
-
4.4.226 Nov 2025Nothing published for this version
-
4.4.122 May 2025Nothing published for this version
-
4.4.023 Apr 2025Nothing published for this version
-
4.3.426 Nov 2025Nothing published for this version
-
4.3.325 Feb 2025Nothing published for this version
-
4.3.212 Feb 2025Nothing published for this version
-
4.3.123 Jan 2025Nothing published for this version
-
4.3.021 Jan 2025Nothing published for this version
-
4.2.326 Nov 2025Nothing published for this version
-
4.2.211 Nov 2024Nothing published for this version
-
4.2.108 Oct 2024Nothing published for this version
-
4.2.007 Oct 2024Nothing published for this version
-
4.1.126 Nov 2025Nothing published for this version
-
4.1.030 Sep 2024Nothing published for this version
-
4.0.126 Nov 2025Nothing published for this version
-
4.0.016 Sep 2024Nothing published for this version
-
3.4.322 Jun 2026Release notes
Open source →Release 3.4.3, available on crates.io
Fixed
- Slot identifiers are now checked for JSON policy templates using slots in is Type in ?slot scope constraints. Loading a JSON format policy using principal is Type in ?resource or resource is Type in ?principal. (#2351)
-
3.4.226 Nov 2025Nothing published for this version
-
3.4.123 Sep 2024Nothing published for this version
-
3.4.016 Sep 2024Nothing published for this version
-
3.3.126 Nov 2025Nothing published for this version
-
3.3.019 Aug 2024Nothing published for this version
-
3.2.526 Nov 2025Nothing published for this version
-
3.2.407 Aug 2024Nothing published for this version
-
3.2.131 May 2024Nothing published for this version
-
3.2.017 May 2024Nothing published for this version
-
3.1.526 Nov 2025Nothing published for this version
-
3.1.417 May 2024Nothing published for this version
-
3.1.315 Apr 2024Nothing published for this version
-
3.1.229 Mar 2024Nothing published for this version
-
3.1.114 Mar 2024Nothing published for this version
-
3.1.008 Mar 2024Nothing published for this version
-
3.0.226 Nov 2025Nothing published for this version
-
3.0.121 Dec 2023Release notes
Open source →Cedar Language Version: 3.0.0
Fixed
- Possible panic (when stack size limit reached) in
Context::empty()(#524, fixed by #526)
- Possible panic (when stack size limit reached) in
-
3.0.015 Dec 2023Release notes
Open source →Cedar Language Version: 3.0.0
Added
- The
isoperation as described in RFC 5. (#396) - Marked the
Template::from_jsonandTemplate::to_jsonapis as public (#458) - New APIs to
Entitiesto make it easy to add a collection of entities to an existingEntitiesstructure. (#276) PolicySet::remove_static,PolicySet::remove_templateandPolicySet::unlinkto remove policies from the policy set. (#337, resolving #328)PolicySet::get_linked_policiesto get the policies linked to aTemplate. (#337)- Export the
cedar_policy_core::evaluator::{EvaluationError, EvaluationErrorKind}andcedar_policy_core::authorizer::AuthorizationErrorerror types. (#260, #271) ParseError::primary_source_spanto get the primary source span locating an error. (#324)ValidationResult::validation_warningsto access non-fatal warnings returned by the validator andValidationResult::validation_passed_without_warnings. The main validation entry point now checks for warnings previously only available throughconfusable_string_checker. (#404)Entity::new_no_attrs()which provides an infallible constructor forEntityin the case that there are no attributes. (See changes toEntity::new()below.) (#430)RestrictedExpression::new_entity_uid()(#442, resolving #350)- Experimental API
PolicySet::unknown_entitiesto collect unknown entity UIDs from aPartialResponse. (#353, resolving #321)
Changed
- Implement RFC 19, making validation slightly more strict, but more explainable. (#282)
- Implement RFC 20,
disallowing duplicate keys in record values (including record literals in
policies, request
context, and records in entity attributes). (#375) Request::new()now takes an optional schema argument, and validates the request against that schema. To signal validation errors, it now returns aResult. (#393, resolving #191)Entities::from_*()methods now automatically add action entities present in theschemato the constructedEntities, if aschemais provided. (#360)Entities::from_*()methods now validate the entities against theschema, if aschemais provided. (#360)Entities::from_entities()andEntities::add_entities()now take an optional schema argument. (#360)Diagnostics::errors()now returns an iterator overAuthorizationErrors. (#260)Response::new()now expects aVec<AuthorizationError>as its third argument. (#260)- Change the semantics of equality for IP ranges. For example,
ip("192.168.0.1/24") == ip("192.168.0.3/24")was previouslytrueand is nowfalse. The behavior of equality on single IP addresses is unchanged, and so is the behavior of.isInRange(). (#348) - Standardize on duplicates being errors instead of last-write-wins in the
JSON-based APIs in the
frontendmodule. This also means some error types have changed. (#365, #448) Entity::new()now eagerly evaluates entity attributes, leading to performance improvements (particularly when entity data is reused across multipleis_authorizedcalls). As a result, it returnsResult, because attribute evaluation can fail. (#430)Entities::from_json_*()also now eagerly evaluates entity attributes, and as a result returns errors when attribute evaluation fails. (#430)Entity::attr()now returns errors in many fewer cases (because the attribute is stored in already-evaluated form), and its error type has changed. (#430)Context::from_*()methods also now eagerly evaluate theContext, and as a result return errors when evaluation fails. (#430)- Rename
cedar_policy_core::est::EstToAstErrortocedar_policy_core::est::FromJsonError. (#197) - Rename
cedar_policy_core::entities::JsonDeserializationError::ExtensionsErrortocedar_policy_core::entities::JsonDeserializationError::ExtensionFunctionLookup. (#360) - Rename variants in
SchemaError. (#231) SchemaErrorhas a new variant corresponding to errors evaluating action attributes. (#430)- Improve schema parsing error messages when a cycle exists in the action hierarchy to includes an action which is part of the cycle (#436, resolving #416).
<EntityId as FromStr>::Erroris nowInfallibleinstead ofParseErrors. (#372)- Improve the
Displayimpls forPolicyandPolicySet, and add aDisplayimpl forTemplate. The displayed representations now more closely match the original input, whether the input was in string or JSON form. (#167, resolving #125) ValidationWarning::locationandValidationWarning::to_kind_and_locationnow return&SourceLocation<'a>instead of&'a PolicyID, matchingValidationError::location. (#405)ValidationWarningKindis nownon_exhaustive, allowing future warnings to be added without a breaking change. (#404)
Fixed
- Evaluation order of operand to
>and>=. They now evaluate left to right, matching all other operators. This affects what error is reported when there is an evaluation error in both operands, but does not otherwise change the result of evaluation. (#402, resolving #112) - Updated
PolicySet::linkto not mutate internal state when failing to link a static policy. With this fix it is possible to create a link with a policy id after previously failing to create that link with the same id from a static policy. (#412) - Fixed schema-based parsing of entity data that includes unknowns (for the
partial-evalexperimental feature). (#419, resolving #418)
Removed
- Removed
__exprescape from Cedar JSON formats, which has been deprecated since Cedar 1.2. (#333) - Move
ValidationMode::Permissivebehind an experimental feature flag. To continue using this feature you must enable thepermissive-validatefeature flag. (#428)
- The
-
2.5.125 Nov 2025Nothing published for this version
-
2.5.016 Sep 2024Nothing published for this version
-
2.4.826 Nov 2025Nothing published for this version
-
2.4.731 May 2024Nothing published for this version
-
2.4.617 May 2024Nothing published for this version
-
2.4.501 Apr 2024Nothing published for this version
-
2.4.408 Mar 2024Nothing published for this version