Skip to content

fix: wire time_rotating to auth proxy TLS cert for actual rotation (N10)#25

Merged
nandajavarma merged 1 commit into
mainfrom
nv/fix-cert-rotation
May 7, 2026
Merged

fix: wire time_rotating to auth proxy TLS cert for actual rotation (N10)#25
nandajavarma merged 1 commit into
mainfrom
nv/fix-cert-rotation

Conversation

@nandajavarma
Copy link
Copy Markdown
Collaborator

Problem

time_rotating.auth_proxy_cert_rotation is declared with a 30-day rotation period but is never referenced by tls_private_key.auth_proxy or tls_self_signed_cert.auth_proxy. The cert has a 1-year validity period and never actually rotates — the time_rotating resource is dead code.

Fix

Add replace_triggered_by = [time_rotating.auth_proxy_cert_rotation] to both tls_private_key.auth_proxy and tls_self_signed_cert.auth_proxy lifecycle blocks. This causes both resources to be recreated every 30 days when the rotation trigger fires.

Impact

On next terraform apply after the 30-day window expires, the TLS key and cert will be regenerated and the runner instance template will be updated (since the cloud-init user-data embeds the cert/key). The MIG rolling update will pick up the new template.

Audit reference

Customer security audit item N10.

time_rotating.auth_proxy_cert_rotation was declared but never
referenced by tls_private_key.auth_proxy or tls_self_signed_cert.auth_proxy.
The cert had a 1-year validity but would never rotate automatically.

Add replace_triggered_by to both resources so they regenerate every
30 days when the time_rotating resource triggers.

Co-authored-by: Ona <no-reply@ona.com>
@nandajavarma nandajavarma merged commit 2f3dccf into main May 7, 2026
1 check passed
easyCZ pushed a commit that referenced this pull request May 21, 2026
fix: wire time_rotating to auth proxy TLS cert for actual rotation (N10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants