Repository navigation
Add Connector Gateway KEK rotation guide - #1213
tgrunnagle wants to merge 2 commits into
Conversation
Operator-facing guide for rotating, rolling back, and retiring the gateway's key-encryption key, adapted from the internal KEK operations reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Visual regression failedCommit
Open the failed visual job · Download the full Playwright report If the change is intentional, a repository collaborator can comment |
danbarr
left a comment
There was a problem hiding this comment.
The guide has a clear purpose, explains why rotation needs two rollouts, and provides useful recovery guidance. Please address these three operator-facing issues before merging.
This is an AI-assisted editorial and source review of the current PR head (ed83bcd6); the rotation procedure has not been executed against a cluster.
-
Correct the retirement timing guarantee (
docs/connector-gateway/rotate-encryption-key.mdx, lines 182–186). “Waiting at least 30 days after the activation rollout leaves only credentials with no expiry” overstates what the wait guarantees. ToolHive retains a token until its access-token expiry plus 30 days. A token written before activation could expire after activation and therefore remain encrypted under the old key beyond that window. Expiring dynamic client registrations can also remain until their own expiry. Describe 30 days as a minimum that reduces reconnects, rather than proof that all expiring credentials have cleared. Explain that the necessary retention period depends on the remaining token and client-registration lifetimes, and that removal can still require reconnects. -
Make the supported Secret configuration explicit (lines 23–28 and the rotation procedure). The prerequisites offer
kek.valueandkek.generatealternatives, but the subsequent commands and YAML consistently assumeexistingSecret: connector-gateway-kek. Copying that YAML into either alternative configuration introduces a second key source; the chart requires exactly one. Inline mode also requires updating the Helm value, rather than applying the external-Secret command. Keep the worked procedure scoped toexistingSecret, or provide explicit substitutions for each alternative, including which source settings to retain or remove. A short prerequisite aside is insufficient for these different update paths. -
Separate the canary warning from startup failures (lines 290–293). The message
verified but could not advance to the current versionappears under “Replicas refuse to start.” In the implementation,ErrKEKCanaryAdvanceFailedproduces a warning and startup continues because verification already succeeded. Give this warning its own troubleshooting entry. State that verification succeeded, startup continues, and operators should investigate Redis write connectivity or permissions.
One nonblocking clarification: at lines 235–236, distinguish rolling back activeVersion from rolling back key material. Changing the active pin is the supported rollback described earlier; reverting the Secret’s contents is what can discard required versions.
Description
Adds Key rotation (
connector-gateway/rotate-encryption-key.mdx) to the Connector Gateway sidebar's Operate group. It's an operator-facing how-to adapted from the internalenterprise/connector-gateway/docs/kek-operations.md, and it covers:kek.activeVersionpinned to the old one and a bumpedkek.keyringGeneration, then activate itactiveVersionbackkek_unsealable_reads_total, and the effects of dynamic client registration (everyone reconnects, old client is orphaned and logged asreplaced_client_id)helm rollback, Argo CD, or TerraformIt also links to the new page from the KEK backup note in Configure the Connector Gateway.
I left out internal-only material: ADR links, Go type and function names, the illustrative Terraform/ESO pipeline, and the first-rotation precondition for pre-
Active()binaries. I checked these facts against source: the chart values and checksum inputs (helm/values.yaml,templates/deployment.yaml,templates/kek-secret.yaml), the per-version canary and its log/error strings (kek_canary.go), the retirement guard message (runtime/composition.go), the metric name and that it goes through the global MeterProvider so both OTLP and Prometheus export it, and the 30-day upstream token retention (toolhivev0.50.0DefaultRefreshTokenTTL). I also ran thejq/opensslkeyring commands locally to confirm they produce a valid map that keeps the version 1 bytes unchanged.One thing for reviewers: the internal doc says the canary verifies only the active version. The current code keeps a per-version canary and checks every version, so the page describes that behavior.
Type of change
Related issues/PRs
Source:
enterprise/connector-gateway/docs/kek-operations.mdin the enterprise platform repo.Submitter checklist
Content and formatting
Navigation
sidebars.ts) updated for added, deleted, reordered, or renamed filesvercel.jsonfor moved, renamed, or deleted pages (i.e., if the URL slug changed) - N/A, no moved pagesReviewer checklist
Content
🤖 Generated with Claude Code