Skip to content

Releases: cedar-policy/cedar

v4.5.1

14 Aug 15:01
8f42f0c
Compare
Choose a tag to compare

Release 4.5.1, available on crates.io

v4.5.0

30 Jun 19:56
be723f7
Compare
Choose a tag to compare

Release 4.5.0, available on crates.io

[4.5.0]

Cedar Language Version: 4.4

Added

  • Added Entities::upsert_entities() to add or update Entitys in an Entities struct (resolving #1479)
  • Added schema parsing functions to improve compatibility with JSON schema originally writing for versions 2.5.0
    and earlier. These functions will ignore unrecognized keys in some positions where they are currently an error,
    matching the behavior of earlier versions. This is intended help some users migrate to the current 4.0 schema
    format. The new functions are deprecated and placed behind the deprecated-schema-compat feature. (#1600)
  • Expression::new_duration, Expression::new_datetime, RestrictedExpression::new_duration,
    and RestrictedExpression::new_datetime (#1614)
  • Added a function to be able to split a policy set parsed from a single string into its component static
    policies and templates. The relevant function is policy_set_text_to_parts in the ffi module (#1629).
  • Implemented RFC 71 (trailing commas)
    for Cedar policy files. (#1606)

Changed

  • Allow entity attributes and tags to contain Action-typed entities, and pass
    policy/entity/request validation (#1652)
  • Changed experimental entity-manifest function compute_entity_manifest to
    accept an &Validator instead of &Schema. Callers can construct a Validator
    from a schema with Validator::new afterwhich a reference to the original
    schema can be retrieved using Validator::schema. (#1584)
  • Bumped MSRV to 1.82 (#1611)

v4.4.1

22 May 18:26
4f020c7
Compare
Choose a tag to compare

Release 4.4.1, available on crates.io

Cedar Language Version: 4.3

Fixed

  • Apply entity conformance checking to tags (#1604)

v4.4.0

23 Apr 16:54
cab0229
Compare
Choose a tag to compare

Release 4.4.0, available on crates.io

Cedar Language Version: 4.3

Added

  • Stabilized RFC 76, removing the experimental level-validate feature flag. That functionality is now available without the feature flag. Stabilization comes with changes to fix bugs in the features. Level validation is now more permissive when checking if expressions (fixing #1507), and stricter when checking record literals and entity tag operations (fixing #1505 and #1503). (#1567)
  • Implemented RFC 53 (enumerated entity types) (#1377)
  • Stabilized RFC 80 (datetime extension), making datetime a default feature. (#1541)
  • Added Entities::remove_entities() to remove Entitys from an Entities struct (#1453, resolving #701)
  • Added PolicySet::merge() to merge a PolicySet into another PolicySet struct (#1476, resolving #610)
  • Added to_cedar functions for PolicySet, Policy, and Template that render the policy in the Cedar syntax. These functions can be used to convert JSON formatted policies into the human-readable syntax (#1510, resolving #461)
  • Added Validator::schema() to get a reference to the Schema even after it has been consumed to construct a Validator (#1524)
  • Added Schema::request_envs() to get all of the RequestEnvs that are valid according to the schema. (This joins the existing Policy::get_valid_request_envs() and Template::get_valid_request_envs() that return the subset of request envs that are valid for a particular policy or template.) (#1547)
  • Added EntityId::unescaped(), analogous to EntityId::escaped(). This is simply an alias for EntityId::as_ref() with the AsRef impl that produces &str. (#1555)
  • Added PartialResponse::unknown_entities method (#1557)
  • Added Entities::len and Entities::is_empty methods (#1562, resolving #1523)

Changed

  • Changed Entities::add_entities and Entities::from_entities to ignore structurally equal entities with the same Entity UID.
  • For protobufs experimental feature, a number of changes to the interface and the Protobuf format definitions, as we continue to iterate towards making this feature stable. (#1488, #1495, #1506, #1535)
  • Bump MSRV to 1.81 (#1542)
  • HierarchyNotRespected validation error is no longer returned (although the error variant remains, to avoid a breaking change). This means that in some edge cases, policies that previously failed to validate under strict validation will now pass validation, probably with an ImpossiblePolicy warning. (#1355, resolving #638)

v4.3.3

25 Feb 20:37
ba27ea2
Compare
Choose a tag to compare

Release 4.3.3, available on crates.io

Changed

  • Significant changes to the API for the experimental protobufs feature
    (#1452, #1467, others)

Fixed

  • Fixed the experimental protobufs feature so that code depending on cedar-policy
    with this feature now successfully builds, even if that code is not part of the
    same Cargo workspace as cedar-policy, cedar-policy-core, etc (#1452).
  • Fixed a bug in the experimental entity-manifest feature. If an entity appears as
    both a possible value for a scope variable and an entity literal, slicing
    using entity manifests will now correctly capture all necessary attributes (#1429).
  • Fixed a bug in the experimental entity-manifest and level-validate
    features. These features failed to consider any attribute accesses occurring
    inside the guard of an if expression when guard expression had a singleton
    boolean type (#1462).

v4.3.2

12 Feb 21:35
c866ac2
Compare
Choose a tag to compare

Release 4.3.2, available on crates.io

Cedar Language Version: 4.2

Fixed

  • Assume sufficient stack space when it cannot be determined (#1446, resolving #1443). Note that on platforms not supported by stacker (e.g., Wasm, Android), this means that large inputs may result in stack overflows and crashing the process. On all platforms supported by stacker (Linux, macOS, ...), Cedar will continue to return the graceful error RecursionLimit instead of crashing.

v4.3.1

23 Jan 21:07
ae49f40
Compare
Choose a tag to compare

Release 4.3.1, available on crates.io

Cedar Language Version: 4.2

Fixed

  • Disable doc generation for feature protobufs, unblocking that for other features (#1434)

v4.3.0

21 Jan 17:44
ab8aef0
Compare
Choose a tag to compare

Release 4.3.0, available on crates.io

Cedar Language Version: 4.2

Added

  • Implemented RFC 62 (extended has operator) (#1327, resolving #1329)
  • Implemented RFC 80 (datetime extension) as an experimental feature under flag datetime (#1276, #1415)
  • Added new .isEmpty() operator on sets (#1358, resolving #1356)
  • Implemented RFC 48 (schema annotations) (#1316)
  • Implemented RFC 74 (entity manifests and slicing) behind the experimental entity-manifest flag (#1239)
  • Added protobuf schemas and (de)serialization behind the experimental protobufs flag (#1277, #1345)
  • New Entity::new_with_tags() and Entity::tag() functions (#1402, resolving #1374)
  • Added Request::context and Context::get methods to allow easy extraction of values from the context by key (#1318)
  • For the partial-eval experimental feature, added PartialResponse::reauthorize_with_bindings to accept substitutions from an iterator and deprecated PartialResponse::reauthorize (#1387)
  • For the partial-eval experimental feature, added RequestBuild::unknown_principal_with_type and RequestBuild::unknown_resource_with_type methods, allowing an unknown principal or resource to be constrained to a certain entity type (#1391)
  • Added Clone implementations for more types (#1324)

Changed

  • Stopped emitting warnings for identifiers containing certain printable ASCII
    characters (e.g., / and :) (#1336, resolving #621)

Fixed

  • Attach source code to certain errors so that miette::Reports derived from these errors are self-contained (#1351, resolving #977 and #1335)

v4.2.2

11 Nov 17:18
4dea3e6
Compare
Choose a tag to compare

Release 4.2.2, available on crates.io.

Changed

  • The error associated with parsing a non-existent extension function additionally
    includes a suggestion based on available extension functions (#1280, resolving #332).
  • The error associated with parsing a non-existent extension method additionally
    includes a suggestion based on available extension methods (#1289, resolving #246).
  • Improved entity validation speed, particularly for large schemas with many
    actions (#1290 and #1296, resolving #1285)

Fixed

  • Some misleading parser errors for JSON schema with mistakes in nested attribute definitions (#1270, resolving #417)
  • Cedar schema printer now correctly prints entity tags (#1304)

v4.2.1

08 Oct 15:07
9edbddd
Compare
Choose a tag to compare

Release 4.2.1, available on crates.io

Changelog

  • Fixes a minor issue preventing docs from building on docs.rs