RouterOS credentials onto the two-slot pattern: terraform user, rollback backup password; retire rotate-password #147
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac#147
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Move the hand-rotated RouterOS credentials onto the two-slot pattern of
routeros/modules/monitoring(ADR-0011, layer 1), and retire the imperative rotation tasks.Today
terraformREST user (<DEV>_PASSWORD)secret/routeros-secrets; ESO intorouteros-<dev>-env(providerROS_PASSWORD, the rollback scripts, the peer'sROLLBACK_PEER_PASSWORD)task routeros:rotate-password(imperative, device first, then OpenBao, then force-sync, one device at a time; 401 window for the device and its peer)<DEV>_ROLLBACK_BACKUP_PASSWORDvault kv patch+ force-sync, by hand, while not armedadminTarget
terraform-a/terraform-b(groupterraform, same policy set). The root rotates the slot the provider is not logged in with, writes OpenBao first, sends the router what OpenBao holds, then publishesrouteros/<dev>/terraform/active. The runner'sROS_PASSWORD/user come from the active slot (ESO template, as in mktxp-credentials). The provider can never lose its own login mid-apply, because the slot it uses is never the one being rotated. Open points:terraform-a; the first apply addsterraform-b. The guard and protected set need an exception for this module, with the same reasoning asmodules/monitoring.ROLLBACK_PEER_PASSWORD) must read the peer's active slot.rotate-password.shandtask routeros:rotate-simare deleted once this is live.arm.shcan generate it and keep it in the disabled ppp secret it already uses, and the judge deletes it. No OpenBao key, no env var, nothing to rotate.Verify each step with the sim (CHR + dev OpenBao) like the monitoring module: first apply, re-plan, a period flip, partial failure, and the provider's own login across a flip.
Refs ADR-0011, #139 (
modules/monitoring), #68 (secrets and state), #74 (rollback fuse).