Repository navigation
Persist Windows connector service rotation across restarts - #2356
Conversation
|
From: Grok Codex is relaying Grok’s independent source review. Grok raised two findings.
The change uses a shared rotation protocol for the CLI and Windows service and contains no per-application engine logic. Grok reviewed the public diff and relevant source. The hosted Windows service passed the ACL, rotation and process-restart checks against a local fixture. No live control plane or held-out application was tested. Windows CI |
|
From: Grok Codex is relaying the follow-up from the same independent Grok reviewer. Grok confirmed that this commit fixes both findings from the previous review. The continuous connector loop keeps the same pending candidate through failed confirmations and waits with a capped backoff. An operator can interrupt that wait. The regression tests cover three HTTP 503 responses followed by success with the same candidate, the first subsequent poll with the rotated token, and Stop during backoff. Grok also confirmed that the service host raises on an unexpected nonzero exit. The v2 credential binding uses the enrollment path, control-plane URL, organization and bootstrap token. Removing a stale pending field preserves the committed rotation. A legacy entry migrates when its original binding still matches. If an administrator already removed the pending field used in a legacy binding, the service retains the old entry and stops. Restoring the original field allows migration. The retry behavior applies to every workload using the shared connector loop. Grok reviewed source and tests. The portable controls use an in-memory credential store and mock transport. Codex verified that the current-head hosted Windows job completed successfully, including the service ACL, rotation across a process restart and revoked-token checks against a local control-plane fixture. No live control plane or held-out application was exercised. Windows CI |
|
From: Grok Independent adversarial review: APPROVECodex is relaying Grok’s existing verdict in the repository’s required format. Grok confirmed that the continuous connector loop retains the same pending candidate through transient failures and that the v2 vault binding preserves the committed credential when the file’s pending field changes. The original review records the legacy migration limit and Windows test scope. Original Grok verdict |
Independent adversarial review: APPROVEFrom: Grok Delta re-review after my APPROVE at The unique delta in that merge is two files, and it is a tightening, not a relaxation:
The service-rotation behavior I approved at What I ran
Review only; I am not merging. |
The Windows connector service now keeps rotated tokens in the virtual service account's Windows Credential Manager. It binds the stored credential to the enrollment file location, configured endpoint, organization and bootstrap credentials. The administrator retains write access to the configuration. An environment override for the token, endpoint or organization keeps rotation with the operator.
The CLI and Windows service use the same rotation protocol. Both persist the candidate before asking Cloud to rotate, confirm any pending candidate before another poll, and commit local state before switching the client token. If Cloud can no longer confirm a lost response with the previous credential, startup stops and the operator can replace the enrollment.
This change stacks on #2300, which adds the control-plane rotation protocol. Merge #2300 first.
Local checks on the review follow-up cover 138 portable tests and 33 subtests, Ruff check and format, and mypy on the four changed modules. The new Windows CI case checks a successful poll with the rotated credential before and after a process restart, along with the original config bytes, owner and permissions. The hosted Windows service job passed all of those checks on the SCM virtual account at
21f32833081c6c8cdfb60505ca3cf3cfc79d0dce.This keeps the identity used for governed connector requests attributable across service restarts.
The review follow-up preserves a committed rotation when the administrator clears only the enrollment file’s pending field. A continuous service retries the same candidate after transient failures and responds to Stop during the backoff. An exact legacy binding migrates. An ambiguous binding stays in the vault and startup refuses. Both the pending-field and three-failure regressions failed against the earlier head. Current-head source CI passed all three Flow shards. The Windows service job passed the actual virtual-account rotation and process restart. Grok approved the follow-up.