Projects

Password rotation without a restart

Rotating the support password needs a restart of every serverno restart.

A colleague raised the ticket as a proof of concept. The design and the work were mine.

Every customer server has a support login. Each server is a single pod, with its database in the same pod.

Why it was needed

The password lived in a Terraform variables file. Rotating it meant an apply, a wait for the sync and a restart of every server, and a restart is a customer outage.

EKS clusterCustomer server pod1Passwordsupport edits hereExternal Secretssyncs the secret inKubernetes Secretmounted as a fileSidecarapply, then log inDatabasesame pod
Support changes the password in 1Password. It reaches the running pod without a restart, and the sidecar logs in with it before calling the rotation done.

How it was done

  1. Redesigned the Helm chart so each secret names its own store, 1Password for secrets people rotate and AWS Secrets Manager for machine ones.

  2. Added a sidecar (a helper container in the same pod) that applies a new password and checks it with a real login.

  3. Proved it on staging first, then moved every cluster to one shared 1Password item.

Problems on the way

  • The new External Secrets Operator dropped the old resource API.

    Every manifest still used it. Fix: Upgraded to a version that serves both, moved every manifest, then upgraded again.

  • Rotating the related access token would have broken about a third of the servers.

    Those servers also used the token as an internal key. Fix: Rotated only the password, and raised a product fix for the token.

Store a secret where its reader is.

Results

  • 0restarts to rotate the support password
  • < 2 minfrom a changed password to running servers
  • 7 → 1per-region passwords became one entry