Repository navigation
Check server and mounted client certificates before deployment - #6517
freeqaz-openai wants to merge 51 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesAdds optional checks for server certificates and client certificates selected through Kubernetes workload mounts. Example: A Deployment mounts an expired client certificate at /etc/openclaw/openshell/tls.crt.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds useful certificate diagnostics absent from main, and no actionable correctness or security defects were found; its draft status and requested dependency review order remain in effect. Reviewed head: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe optional deployment diagnostic accepts an operator plan and Kubernetes credentials, reads selected infrastructure resources, and returns prerequisite observations without changing those resources. flowchart TD
A[Operator plan and credentials] --> B[Prerequisite diagnostic]
B --> C[Isolated certificate reader]
C --> D[Policy controlled kubectl transport]
D --> E[Kubernetes workload and Secret]
E --> C
C --> F[Reduced diagnostic report]
Technical reviewBest possible solution: Retain the optional certificate checks in the existing diagnostic owner and follow the recorded dependency review order before landing. Do we have a high-confidence way to reproduce the issue? This is a capability addition; current-main source confirms that the optional server and mounted-client certificate selections are unsupported. Is this the best way to solve the issue? The change extends the existing diagnostic, preserves Kubernetes authorization, and clearly limits successful observations to certificate metadata rather than claiming a working TLS connection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 26e99a634c50. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed November 24, 2026, 11:27 PM ET / November 25, 2026, 04:27 UTC (Revision 6). |
…tial policy Pin context and trust inputs before authenticated reads. Refuse unsupported credential refresh and ambiguous targets. Keep the current PostgreSQL fixture from main.
Keep bearer-only tests on a separate HTTPS listener. Verify refusal for missing or untrusted client certificates and the wrong server CA.
…e diagnostic report
|
@clawsweeper re-review Both optional certificate checks now live in this branch. Please check the permission boundary and the retained public CLI tests. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review The Service diagnostic landed. Please review the remaining certificate-only diff against main. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Review #7318 first. This branch includes its credential policy support. Review only the certificate changes. Please review Secret access before merging.
The optional prerequisite diagnostic can check two certificate problems before deployment.
serviceDependency.tlsto check the selected server certificate's DNS name and validity dates.clientCertificateto trace a container path through its Deployment or StatefulSet template to the Secret. A changed workload UID or resource version makes the result unknown.Kubernetes returns the whole Secret, including any private key. Use an identity already authorized for that Secret. A separate process reads it and returns a limited result without the key or certificate contents. A denied read cannot establish that a certificate needs rotation. Check the running process, peer trust and actual TLS connection separately.
When
--require-kubercis selected, separate readers check the same policy and client as the parent. If a reader detects a policy change, the diagnostic stops without printing a partial report. Omitting the certificate options leaves Secret reads disabled.Verification
At
5e44c02a, the loopback transport suite and EKS command fixtures passed on the supported clients. The transport tests use genuine kubectl. They check plugin approval and denial, a policy change just before a mounted Secret read, workload replacement, redirects and denied access. Repeated malformed-input cases exercise the isolated reader directly. The final change shortens the startup guide.At
6ec2d9ec, the focused installation handoff test passed on disposable K3s with zero skips. Denying the named Secret read produced an unknown result. Allowing only that read made the certificate check pass. The test used synthetic certificates and a zero-replica workload. It did not verify a running client's TLS handshake or exercise a live EKS account.