Repository navigation
feat(policy): support Cedar as an alternate sandbox policy language - #4565
vishwa-raman wants to merge 1 commit into
Conversation
|
All contributors have signed the DCO ✍️ ✅ |
9e11281 to
d9df6d3
Compare
|
I have read the DCO document and I hereby sign the DCO. |
|
/ok to test d9df6d3 |
|
/ok to test dd2c70d |
d9df6d3 to
dd2c70d
Compare
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance found
2. go-sdk — No explicit risk acceptance foundZero-valued
3. typescript-sdk — No explicit risk acceptance foundRegenerating the exported
Review details
Advisory review; publication gates are unchanged. |
|
Label |
|
Compatibility risk acceptance for the
These fields are the wire representation of RFC 0020 (#4564) and cannot be deferred without deferring the feature. |
|
/ok to test 55b998e |
dd2c70d to
486f456
Compare
|
/ok to test 486f456 |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — Risk explicitly accepted
2. go-sdk — Risk explicitly acceptedZero-valued
3. typescript-sdk — Risk explicitly acceptedRegenerating the exported
Review details
Advisory review; publication gates are unchanged. |
|
/ok to test 4cdee2a |
486f456 to
4cdee2a
Compare
|
/ok to test 77f4818 |
4cdee2a to
77f4818
Compare
|
@vishwa-raman — aggregated panel review of commit I recommend changes before merge and splitting this PR into four PRs. The panel found six code defects and one required documentation update. I verified and deduplicated these through source and caller tracing; the failure scenarios below were not executed locally.
I recommend this split because the PR combines an existing-engine refactor, a new language implementation, feature activation, and example expansion. Those have different review and rollback boundaries.
PRs 1 and 2 can be reviewed independently; PR 3 depends on both. Keep Cedar acceptance and its complete enforcement path together. Splitting CLI, gateway, and supervisor activation into independently enabled changes would create unsafe intermediate states. Tests needed to establish safe enforcement belong with their implementation. The verification review also identified two limits worth addressing:
The panel comprised independent reviews of Cedar semantics, runtime enforcement, authoring/control-plane integration, and the full parity/example corpus, followed by an independent semantic recheck. No additional concrete filesystem widening, token-grant authorization defect, or YAML regression survived verification. New-gateway/old-supervisor compatibility remains unverified. Reviewed head Local diff and syntax checks passed. At review time, exact-head branch CI had passed Rust tests on Linux/macOS and Go/TypeScript SDK checks; integration CI had passed Cedar and MCP-Cedar E2E. Other runtime jobs were still running at the last review check. Rust/Cargo was unavailable locally, so the new failure scenarios still need executable regression tests. Review status: findings. |
77f4818 to
77d3238
Compare
|
I’d like Cedar to be an explicit opt-in feature, enabled in published Release Dev artifacts and excluded from stable releases.
The intended boundary is: clients transport policy documents; providers supply credential rules; drivers launch workloads; the gateway and supervisor own Cedar support. |
|
Note 🤖 Claude Opus 5.5 responding on behalf of johnnygreco @drew Your Cedar feedback is addressed in 46978de. Please confirm the three interpretations below; nothing else needs a decision. Cedar is now opt-in:
Changes beyond your comment:
|
|
/ok to test 1265969 |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance foundSix existing raw::proto message structs gain supports_cedar_policy, policy_warnings, or driver_enforces_policy fields.
2. typescript-sdk — No explicit risk acceptance foundExisting raw messages gain required supportsCedarPolicy or policyWarnings properties, and curated UpdateConfigResult gains required policyWarnings.
3. go-sdk — No explicit risk acceptance foundencoding/json output for ConfigUpdateResult gains PolicyWarnings:null even when an update returns no warnings.
Review details
Advisory review; publication gates are unchanged. |
|
/ok to test 43b8944 |
|
/ok to test 12f73d0 |
@johnnygreco, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 203d660 |
|
/ok to test 7f95f83 |
|
This pull request has had no activity for 14 days and is now marked stale. |
|
My concern with this design is that it builds an OpenShell-specific Cedar integration where a reusable authorization component such as Cedarling could serve multiple applications—including embedded directly in an agent, the sandbox, fleet management, gateways, IDPs and other infrastructure. OpenShell would still need its specialized policy analysis, Landlock integration, and network enforcement, but could we separate those responsibilities from reusable policy evaluation and policy-store consumption, and assess Cedarling before committing an application-specific implementation that creates a silo of specially managed Cedar policies? One of the most important properties of Cedar is composition. By reusing the Cedarling, OpenShell can collaborate with a wider audience, and facilitate composition across the agent, sandbox and downstream platform. |
#5005 and #5006 have merged, so describe Cedar as implemented on main in development builds, with #4565 superseded and the examples from #4991 still to be brought to main. Rename the binary build input from `dev-build` to `experimental` to match the merged workflows, and record that the RPM build maps the `ai-openshell/cedar` git source through deploy/rpm/create-vendor-archive.sh, verified with an offline build of the merged tree. Refs #4474 Signed-off-by: Vishwanath Raman <[email protected]>
A sandbox policy can be written in Cedar instead of YAML. The format is chosen once per sandbox: YAML policies keep using the Rego engine unchanged, and a .cedar policy makes Cedar the sole authority for network connections, per-request L7 checks, and Landlock filesystem grants. This is the original implementation branch for #4411. It was refactored and merged to main through #5005 and #5006 (152c59d), which supersede it. The full commit history is kept on vishwa/cedar-openshell-history. The branch stays because some of its work did not make it into #5006 and will be pulled selectively into future PRs: - CLI configuration of middleware, endpoint settings, and process for Cedar sandboxes (--middleware) - Load-time policy warnings returned to clients - Clients checking that a gateway supports Cedar before sending a policy - Cedar guidance in the public openshell-cli and generate-sandbox-policy skills Refs #4474 Signed-off-by: Vishwanath Raman <[email protected]> Co-authored-by: Johnny Greco <[email protected]> Co-authored-by: Drew Newberry <[email protected]>
9dfc6ae to
f8f13a0
Compare
|
Closing this as superseded by #5006, which merged the refactored Cedar integration to @johnnygreco, a heads-up since you have this branch locally: I squashed The branch stays open because some of its work did not make it into #5006, and we will pull it selectively into future PRs:
Refs #4474 |
Summary
Implements RFC 0020 (#4564): a sandbox policy can be written in Cedar instead of YAML, chosen once per sandbox and enforced by Cedar alone. YAML sandboxes are unchanged. Draft while the RFC is under review; it is otherwise complete and verified.
Cedar comes from
ai-openshell/cedar, the project's own Cedar in the OpenShell CNCF workspace, pinned by commit. OpenShell iterates on policy-language features there with the Cedar team (delimitedliketoday, tracked upstream as cedar-policy/rfcs#115), and does not depend on those features reaching the upstream Cedar release.Cedar example policies, demos, and their fixture parity tests are reviewed separately in the stacked PR #4991.
Related Issue
Closes #4411
Changes
openshell-policy-cedar-schemaandopenshell-policy-cedar: the canonical schema, strict validation, load-time analysis (Landlock grants, inspected endpoints and paths, policy DNS eligibility, native TCP, address ranges, binary aliases and globs, query keys), evaluation with audit and staged policies, and the token-grant compiler for provider rules.SandboxPolicyfieldscedar_policy_source,provider_credential_rules(gateway-managed), andendpoint_settings..cedarpolicies, the--middlewarefile (middleware, endpoint settings, process identity), one shared validation, format-switch rejection, and aPolicyEnginethat is OPA or Cedar; a Cedar sandbox builds no OPA engine and shares only typed Rust data with the YAML path.e2e/cedarsuite. The authored example policies, demos, and example-fixture parity tests are in feat(examples): add Cedar policies and demos #4991.docs/how-it-works/policies/cedar.mdx, the middleware configuration page, and the crate README.Testing
-D warnings,cargo deny,mise run pre-commit; unit tests on macOS and Linux; Windows cross-compile of the supervisor network crate; Go SDK CI)mise run e2e:cedar, 26 checks)Checklist