fix(policy)!: reject unsupported TLS endpoint values - #3414
Conversation
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
This accepted issue-backed policy cleanup is project-valid, and the migration and schema documentation are present. The initial code review found one blocking mismatch between the newly accepted TLS spelling and its runtime meaning.
Action required: please make validation and runtime parsing agree on whether case variants such as SKIP are accepted, and add regression coverage for the chosen contract.
Blocking findings:
GATOR-deed4de9-01: validation accepts case variants that the runtime interprets differently
Carried findings:
- None
Non-blocking suggestions:
- None
Gator metadata
- Validation: linked issue #3310 is accepted and this PR implements its policy-schema cleanup
- Docs: Fern policy reference and release migration notes are updated
- Checks: lightweight current-head checks and DCO are green; required full checks have not been dispatched
- E2E: required for policy enforcement and supervisor-network behavior, but deferred until the blocking finding is resolved
- Head SHA:
deed4de95d0817c02652a3be7637e9e57d768ef5 - Base SHA:
fc03bffead64f09c1f756a8eea6391ada999cf7a - Merge base SHA:
c502be9fd73c41bab25f0a88587b7a3d90c96b55 - Patch ID:
d326cd9bda107cfacd73d41104c06dcf166c7899 - Gator payload:
9 - Review mode:
initial - Previous reviewed SHA: none
- Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:in-review
deed4de to
e6c2892
Compare
|
Label |
|
/ok to test e6c2892 |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
The follow-up review confirms that exact lowercase skip is now the only accepted opt-out spelling and that accepted values are checked against runtime parsing. The prior TLS-mode mismatch is resolved, with no new blocking findings in the author delta.
Blocking findings:
- No blocking findings remain
Carried findings:
- None;
GATOR-deed4de9-01is resolved
Gator metadata
- Validation: linked accepted issue #3310 covers this policy-schema cleanup
- Docs: Fern policy reference and release migration notes are updated
- Checks: current-head Branch Checks and Helm Lint are running
- E2E:
test:e2eapplied; current-head mirror created and Branch E2E Checks are running - Head SHA:
e6c28923b1b60f4fff67448c8154e578270b7e4e - Base SHA:
50c5cf8ed0423f545fee7e0ccc7e7699eec9e290 - Merge base SHA:
c502be9fd73c41bab25f0a88587b7a3d90c96b55 - Patch ID:
6e17746529cf8b656121f7e3c6902e0a34a442aa - Gator payload:
9 - Review mode:
follow_up - Previous reviewed SHA:
deed4de95d0817c02652a3be7637e9e57d768ef5 - Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:watch-pipeline
|
Looks all check passed/skipped, no inflight jobs running |
|
/ok to test 84752d9 |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Thanks @lunarwhite. I checked your E2E diagnosis against the rebased head: current main now includes #3386, which retires the Community-image dependency behind those stale embedded tls: terminate values. The bounded critical-only review found no newly introduced Critical defect, and the prior TLS spelling finding remains resolved. Required current-head workflows, including E2E, are now queued.
Blocking findings:
- No blocking findings remain
Carried findings:
- None;
GATOR-deed4de9-01remains resolved
Gator metadata
- Validation: linked accepted issue #3310 covers this policy-schema cleanup
- Docs: Fern policy reference, security architecture guidance, and release migration notes are updated
- Checks: current-head Branch Checks are queued; Helm Lint completed successfully with its lint job skipped because no Helm files changed
- E2E:
test:e2eremains applied;/ok to test 84752d92d63c4e64d09a9d9fa8cdbf4d9cdd8e71created the current-head mirror and queued Branch E2E Checks - Head SHA:
84752d92d63c4e64d09a9d9fa8cdbf4d9cdd8e71 - Base SHA:
50230616d51f352954450c527f9dd64218be0b80 - Merge base SHA:
50230616d51f352954450c527f9dd64218be0b80 - Patch ID:
05cbb011554faf0534df04d05340512aa29c8d4d - Gator payload:
9 - Review mode:
critical_only - Previous reviewed SHA:
15e5c55a5452812476b6e0b915726743a5df1f61 - Review budget exhausted: yes
- Maintainer decision required: no
- Next state:
gator:watch-pipeline
|
Yes I've rebased against latest main.. With PR 3386, the default image carries no baked policy now, which will hopefully unblock the failing CI #3414 (comment). |
Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
84752d9 to
d94e073
Compare
|
/ok to test d94e073 |
|
Last push fixes the one remaining test failure. |
|
Label |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Thanks @lunarwhite. I checked the current author delta you described, which removes the rejected terminate and passthrough cases from an importability test. The bounded critical-only review found no newly introduced Critical defect, and the prior TLS spelling finding remains resolved.
Blocking findings:
- No blocking findings remain
Carried findings:
- None;
GATOR-deed4de9-01remains resolved
Gator metadata
- Validation: linked accepted issue #3310 covers this policy-schema cleanup
- Docs: Fern policy reference, security architecture guidance, and release migration notes are updated
- Checks: current-head DCO is green; required branch workflows are awaiting current-head dispatch
- E2E:
test:e2ewas reapplied after/ok to test d94e0738416889807ef8517f9832f39ad5b5956f; E2E Label Help is queued - Head SHA:
d94e0738416889807ef8517f9832f39ad5b5956f - Base SHA:
7139df8ca53aa3a5210e40175264c8118d4c0e06 - Merge base SHA:
50230616d51f352954450c527f9dd64218be0b80 - Patch ID:
d0e702e59fe12f1a3ff84aec3f63796b578099a3 - Gator payload:
9 - Review mode:
critical_only - Previous reviewed SHA:
84752d92d63c4e64d09a9d9fa8cdbf4d9cdd8e71 - Review budget exhausted: yes
- Maintainer decision required: no
- Next state:
gator:in-review
|
Checking latest CI runs, the only failre is from kubernetes-workspace-managed-e2e / Kubernetes E2E (workspace managed mode). Seemingly it's a SQLite write-lock race rather than anything from this PR. Both failing tests die in workspace persistence, before a sandbox or a policy is involved: SQLite code 5 is |
|
@johntmyers ready for your final review once you get a chance, thanks. |
Monitoring CompleteMonitoring is complete because this PR has merged. Final status: the PR reached I removed the active Gator metadata
|
Summary
The endpoint
tlsfield accepts only an omitted value, meaning auto-detect and terminate for inspection, orskip.terminateandpassthroughbecame no-ops when termination became automatic, leaving a MED-severity deprecation warning as their only remaining effect; they are now rejected along with any other unrecognized value, and the warning machinery is deleted rather than upgraded.Removing the field from an existing policy is exactly behavior-preserving, because the runtime already resolved both spellings to automatic termination. The schema break lands inside the pre-0.1.0 window
rfc/0014-release-stabilitydesignates for finalizing interfaces.Related Issue
Closes #3310
Changes
validate_endpoint_modesandvalidate_endpoint_mode_valuesto an omitted value orskip, sharing one helper so the authored-string and proto-enum ingresses cannot drift. Both are already wired into policy validation, provider profile lint, and route parsing, so enforcement reaches every boundary without new plumbing.validate_l7_policiesand in the agent-authored proposal ingress.validate_l7_policiesreadstls,enforcement, andaccesswithout checking them, so a malformed value passes load and is caught only byparse_l7_configreturningNone, which silently downgrades an inspected endpoint to an uninspected L4 relay. Closing that covers all three fields.tlsas outside the prover's authority model, matching howskipis already handled. Otherwiseopenshell-provercertifiesWithinfor a policy the gateway rejects.proto/sandbox.protoand the hand-written Go SDK types say so, with the Go bindings regenerated.effective_tlsand the TUI "TLS terminate" annotation.parse_tls_modekeeps its lenient_ => Autofallback, which inspects and so still fails closed.skills/generate-sandbox-policy/to warn against substitutingtls: skipfor a rejected value, and drop the rejected spellings fromproviders/aws-s3.yaml, the quickstart README, and the fixtures carrying them incidentally.policy-schema.mdx, and the accepted-values invariant inarchitecture/security-policy.md.Upgrade impact
A stored policy carrying a rejected value fails validation on read, so
GetSandboxConfigreturnsFAILED_PRECONDITION.openshell policy list --globalreports which revision is invalid and why, andpolicy set --globalre-applies a corrected policy, because it validates only the incoming one and treats an unreadable current revision as non-matching.A policy baked into a workload image is rejected the same way, and this one stops the sandbox from starting. When the gateway has no policy for the sandbox, the supervisor requests the image's
/etc/openshell/policy.yamlover the boundary protocol and parses it; a rejected value ends startup withImage policy is invalid; replace the sandbox policy to repair configuration. The community sandbox images still shiptls: terminate, so this reaches anyone running one without a gateway-side policy.policy set --globalrepairs it, since the gateway then returns a policy and image discovery is not consulted, and rebuilding the image without the field restores the original behavior.Testing
mise run pre-commitpassesChecklist