Closed caiorcferreira closed 3 months ago
Noting that the Cedar policy JSON format (documented here) is indeed stable, and is effectively a stable version of the Rust AST (which is unstable and internal). I'd recommend that the Go implementation use this same policy JSON format as its stable AST.
Similarly, Cedar schemas have two different stable formats, human-readable and JSON.
@cdisselkoen I noticed this coming in: https://github.com/cedar-policy/cedar-docs/pull/109
Does that mean there is a new / somewhat better JSON format, and maybe we should just skip ahead to that?
Thanks! -Phil
This is the same JSON format. Previously, only JSON for a single policy was defined. https://github.com/cedar-policy/cedar-docs/pull/109 proposes JSON for a policy set, and is planned to ship in Cedar 4.0. Inside the new policy-set JSON format, each policy is still represented in the same stable policy JSON format.
With v0.2.0 we have an programmatic AST.
Motivation
Implementing features such as policy mutation, JSON support, Schema support, and partial evaluation today is harder because we don't have a stable AST.
Proposal
We need to follow an incremental plan to introduce a stable AST, migrate internals, and introduce new features based on the AST. The plan is based on the approach used by Cedar Rust:
toEval
to accept the new AST. Type implementations such asEntityUID
,IPAddr
, andDecimal
will probably remain the same and be used inside the stable AST.