Closed adamrothman closed 3 months ago
Latest main
Cedar includes the implementation of RFC 55, which removes support for unspecified entities; see discussion there. As a result, this is intended behavior.
The doc updates aren't released yet since the changes aren't released on crates.io (currently this behavior is only on main
). The doc updates are in this PR though if you're curious: https://github.com/cedar-policy/cedar-docs/pull/113
Ah, OK! Thanks – I'll update our schema accordingly.
RFC 55 will not be released on 3.x as it is a breaking change. So, if you are designing something to work for Cedar 3, it is correct to have resourceTypes
as optional, and you can use the Cedar 3.2 or 3.3 CLI to convert those schemas to JSON.
cargo install cedar-policy-cli@3.3.0
Before opening, please confirm:
Bug Category
Schemas and Validation
Describe the bug
The CLI's
translate-schema --direction json-to-cedar
command fails when the supplied JSON schema defines actions withoutresourceTypes
in theirappliesTo
object (i.e. actions that apply to unspecified resources):Expected behavior
The JSON schema format documentation explicitly describes
resourceTypes
as optional:translate-schema
should successfully translate a JSON schema where any ofprincipalTypes
,resourceTypes
, or even the entireappliesTo
element is omitted from one or more actions.Reproduction steps
cedar-policy-cli
directory, runcargo run -- translate-schema --schema ~/Downloads/slauth.cedarschema.json --direction json-to-cedar
Code Snippet
No response
Log output
No response
Additional configuration
No response
Operating System
macOS Sonoma 14.6.1
Additional information and screenshots
No response