chore: Replace temporary Fastly API token with automation token#51
Open
dcadenas wants to merge 4 commits into
Open
chore: Replace temporary Fastly API token with automation token#51dcadenas wants to merge 4 commits into
dcadenas wants to merge 4 commits into
Conversation
… Added a docs coverage test to keep the required token settings, wrangler secret command, backfill check, cron caveat, and divine-name-sync follow-up documented.
Contributor
Author
|
@rabble could you run this rotation? I can’t create the Fastly automation token because I’m not a Fastly superuser. The runbook in this PR has the required steps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Fastly sync path already uses a Worker secret, but the safe rotation process was not written down in the repo.
This change adds a runbook for replacing a personal Fastly token with an automation token and checking that D1-to-Fastly KV sync still works.
It matters because the real token must be created by an operator and stored as a Cloudflare secret, not committed in code.
Motivation
The root problem is operational, not a runtime token-handling bug.
The Worker already reads
FASTLY_API_TOKEN; the missing part was a repeatable process for creating, installing, and verifying the automation token.Related Issue
Validation
The docs-specific test passes, and the admin UI builds.
The full root test suite is still blocked by an existing
origin/mainfailure insrc/routes/admin-sync.test.ts, unrelated to this docs-only diff.npm run test:oncenpm run build:adminManual Test Plan / Notes
After a Fastly superuser creates the automation token, run
npx wrangler secret put FASTLY_API_TOKEN.Then call
POST /api/admin/sync/fastlyand confirm the response reportsfailedas0.git rebase origin/mainnpm run test:once -- src/docs/runbooks.test.tsnpm run build:adminnpm run test:oncefailed onGET /admin/username/:name/nip05-status > returns not_applicable for non-active usernames; expectednot_applicable, receivedmissing.Visuals / API Examples
Public Artifact Review