Skip to content

Check server and mounted client certificates before deployment - #6517

Open
freeqaz-openai wants to merge 51 commits into
mainfrom
deploy/client-certificate-preflight
Open

freeqaz-openai wants to merge 51 commits into
mainfrom
deploy/client-certificate-preflight

Conversation

@freeqaz-openai

@freeqaz-openai freeqaz-openai commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • Set serviceDependency.tls to check the selected server certificate's DNS name and validity dates.
  • Set clientCertificate to 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-kuberc is 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.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds 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.

  • Before: The prerequisite diagnostic cannot check that mounted certificate selection.
  • After: The diagnostic resolves the workload mount to its Secret and reports the expired certificate without printing certificate or key contents.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and source-reviewed with meaningful integration coverage; inspectable behavior evidence remains limited to test-backed verification.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the contributor proof gate; its body reports genuine-kubectl transport tests and a final K3s CLI integration run, but supplies no standalone output artifact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Operators lack a prerequisite check for an expired or incorrectly named server certificate and for a client certificate selected by a workload mount.
Reason: The existing feature contributor supplies owner direction for optional deployment diagnostics with explicit permission and verification boundaries.

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: 6ec2d9ec80c370265d8eb6ccb6f782be633cd784

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied verification reports CLI integration runs but includes no inspectable standalone operator transcript of the changed certificate checks.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Prerequisite diagnostic ownership keeps the original intent (7692d33: Provide read-only observations for explicitly selected installation prerequisites without exposing provider credentials.)
  • Service checks and Secret access changes intended behavior with a stated reason (e1d4fb8: The merged Service-only diagnostic intentionally rejected TLS selections and deferred certificate checks to this PR.)
  • Kubectl preference handling changes intended behavior with a stated reason (e1d4fb8: Disable preferences to preserve the selected target, requiring credential-owner permission before executing plugins; the included dependency adds an explicit restrictive-policy alternative.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (5 earlier review cycles)
  • reviewed 2026-11-18T23:33:00.008Z sha a4aa5d2 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-24T03:32:26.212Z sha aa6cc52 :: blocked before merge. :: none
  • reviewed 2026-11-24T20:55:43.934Z sha 2b071bf :: blocked before merge. :: none
  • reviewed 2026-11-24T22:43:03.609Z sha 93e489a :: needs maintainer review before merge. :: none
  • reviewed 2026-11-24T22:59:41.308Z sha de9be28 :: needs maintainer review before merge. :: none

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.
@freeqaz-openai freeqaz-openai changed the title feat(ops): check client certificates selected by workload templates Check server and mounted client certificates before deployment Nov 24, 2026
@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Both optional certificate checks now live in this branch. Please check the permission boundary and the retained public CLI tests.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 24, 2026
Base automatically changed from deploy/service-dependency-preflight to main November 24, 2026 22:49
@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

The Service diagnostic landed. Please review the remaining certificate-only diff against main.

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 25, 2026
@freeqaz-openai
freeqaz-openai marked this pull request as ready for review November 25, 2026 04:38
@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner November 25, 2026 04:38

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

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant