Loading
docs(encryption): cover the encryption block per environment and in older installs (S04-A required encryption block plan: 16/16)
Summary
- Problem: The key-rotation runbook says the
encryptionblock "is enabled in no environment". That goes false as soon as staging has the block. The self-managed install guide also has no steps for installs made from its first copies, which have no encryption setup at all. - Impact: An on-call responder could treat a leaked root key as harmless in an environment that already runs with the block. A self-managed operator on an older install has no way to add encryption.
- Change: The runbook now scopes a leak per environment. A key that leaks before its environment first runs with the block opens nothing yet, and gets replaced before that first run. Closing the access path and that one write end the response, with no deploy. The guide gets
### Add encryption to an older installunder## Upgrading. It adds the root-key Secret, its mount and the block, in that order. It keeps the older ConfigMap layout, and ends with theencryption tier wiredboot-line check. It says the block is required from AR 3.0.0, and that an install from the first copies also needs token exchange. - Downsides: The new passage was not run end to end on a real older install. Ran it below says what was checked instead. An install from the first copies still has no steps to move to token exchange: #1686 (closed) tracks it.
Checklist
- Ran it: No. This is docs only, and the older-install passage was not run on a real install. I checked it against the chart and the code instead:
helm templateof the public AR chart at 1.223.2, 1.243.0 and 2.149.0 renders the older ConfigMap layout with the root-key mount. The container isapp, the pod label isapp.kubernetes.io/name=artifact-registry, and the Secret volume is not optional.- v1.223.2 accepts
encryption.localand ignores it. v1.242.0 fails boot on it. v1.243.0 is the first release that logsencryption tier wired. - Chart 3.0.0 is app v3.0.0. v2.149.0 logs the
configure auth.token_exchangewarning for a config withiamand noauthblock. - The quoted log lines and error strings match
cmd/artifact-registry/wire_encryption.goandcmd/artifact-registry/main.go.
- Interfaces and data: None. Docs only.
- Failure: n/a for code. In the procedure, a missing mount or a bad key makes a new pod exit 1 with one of the two messages the passage lists. The rolling update keeps the old pods serving.
- Rollout: n/a. No code or configuration change.
- Hot path: n/a.
- Database: n/a.
- Security: No new input, route or permission. The passage creates the root-key Secret the way stage 3 does, in a private directory, and says to back the key up first. The runbook tells a responder to replace a key that leaks before its environment first runs with the block.
- ADRs:
./scripts/adr-freshness.shreports the local mirror one upstream commit behind: ADR 027 (Orbit replication), which this change does not touch. These docs sit under ADR-024 (infrastructure delivery), and its Self-Managed and secrets text does not conflict with them. The runbook's ADR-010 citation is in a section this MR leaves alone. The two internal ADRs were not checked at source. - E2E: None. Docs only, and no client-visible behavior changes.
- Simplicity: I did not move older installs to stage 5's
appConfig.datalayout. That would be a second migration inside the same procedure. The passage keeps the layout the install already has.
Plan and spec amendments
This MR corrects Step 16's text in the plan:
- The runbook condition was quoted as "while an environment runs without the block". Key rows stay after the block is removed, so the first run is what counts. It is now "until an environment first runs with the block".
- The guide entry cited the guide's steps 9, 10 and 12. The guide now has stages, so the entry names stages 3 and 5 and says the passage keeps the ConfigMap layout.
No spec text changes.
Merge order
Step 12 (https://gitlab.com/gitlab-org/ops/artifact-registry/-/work_items/1488) edits both files in other passages, so the two merge in either order. No open MR touches these files today.
Closes https://gitlab.com/gitlab-org/ops/artifact-registry/-/work_items/1492
Edited by Dzmitry (Dima) Meshcharakou