Repository navigation
v4.14.0
Release 4.14.0, available on crates.io
Added
- Cedar now supports the
externalkeyword to declare undefined entity type and action. Schemacan now hold a partial schema, one that still hasexternaldeclarations.Schema::is_completereports whether any external entity type or action remain.Schema::external_entity_types,
Schema::defined_entity_types,Schema::external_actionsandSchema::defined_actionslist the
declarations on each side of that split (#2615).Schema::schema_linklinks any number of schemas, resolving eachexternaldeclaration against a
definition of the same name, and may itself return a partial schema that holds external entity type or action.Schema::schema_link_complete
additionally requires the result to be complete. Both report the newLinkError(#2615).- The new
ValidationError::IncompleteSchemareports that policy validation was given a partial
schema (#2615). - The FFI gains
link_schemasandschema_completeness, with the usual_jsonand_json_str
variants, exposed to JavaScript aslinkSchemasandschemaCompleteness(#2615). - The protobuf encoding of a schema now carries
externaldeclarations, so a partial schema can be
encoded and decoded (#2621). - For the experimental
tpefeature, TPE now reduceshas,hasTag,inand==applied to non-erroring but unknown expressions when the schema provides enough information to determine the concrete value of the operation.
Changed
- All existing API behavior remain unchanged for inputs that do not involve the new
externalkeyword. - Several
Schemamethods now have a defined behavior forexternaldeclarations:Schema::entity_types
andSchema::actionslist them,Schema::action_entitiesexcludes external actions,Schema::principals_for_actionand
Schema::resources_for_actionreturnSomewith an empty iterator for external actions
andSchema::ancestorsfinds an external entity type and includes its declared parent types
in the hierarchy (#2615). Validator::validateandValidator::validate_with_levelrefuse a partial schema, reporting
ValidationError::IncompleteSchema. Only a complete schema can be used to validate policies (#2615).Request::newaccepts a partial schema that holdsexternaldeclarations, and refuses a request whose
action is external.Entities::from_json_valueand friends likewise accept a partial schema and
refuse an entity whose own type is external, while an entity of a defined type may refer to an
external type in its attributes, tags and ancestors (#2615).Context::from_json_valueand friends reportContextJsonError::MissingActionfor an external
action, as they already did for an absent one, and the error message changed accordingly (#2615).EntityUid::from_str()is faster (~15-30x on theEntityUid parsingbenchmark), as it no longer
parses the string and renders the result back out to check that the input was normalized. The same
optimization was applied tofrom_normalized_str()forInternalName,UnreservedIdandAnyId.- Remove support for policy templates in the deprecated
entity-manifestfeature. Policy templates
were previously accepted, but slots were not included in the manifest.