Repository navigation
Description
Cedar joined the CNCF as a Sandbox project in December 2025 — a vendor-neutral, Lean-verified authorization policy language with production adopters beyond AWS (Cloudflare, MongoDB, StrongDM, Cloudinary). chant already touches it in one place: the aws lexicon's generated VerifiedPermissionsPolicy carries its policy text as an opaque CedarPolicy string. Everything upstream of that string — authoring, composition, validation, environments, drift — is unowned. This epic proposes lexicons/cedar to own it.
What cedar is to chant
Cedar is a deliberately abstraction-free target: no variables, no modules, no loops, and policy templates carry exactly two slots (?principal, ?resource). Its toolchain is validation and evaluation only — it checks policies after they are written and decides requests at runtime. Teams managing policy sets at scale generate .cedar text with string templating today. That is the CloudFormation shape exactly: an intentionally dumb target starving for a typed authoring layer, which is the product chant is.
The surfaces chant consumes and emits:
.cedarpolicy text and the JSON policy format — the serializer's outputs. The JSON form is also the parse source for import.- Cedar schema (JSON and human-readable forms) — the upstream spec
generate()consumes to produce typed entity/action classes per project. @cedar-policy/cedar-wasm(npm, TS types included) — the real validator, runnable in-process at post-synth. No CLI on PATH, no Docker.
The walk-away test holds: an emitted .cedar policy set is consumed by any Cedar evaluator — AVP, cedar-agent, Cloudflare-style embeddings — with chant nowhere in sight.
Decisions
Own lexicon. Cedar is a non-Kubernetes spec with its own upstream, versioning, and grammar — the authoring rule's test for a new lexicon. rulePrefix: "CED".
Cedar is a target, never chant's gate. The organizational-policy ruling stands: org policy is TS post-synth checks, and a separate policy engine "would duplicate the lint engine and break 'TypeScript is the one language.'" There will be no cedarGate(). chant compiles to Cedar; it is not governed by Cedar.
Schema-driven codegen, per project. Unlike aws/azure, the interesting spec is not one global upstream but the user's own Cedar schema: generate() turns declared entity types, actions, and attributes into typed TS classes, so a typo'd attribute is a compile error and a renamed entity type is a compiler-guided refactor. The Cedar grammar itself is the pinned upstream; the user's schema is the input.
The aws lexicon keeps the deployment vehicle. AWS::VerifiedPermissions::* and the ApplyOp cloudformation path already ship. The cedar lexicon makes the embedded string typed — a VerifiedPermissionsPolicy whose statement is a serialized cedar-lexicon policy value rather than prose. Standalone .cedar/JSON files serve every non-AVP evaluator.
Cedar-for-Kubernetes kinds are not this lexicon. The CNCF push includes Cedar as a K8s authorizer with policies as CRDs. CRDs belong to the k8s lexicon's CRD sources — same rule that kept helm.cattle.io out of k3s. The cedar lexicon lints the policy text embedded in those kinds, the ARGO001–005 pattern.
Cross-domain checks are the differentiator. Because policies and the resources they govern live in one build, post-synth checks can span them: an entity ID that references an actual resource declaration, "every declared bucket is covered by at least one forbid," "no schema action lacks any policy." No Cedar tool can express these; they are ordinary PostSynthChecks here.
Ownership channel is store-scoped until proven finer. AVP policy stores are taggable; individual policies are not. The ownershipChannel design question — store-level granularity vs. a description-field marker — is a sub-issue, and no channel is declared until its read paths are implemented (the tier-2 check exists because of exactly this).
Dogwood is out of scope. Days old, AWS-governed, reference interpreter explicitly not production-ready, no JS bindings. Its lower-to-Cedar step means this lexicon's output remains its substrate; revisit as an extraRulePrefixes extension when the spec settles.
Pin
Cedar language 4.x via @cedar-policy/cedar-wasm@4.12.0 (current latest). The schema grammar has two syntaxes (JSON and human-readable); sub-issue 1 verifies which the codegen consumes as canonical and whether the wasm package exposes the schema parser both ways. Cedar Analysis (semantic diff of policy sets) is a separate toolchain — priced in sub-issue 7, not assumed.
Definition of done
lexicons/cedar/passeschant dev check-lexiconTier 1 and the codegen tests, like every other lexicon.- The native tool is the test: every emitted policy set validates clean under
cedar-wasmagainst its schema, exercised in post-synth and in example tests — not just well-formed text. - A typed policy authored against a generated schema round-trips: TS →
.cedar→ JSON policy format → regenerated TS (templateParser/templateGenerator). - An example ships pairing a policy set with the infrastructure it governs, with at least one cross-domain post-synth check firing in CI, plus an AVP embedding example through
VerifiedPermissionsPolicy. - Meta-policy lint walls: a bare
permit(principal, action, resource);fails in prod builds; a policy referencing an entity type or action absent from the schema fails everywhere. - LSP completions/hover serve schema-derived entity types and actions; MCP tools answer "which policies cover this resource."
Sub-issues
- Upstream verification and pin — canonical schema syntax for codegen, wasm parser coverage, JSON policy format fidelity for import. The k3d lesson: price the machine-readable-source question before anything is hand-typed.
- Scaffold + serializer —
chant init lexicon,.cedarand JSON policy outputs, serializer tests. - Schema-driven
generate()— user schema → typed entity/action classes; naming strategy;validate()/coverage(). - Lint + post-synth — wasm validation check, meta-policy rules, cross-domain coverage checks,
auditCatalog(). - AVP integration + lifecycle — typed statement embedding into
VerifiedPermissionsPolicy;describeResources()/observeAmbient()against a policy store (an ambient permit is a standing grant — the security finding, not housekeeping); ownership channel design. - Import/reconcile — JSON policy format parser, TS generator,
ReconcileOpexample pulling console edits back to source. - Docs, LSP/MCP/skills, examples to Tier 2 — and a stretch spike: Cedar Analysis as a post-synth "unreviewed widening" check against the previous snapshot's policy set.
Related: #1638-adjacent aws generated surface (VerifiedPermissionsPolicy, CedarPolicy), the k8s CRD-sources rule, organizational-policy's no-second-engine ruling.
Sub-issues follow this comment.
Activity
lex00 commentedon Aug 10, 2026
Coverage audit before implementation — the epic checked against the full
LexiconPlugininterface (packages/core/src/lexicon.ts) and all twenty lexicon-authoring pages, tier checklists included.Already covered: serializer + rulePrefix, schema-driven
generate(), lint/post-synth/auditCatalog, LSP + MCP, import round-trip, observation + ownership channel, docs/skills/examples, the tier-1 DoD. The following gaps are folded into the sub-issue set (amendments in bold):upstreamPin+ the upgrade op. The pin section pinned versions but not the mechanism: declareupstreamPinon the plugin and addops/lexicon-upgrade/cedar-upgrade.op.tslike every other lexicon. Cedar's wrinkle: the "spec"generate()consumes is the project's own Cedar schema (local input), while the pinned upstream is the language/wasm version — the first lexicon with that split, worth stating so the content-pin guidance (digest extracted schemas, commit covered names beside the digest, chant#1390) is applied to the right thing.isTag/foldsAsCallobligations.configSchemais required, not optional here. Schema-driven codegen needs to know where the user's Cedar schema lives — that is acedarconfig namespace (cedar.schema, plus validation strictness), and reading it without declaring the schema is exactly the chant#1344 trap.chant dev onboard cedar, examples registered in root workspaces, the rootpackage.jsondependency entry (lexicon-wiring.test.tsenforces it), thetest/integration.shsmoke section, Docker smoke files, and the npm trusted-publisher record — the one manual step, per-package, publish failsENEEDAUTHwithout it, and the first publish must happen by hand before the record can attach.initTemplates(default, AVP embedding, gateway policy set), ≥1 composite insrc/composites/(the composition story is this lexicon's thesis —StandardTenantPolicyetc.),detectTemplatefor.cedar/JSON policy documents.lexicons/cedar/docs/with explicit sidebar (every page reachable — chant#1312),docs()registered on the plugin, cross-namespace link rules,just docs-check-links.ObservationResultenvelope, closedUnobservedReasonset, total ownership verdicts (unknownwhen the channel can't be read), thequeriedmap, anddescribeObservationConformancefrom@intentius/chant-test-utilsin the test suite.Non-goals, stated so their absence is a decision: no emulator (validation is in-process wasm; there is no evaluator service worth faking — a local cedar-agent could become one later), no
commands(), no applier (the aws lexicon owns the deploy vehicle), nogenerateComponentPipeline, nomigrationSource.Sub-issues follow.
feat(cedar): schema-driven codegen + configSchema + upstream pin (#1650)
feat(cedar): schema-driven codegen + configSchema + upstream pin (#1650…
feat(cedar): lint rules + post-synth checks + audit catalog (#1651)
feat(cedar): lint rules + post-synth checks + audit catalog (#1651) (#…
feat(cedar): import/export round-trip + valid JSON policy leg (#1653)
feat(cedar): import/export round-trip + valid JSON policy leg (#1653) (…
lex00 commentedon Aug 10, 2026
Complete and released in chant-v0.44.8. All eight sub-issues landed across seven PRs (#1656, #1664, #1663, #1666, #1667, #1669, #1668): typed schema-driven authoring over the user's .cedarschema, .cedar + Cedar JSON policy-format serialization, eleven CED lint/post-synth rules with full audit-catalog coverage, byte-identical import round-trips, LSP/MCP/skills/init-templates/composites and the standalone docs site, AVP embedding + policy-store observation with the description-marker ownership channel, and CI/publish onboarding. chant dev check-lexicon: 21/21 tier-1, zero KNOWN_FAILURES entries.
Outstanding, tracked elsewhere: the npm trusted-publisher record + first manual publish for @intentius/chant-lexicon-cedar (maintainer step, documented in #1669); onboard.ts Dockerfile patcher bug (#1678); the dogwood dialect stack (#1646, PRs #1672/#1677) proceeds now that this is released.