Releases: cedar-policy/cedar
Releases · cedar-policy/cedar
v4.5.1
v4.5.0
Release 4.5.0, available on crates.io
[4.5.0]
Cedar Language Version: 4.4
Added
- Added
Entities::upsert_entities()
to add or updateEntity
s in anEntities
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 thedeprecated-schema-compat
feature. (#1600) Expression::new_duration
,Expression::new_datetime
,RestrictedExpression::new_duration
,
andRestrictedExpression::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 ispolicy_set_text_to_parts
in theffi
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
functioncompute_entity_manifest
to
accept an&Validator
instead of&Schema
. Callers can construct aValidator
from a schema withValidator::new
afterwhich a reference to the original
schema can be retrieved usingValidator::schema
. (#1584) - Bumped MSRV to 1.82 (#1611)
v4.4.1
v4.4.0
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 checkingif
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), makingdatetime
a default feature. (#1541) - Added
Entities::remove_entities()
to removeEntity
s from anEntities
struct (#1453, resolving #701) - Added
PolicySet::merge()
to merge aPolicySet
into anotherPolicySet
struct (#1476, resolving #610) - Added
to_cedar
functions forPolicySet
,Policy
, andTemplate
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 theSchema
even after it has been consumed to construct aValidator
(#1524) - Added
Schema::request_envs()
to get all of theRequestEnv
s that are valid according to the schema. (This joins the existingPolicy::get_valid_request_envs()
andTemplate::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 toEntityId::escaped()
. This is simply an alias forEntityId::as_ref()
with theAsRef
impl that produces&str
. (#1555) - Added
PartialResponse::unknown_entities
method (#1557) - Added
Entities::len
andEntities::is_empty
methods (#1562, resolving #1523)
Changed
- Changed
Entities::add_entities
andEntities::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 anImpossiblePolicy
warning. (#1355, resolving #638)
v4.3.3
Release 4.3.3, available on crates.io
Changed
Fixed
- Fixed the experimental
protobufs
feature so that code depending oncedar-policy
with this feature now successfully builds, even if that code is not part of the
same Cargo workspace ascedar-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
andlevel-validate
features. These features failed to consider any attribute accesses occurring
inside the guard of anif
expression when guard expression had a singleton
boolean type (#1462).
v4.3.2
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 bystacker
(Linux, macOS, ...), Cedar will continue to return the graceful errorRecursionLimit
instead of crashing.
v4.3.1
v4.3.0
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 flagdatetime
(#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()
andEntity::tag()
functions (#1402, resolving #1374) - Added
Request::context
andContext::get
methods to allow easy extraction of values from the context by key (#1318) - For the
partial-eval
experimental feature, addedPartialResponse::reauthorize_with_bindings
to accept substitutions from an iterator and deprecatedPartialResponse::reauthorize
(#1387) - For the
partial-eval
experimental feature, addedRequestBuild::unknown_principal_with_type
andRequestBuild::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
v4.2.2
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
v4.2.1
Release 4.2.1, available on crates.io
Changelog
- Fixes a minor issue preventing docs from building on docs.rs