Skip to content

Guard deploys against an expired or revoked Coolify API token - #538

Merged
alexeygrigorev merged 3 commits into
mainfrom
fix/coolify-token-guard
Nov 20, 2026
Merged

alexeygrigorev merged 3 commits into
mainfrom
fix/coolify-token-guard

Conversation

@alexeygrigorev

Copy link
Copy Markdown
Member

Run 44830025858 failed at "Point staging at the pushed release" with a Coolify 401. Cause: the only Coolify API token (agent-setup-2026-10-22) was minted with a 30-day expiry and expired at 2026-11-20 22:12:50 UTC. Nothing revoked it.

Already done outside this PR: new per-consumer scoped tokens for website and CMP (1-year expiry), stored in the coolify-staging GitHub env secrets and DataOps (coolify.gha-website-deploy, coolify.gha-cmp-deploy). Also set the env variable COOLIFY_TOKEN_EXPIRES_AT=2027-11-20.

This PR:

  • deploy/coolify_token.py: checks that the token authenticates, plus an optional expiry-window check.
  • deploy-coolify.yml: runs the check before the first Coolify call, so a dead token fails with its cause and the runbook path.
  • coolify-token-check.yml: daily check that fails on a rejected token or an expiry within 30 days.
  • _docs/runbooks/coolify-api-token.md: token inventory, the incident, and how to rotate.
  • Tests in ci/tests/test_coolify_token_guard.py.

Hub intake cfedb168.

hub-0699f3be added 3 commits November 21, 2026 00:25
The shared Coolify token expired on 2026-11-20 22:12 UTC (30-day expiry)
and run 44830025858 died mid-deploy with a bare curl 401. The deploy now
checks the token first and names the cause; a daily workflow fails when
Coolify rejects the token or its recorded expiry is within 30 days. The
rotation runbook documents the per-consumer scoped tokens.
@alexeygrigorev
alexeygrigorev merged commit f860070 into main Nov 20, 2026
1 check passed
@alexeygrigorev
alexeygrigorev deleted the fix/coolify-token-guard branch November 20, 2026 23:53
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