Skip to content

Fail monitoring deploys before the origin-pull certificate expires - #45

Open
TakGN wants to merge 2 commits into
mainfrom
monitoring-origin-pull-preflight
Open

TakGN wants to merge 2 commits into
mainfrom
monitoring-origin-pull-preflight

Conversation

@TakGN

@TakGN TakGN commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Part of the AOP rollout with ipni/terraform-deployments#58 and ipni/infra#278.

Why

ipni/terraform-deployments#58 uploads certs/origin-pull-client.crt as the ipni.io zone's zone-level Authenticated Origin Pulls certificate. Traefik on lith-1 will then require it for monitoring.ipni.io and argocd.ipni.io, so other Cloudflare accounts can't proxy their own hostnames to lith-1:8443. That makes this certificate's expiry (2029-09-14) a monitoring outage too, not just a route-origin one.

Change

  • roles/monitoring/tasks/hub.yml: fail the deploy if the client certificate expires within route_origin_cert_min_days (30), the same check route_origin has (platform.yml already loads its defaults). The comment on the Cloudflare allowlist now says it narrows who can connect, while the certificate authenticates. The ufw rules themselves are unchanged.
  • README.md, "Deferred: Authenticated Origin Pulls": zone-level AOP is on for ipni.io via Terraform and Traefik requires it; Envoy enforcement stays deferred. New rule: no certificate from this CA goes to another zone, because Traefik trusts the CA. So delegated-ipfs.dev needs a client certificate from a second CA, with Envoy trusting both. This changes the earlier plan to give it the same certificate; the TODO is updated to match.

Order and after merging

Safe to merge any time; nothing changes on a box. Afterwards run ansible-playbook platform.yml --check --diff; the new preflight task must pass.

Not checked locally: yamllint and ansible-lint (not installed here; CI runs them).

🤖 Generated with Claude Code

ipni.io now presents certs/origin-pull-client.crt as its zone-level
Authenticated Origin Pulls certificate, and Traefik on lith-1 will require it
for Grafana and Argo CD. Check its expiry in roles/monitoring as route_origin
does, and update the README: AOP is on for ipni.io, and no certificate from
this CA may go to another zone, delegated-ipfs.dev included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 18, 2026

Copy link
Copy Markdown

Claude review

The change is small and consistent with the existing route_origin expiry check. The new task in roles/monitoring/tasks/hub.yml uses the same openssl x509 -checkend form, delegate_to: localhost, run_once, and check_mode: false, so it also runs in the CI dry run. route_origin_pull_client_cert_file and route_origin_cert_min_days are both defined in roles/route_origin/defaults/main.yml, which platform.yml loads through vars_files. The task sits in hub.yml, which is included only for argocd_hub, so a run limited with -l to other boxes skips it. The README edits match the code. I did not run the playbooks or the linters, and I could not run openssl against certs/origin-pull-client.crt in this sandbox, so the 2029-09-14 expiry in the PR description is unchecked.

No issues found.

claude-sonnet-5-5 at high effort · requested by TakGN · re-run with @claude review [sonnet|opus|fable] [low|medium|high|xhigh|max]

ipni.io moved to IPFS Public Utilities and ipni/terraform-deployments#63
retires cloudflare/ipni.io/; the zone-level AOP certificate is now in
cloudflare/ipni.io-public-utilities/aop.tf (ipni/terraform-deployments#58).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant