Skip to content

docs(rfc): propose Cedar as an alternate sandbox policy language - #4564

Open
vishwa-raman wants to merge 9 commits into
mainfrom
docs/4411-cedar-policy-rfc/vishwa-raman
Open

vishwa-raman wants to merge 9 commits into
mainfrom
docs/4411-cedar-policy-rfc/vishwa-raman

Conversation

@vishwa-raman

@vishwa-raman vishwa-raman commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

RFC 0020 proposes authoring sandbox policies in Cedar as an alternative to YAML. The format is chosen once per sandbox; YAML sandboxes are unchanged, and a Cedar sandbox is decided by Cedar alone, with no YAML or Rego in its decision path. The motivation is expressiveness that stays analyzable: authors can write conditions the YAML structure never anticipated, and every policy remains open to decidable analysis.

The RFC is written for policy authors who use YAML today. It covers what changes for an author, how each YAML construct maps to Cedar with a translation tutorial, the architectural decisions behind the implementation, parity with the YAML engine, risks, alternatives, and the open questions to settle before acceptance.

Related Issue

Closes #4610

Refs #4474, the parent issue for all policy work, which stays open, and #4411, the originating feature request where maintainers assigned RFC 0020.

Changes

  • Add rfc/0020-cedar-policy-engine/README.md in review state.

Implementation

An implementation exists on the feature branch vishwa/cedar-openshell (one commit on main). The parity harness there runs 2,909 cases pairing YAML and Cedar policies through both engines; 2,904 agree and the 5 recorded differences are deliberate, with Cedar the stricter side in each. The branch depends on the Cedar team's delimited like work (cedar-policy/rfcs#115), carried in the public ai-openshell/cedar repository and pinned by commit until Cedar releases it.

Testing

  • Checks appropriate to the affected code and behavior pass (mise run pre-commit; documentation-only change)
  • Unit tests added/updated (not applicable)
  • E2E tests added/updated (not applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (this PR is the RFC)

🤖 Generated with Claude Code

RFC 0020 proposes authoring sandbox policies in Cedar as an alternative
to YAML, chosen once per sandbox and enforced by Cedar alone. It is
written for authors who use YAML today: what changes, how each YAML
construct maps to Cedar with a translation tutorial, the architectural
decisions behind the implementation, parity with the YAML engine, risks,
alternatives, and the open questions to settle before acceptance.

Refs #4411

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@vishwa-raman

Copy link
Copy Markdown
Collaborator Author

I have read the DCO document and I hereby sign the DCO.

…estion

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@vishwa-raman

Copy link
Copy Markdown
Collaborator Author

/ok to test 9f80540

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@vishwa-raman

Copy link
Copy Markdown
Collaborator Author

/ok to test fbca5f1

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@vishwa-raman

Copy link
Copy Markdown
Collaborator Author

/ok to test 6b81504

Update RFC 0020 for the changes made in response to the pull request
review: capability negotiation between clients, gateway, and runtime;
staged policies isolated from enforced decisions and the query budget;
bounded host selectors and overlap analysis; a sandbox-wide WebSocket
budget; Cedar MCP endpoints in endpoint status; and the public skills.
Refresh the implementation plan, verification results, parity tally,
and risks, and list the proposed pull request split as a decision.

Refs #4474

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@vishwa-raman

Copy link
Copy Markdown
Collaborator Author

/ok to test f57a08f

Validation now happens at the gateway and in the supervisor; the CLI and
SDKs carry the Cedar text without linking the engine. Add a Rollout
section covering the cedar feature boundary, Release Dev versus stable
builds, feature-derived capability flags, and the promotion criterion,
and narrow the mixed-versions risk to development builds.

Refs #4474

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@github-actions

Copy link
Copy Markdown

This pull request has had no activity for 14 days and is now marked stale.

@github-actions github-actions Bot added the state:stale Inactive item at risk of automatic closure. label Nov 11, 2026
@purp purp added area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. topic:api Public APIs, gRPC/protobuf, SDK interfaces, versioning, compatibility, and API design standards. topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:policy Policy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening. labels Nov 15, 2026
@github-actions github-actions Bot removed the state:stale Inactive item at risk of automatic closure. label Nov 15, 2026
@nynymike

Copy link
Copy Markdown

This is a really good idea!

Describe the implementation as it stands after the refactor:
middleware, endpoint settings, and process are policy-message fields
set through the API instead of a --middleware file; a CedarPolicy
message selects Cedar; supervisor networking depends on engine-neutral
runtime contracts with one composition point; parity lives in
tests/policy-conformance with recorded expectations; and Cedar is gated
by the experimental feature bundle, built only in Release Dev.

Record the implementation as the #5005, #5006, and #4991 stack, and
update verification and rollout to match.

Older gateways that ignore the cedar_policy field, load-time warnings,
and a CI check for stable builds follow #5006 as it is today and are
listed under Open questions pending review.

Refs #4474

Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. rust-sdk — No explicit risk acceptance found

raw::proto::open_shell_server::OpenShell gains eight required methods, including get_sandbox_provider_access_token, inline_provider_refresh_secrets, and the secret-management handlers.

  • Impact: Existing downstream mock and server implementations fail to compile with missing trait items, while ordinary client callers remain compatible.
  • Action: Keep new RPCs in separate services or provide source-compatible default methods without changing existing associated types for v0.1.7.
  • PR: docs(rfc): propose Cedar as an alternate sandbox policy language #4564

2. rust-sdk — No explicit risk acceptance found

raw::proto message structs gain fields such as SandboxResponse.application_service_urls and SandboxConfigSnapshot.service_routes, and ProviderCredentialRefreshStrategy gains GithubAppInstallation.

  • Impact: Existing complete message literals, exhaustive destructuring, and exhaustive enum matches fail to compile despite the additive protobuf wire changes.
  • Action: Preserve existing raw data types in v0.1.7 and expose changed shapes separately or defer them to a minor release.
  • PR: docs(rfc): propose Cedar as an alternate sandbox policy language #4564

3. api-behavior — No explicit risk acceptance found

Static credential placeholders previously resolved in arbitrary supported headers, query parameters, and paths, but now require matching placement metadata and otherwise default to Authorization.

  • Impact: Existing imported profiles and workloads using locations such as x-api-key or ?key= receive HTTP 403 credential_placement_mismatch instead of authenticated upstream requests.
  • Action: Preserve existing placeholder placements in v0.1.7 and defer mandatory placement enforcement to a minor release using the documented profile-update migration.
  • PR: docs(rfc): propose Cedar as an alternate sandbox policy language #4564

4. policy — No explicit risk acceptance found

protocol: rest previously relayed allowed WebSocket upgrades, but now rejects every Upgrade request and disallows websocket_credential_rewrite: true.

  • Impact: Existing REST-based WebSocket workloads receive HTTP 403 even in audit mode, and previously valid rewrite policies fail validation.
  • Action: Preserve REST upgrade compatibility in v0.1.7 and defer the documented protocol: websocket migration requirement to a minor release.
  • PR: docs(rfc): propose Cedar as an alternate sandbox policy language #4564

5. configuration — No explicit risk acceptance found

openshell-supervisor --otlp-ocsf-endpoint URL --otlp-ocsf-schema-version 1.3 becomes a versionless invocation, while ocsf_schema_version and TOML schema_version selectors are ignored.

  • Impact: Launchers retaining the supervisor flag fail with an unexpected-argument error, while existing OCSF 1.1/1.3 integrations receive unsupported 1.8.0 records.
  • Action: Retain versioned exports and the supervisor flag in v0.1.7; a minor-release removal also needs actionable conversion guidance for existing collectors.
  • PR: docs(rfc): propose Cedar as an alternate sandbox policy language #4564

6. api-behavior — No explicit risk acceptance found

OCSF records remove top-level container, moving supervisor identity to device.container and gateway sandbox identity to unmapped.sandbox_id and unmapped.sandbox_name.

  • Impact: Existing JSONL and OTLP parsers, SIEM mappings, and correlation queries reading container.uid or container.name lose sandbox attribution even without schema downgrade configured.
  • Action: Preserve the legacy export shape for v0.1.7 and introduce the corrected shape through an opt-in format or a minor release with the documented parser migration.
  • PR: docs(rfc): propose Cedar as an alternate sandbox policy language #4564
Review details
  • Execution: complete
  • Candidate: PR #4564 (aa0f89d2e48ff3d913a6b626d015e545e71cdca7)
  • Baseline: fa2d381eaa9e917fd074b4bc49efea8a2ad3e43e (fa2d381eaa9e917fd074b4bc49efea8a2ad3e43e)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. rfc topic:api Public APIs, gRPC/protobuf, SDK interfaces, versioning, compatibility, and API design standards. topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:policy Policy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(rfc): RFC 0020, Cedar as an alternate sandbox policy language

3 participants