fix(policy): reserve provider rule namespace#1991
Conversation
|
🌿 Preview your docs: https://nvidia-preview-pr-1991.docs.buildwithfern.com/openshell |
PR Review StatusValidation: This PR is project-valid because it implements the linked policy/gateway bug fix in #1982, keeps the scope concentrated to provider-derived policy namespace handling, and includes docs plus targeted regression coverage. Review findings:
Docs: Updated for the direct policy UX change, but the warning above should be reconciled with the documented behavior. Next state: |
071b7e3 to
b4f6ced
Compare
|
Addressed the Gator feedback in
Validation:
|
Re-check After Author UpdateI re-evaluated latest head Disposition: partially resolved. The prior runtime-policy mutation and global full-policy ingress findings are addressed, but one blocking legacy-data path remains. Remaining items:
Docs: updated in the relevant Fern docs pages; no navigation change appears necessary. Next state: |
b4f6ced to
5d9c464
Compare
|
Follow-up in Project assumption for this PR: persisted user/source policies with I did remove the unsupported overlap regression that asserted a user/source Validation:
|
Re-check After Author UpdateI re-evaluated latest head Disposition: not resolved. The earlier legacy-data migration scope is no longer the blocking item, but the latest head introduces a new runtime sync regression that needs author changes before gator can move this PR to pipeline watch. Remaining items:
Docs: updated in the relevant Fern docs pages; no navigation change appears necessary. Next state: |
5d9c464 to
ceaf8dc
Compare
|
Addressed the latest Gator feedback and rebased onto current Change made:
Validation:
|
PR Review StatusValidation: This PR is project-valid because it implements the linked provider-policy namespace hardening bug in #1982, keeps the scope concentrated to policy/gateway/sandbox sync boundaries, and updates the relevant Fern docs plus regression coverage. Review findings:
Docs: updated in the relevant Fern docs pages; no navigation change appears necessary. Next state: |
Closes #1982 Reject user-authored _provider_* network policy keys at gateway boundaries, strip provider-derived rules from sandbox sync, and document the round-trip workflow. Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
ceaf8dc to
1b887bb
Compare
|
Addressed the latest Gator feedback in The approval merge path now validates the constructed I also added regression coverage for a stored pending draft chunk named Verification run:
|
PR Review StatusValidation: This PR is project-valid because it implements the linked provider-policy namespace hardening bug in #1982, keeps the scope concentrated to policy/gateway/sandbox sync boundaries, and updates the relevant Fern docs plus regression coverage. Review findings:
Docs: updated in the relevant Fern docs pages; no navigation change appears necessary. E2E: Next state: |
|
Label |
Summary
Reserve
_provider_*as a provider-derived network policy namespace. User-authored sandbox create, full policy replacement, and incremental add-rule writes now reject reserved keys, while sandbox-originated policy sync strips provider-derived rules before persisting source policy.Related Issue
Closes #1982
Changes
crates/openshell-policy: added shared provider rule namespace helpers and reused them in merge fallback guards.crates/openshell-server: added reserved-key validation for user policy writes, sandbox-principal sync stripping, and regression tests for create/update/merge paths.crates/openshell-sandbox: strips provider-derived entries before supervisor policy sync/write-back.docs/sandboxes/providers-v2.mdxanddocs/sandboxes/policies.mdx: documented the reserved namespace and round-trip behavior.Deviations from Plan
Added rejection for incremental
add_rulemerge operations using_provider_*rule names. This closes the same user-facing policy-key ingress class while still allowing remove-style operations for cleanup.Testing
RUSTC_WRAPPER= cargo test -p openshell-policy provider_ruleRUSTC_WRAPPER= cargo test -p openshell-server reserved_provider --libRUSTC_WRAPPER= cargo test -p openshell-sandbox provider_policy_entries --libRUSTC_WRAPPER= mise run pre-commitpassese2e/changedTests added:
openshell-policy; reserved-key validation inopenshell-server; supervisor strip helper inopenshell-sandbox.spec.policyand policy revision persistence.Checklist
Documentation updated:
docs/sandboxes/providers-v2.mdx: reserved_provider_*namespace behavior.docs/sandboxes/policies.mdx: full-policy round-trip guidance for provider-derived entries.