paperclip: rotate agent-argus SA token Secret via rename to -v3 (REN-544) #1110

Merged
Ghost merged 1 commits from atlas/ren-544-argus-token-v3 into master 2026-10-03 17:10:00 +00:00

What

Rename Secret paperclip/agent-argus-token-v2 → agent-argus-token-v3 (type kubernetes.io/service-account-token, annotation kubernetes.io/service-account.name: agent-argus unchanged) and the matching resourceNames entry in Role agent-token-read.

Why

The -v2 token was printed in Argus run d2eede8a (REN-542). The token controller mints a new token for -v3; Flux prunes -v2, which invalidates the leaked token. Same change as REN-525 (#1104).

How verified

Diff is exactly two lines; no other reference to agent-argus-token in the repo. No kubectl/kustomize in the runner, so not rendered locally. Cluster check after merge: flux reconcile ks paperclip, -v2 gone, -v3 has data.token.

Impact

Argus loses cluster access from merge until Hermes rotates its KUBECONFIG_CONTENT (REN-542). Accepted: the old token is leaked. No workload restarts.

Note: #1107 (hestia) and #1109 (atlas) edit neighbouring lines in the same Role; whichever merges later may need a rebase.

Revert

Revert this commit. Note a revert recreates -v2 with a new token, not the leaked one.

🤖 Generated with Claude Code

## What Rename Secret `paperclip/agent-argus-token-v2` → `agent-argus-token-v3` (type `kubernetes.io/service-account-token`, annotation `kubernetes.io/service-account.name: agent-argus` unchanged) and the matching `resourceNames` entry in Role `agent-token-read`. ## Why The `-v2` token was printed in Argus run `d2eede8a` (REN-542). The token controller mints a new token for `-v3`; Flux prunes `-v2`, which invalidates the leaked token. Same change as REN-525 (#1104). ## How verified Diff is exactly two lines; no other reference to `agent-argus-token` in the repo. No kubectl/kustomize in the runner, so not rendered locally. Cluster check after merge: `flux reconcile ks paperclip`, `-v2` gone, `-v3` has `data.token`. ## Impact Argus loses cluster access from merge until Hermes rotates its KUBECONFIG_CONTENT (REN-542). Accepted: the old token is leaked. No workload restarts. Note: #1107 (hestia) and #1109 (atlas) edit neighbouring lines in the same Role; whichever merges later may need a rebase. ## Revert Revert this commit. Note a revert recreates `-v2` with a **new** token, not the leaked one. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ghost added 1 commit 2026-10-03 16:49:29 +00:00
paperclip: rotate agent-argus SA token Secret via rename to -v3 (REN-544)
ci/woodpecker/pr/ci-scripts-test Pipeline was successful
ci/woodpecker/pr/pr-review Pipeline was successful
ci/woodpecker/pr/ci-manifests-test Pipeline failed
512ac2e41b
The -v2 token leaked into Argus run d2eede8a (REN-542). Renaming makes the
token controller mint a new token; Flux prunes the old Secret, which
invalidates the leaked token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review-bot left a comment
Member

🤖 Automated review — model CLI default (complexity: complex), commit 512ac2e41bbe22e4e7bfd43db08668d7972c3af6.

Advisory review by the review-bot pipeline. It never approves; a human merges. Push new commits to get a fresh review.


Summary

This PR renames the agent-argus ServiceAccount token Secret from agent-argus-token-v2 to agent-argus-token-v3 and updates the matching resourceNames entry in the agent-token-read Role (kubernetes/apps/paperclip/agent-kubectl-rbac.yaml:107 and :192), to force Kubernetes to mint a fresh token after the old one was leaked in a bot run (REN-542). This is a minimal, mechanical two-line change that mirrors the prior REN-525 (#1104) rotation pattern already present in this same file (e.g. agent-atlas-token-v2, agent-hestia-token-v2). No blocking issues found.

🟡 Suggestions

  • The PR body itself notes a merge-order hazard: #1107 (hestia) and #1109 (atlas) touch neighboring lines in the same resourceNames list (agent-kubectl-rbac.yaml:188-193), so whichever of these merges last will need a rebase. Not a defect in this PR, but worth confirming before merge that it's still rebased against current master if the others landed first.
  • The PR body documents that Argus loses cluster access from merge until Hermes rotates KUBECONFIG_CONTENT (REN-542) — this is called out as accepted/expected, not a code issue, but worth the human merging to double check that follow-up is tracked/actioned.

Tests

No automated tests apply to this repo's structure for this change (static manifest rename). The PR author verified by inspection that the diff is exactly two lines and that there are no other references to agent-argus-token in the repo — I independently confirmed this via grep across the repository: the only file referencing agent-argus-token-* is kubernetes/apps/paperclip/agent-kubectl-rbac.yaml, and the Secret's annotations.kubernetes.io/service-account.name: agent-argus is unchanged, so the renamed Secret still binds to the correct ServiceAccount. The stated cluster-side verification plan (flux reconcile ks paperclip, confirm -v2 gone and -v3 has data.token) is reasonable for this change and must happen post-merge since it can't be rendered/tested locally (no kubectl/kustomize in this runner).

Recommendation

Looks reasonable — no blocking issues; comments above are optional.

🤖 **Automated review** — model `CLI default` (complexity: complex), commit `512ac2e41bbe22e4e7bfd43db08668d7972c3af6`. > Advisory review by the `review-bot` pipeline. It never approves; a human merges. Push new commits to get a fresh review. --- ## Summary This PR renames the `agent-argus` ServiceAccount token Secret from `agent-argus-token-v2` to `agent-argus-token-v3` and updates the matching `resourceNames` entry in the `agent-token-read` Role (`kubernetes/apps/paperclip/agent-kubectl-rbac.yaml:107` and `:192`), to force Kubernetes to mint a fresh token after the old one was leaked in a bot run (REN-542). This is a minimal, mechanical two-line change that mirrors the prior REN-525 (#1104) rotation pattern already present in this same file (e.g. `agent-atlas-token-v2`, `agent-hestia-token-v2`). No blocking issues found. ## 🟡 Suggestions - The PR body itself notes a merge-order hazard: #1107 (hestia) and #1109 (atlas) touch neighboring lines in the same `resourceNames` list (`agent-kubectl-rbac.yaml:188-193`), so whichever of these merges last will need a rebase. Not a defect in this PR, but worth confirming before merge that it's still rebased against current `master` if the others landed first. - The PR body documents that Argus loses cluster access from merge until Hermes rotates `KUBECONFIG_CONTENT` (REN-542) — this is called out as accepted/expected, not a code issue, but worth the human merging to double check that follow-up is tracked/actioned. ## Tests No automated tests apply to this repo's structure for this change (static manifest rename). The PR author verified by inspection that the diff is exactly two lines and that there are no other references to `agent-argus-token` in the repo — I independently confirmed this via grep across the repository: the only file referencing `agent-argus-token-*` is `kubernetes/apps/paperclip/agent-kubectl-rbac.yaml`, and the Secret's `annotations.kubernetes.io/service-account.name: agent-argus` is unchanged, so the renamed Secret still binds to the correct ServiceAccount. The stated cluster-side verification plan (`flux reconcile ks paperclip`, confirm `-v2` gone and `-v3` has `data.token`) is reasonable for this change and must happen post-merge since it can't be rendered/tested locally (no kubectl/kustomize in this runner). ## Recommendation Looks reasonable — no blocking issues; comments above are optional. <!-- pr-review:sha=512ac2e41bbe22e4e7bfd43db08668d7972c3af6 -->
Ghost left a comment

Changes requested on 512ac2e4: content correct (Secret name + Role resourceNames only, no other agent-argus-token refs), but conflicts with master after #1107/#1109 (Role now lists atlas-v3/hestia-v3). Rebase on origin/master keeping those, force-push; I re-review the new SHA.

Changes requested on 512ac2e4: content correct (Secret name + Role resourceNames only, no other agent-argus-token refs), but conflicts with master after #1107/#1109 (Role now lists atlas-v3/hestia-v3). Rebase on origin/master keeping those, force-push; I re-review the new SHA.
Ghost force-pushed atlas/ren-544-argus-token-v3 from 512ac2e41b to ccb755ba38 2026-10-03 17:08:25 +00:00 Compare
Ghost approved these changes 2026-10-03 17:10:00 +00:00
Ghost left a comment

Approve @ ccb755ba38. Diff vs master 997e11ce is 2 lines: Secret agent-argus-token-v2->v3 (type and service-account.name annotation unchanged) and Role agent-token-read resourceNames. master's atlas/hestia -v3 entries kept. git merge-tree clean, no conflict markers, agent-argus-token only in those 2 places. Flux ks paperclip has prune: true, so -v2 is deleted on reconcile. Revert = revert merge (recreates -v2 with a fresh token).

Approve @ ccb755ba38b5b2b44ad283e11cea117233040163. Diff vs master 997e11ce is 2 lines: Secret agent-argus-token-v2->v3 (type and service-account.name annotation unchanged) and Role agent-token-read resourceNames. master's atlas/hestia -v3 entries kept. git merge-tree clean, no conflict markers, agent-argus-token only in those 2 places. Flux ks paperclip has prune: true, so -v2 is deleted on reconcile. Revert = revert merge (recreates -v2 with a fresh token).
Ghost merged commit 4b11802e86 into master 2026-10-03 17:10:00 +00:00
Sign in to join this conversation.