Skip to content

Add authenticated Cloudflare provisioning API core - #1999

Merged
chubes4 merged 1 commit into
mainfrom
feat/1971-authenticated-provisioning-api
Jul 23, 2026
Merged

Add authenticated Cloudflare provisioning API core#1999
chubes4 merged 1 commit into
mainfrom
feat/1971-authenticated-provisioning-api

Conversation

@chubes4

@chubes4 chubes4 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a D1-only /v1 control API for configured-site allocation, site status, imports, and durable operation status
  • authenticate digest-configured bearer principals with explicit scopes, expiry, site grants, and per-principal quotas
  • validate neutral staged artifacts before allocation, then reserve the shared site identity transactionally so existing/operator sites cannot be taken over
  • recover interrupted artifact copies, operation creation, and API ownership links through scheduled execution
  • fail closed for cross-principal, restricted-site, and unlinked operation reads while preserving legacy operator and Durable Object behavior

Split scope

This is the API-core portion of #1971. Administrator claim issuance/redemption is intentionally excluded and will follow in a second PR after this control-plane boundary merges. This PR does not close #1971.

Verification

  • npm run test:cloudflare-runtime (15 focused provisioning tests plus existing runtime suites)
  • npm run test:cloudflare-wordpress-auth
  • npm run cloudflare:dry-run
  • npm run cloudflare:dry-run:d1
  • git diff --check origin/main...HEAD

Part of #1971

AI assistance

OpenAI gpt-5.6-sol was used through OpenCode to inspect the existing Cloudflare architecture, draft the implementation and tests, and perform adversarial reviews of allocation, recovery, R2, and authorization races. Chris Huber reviewed the resulting behavior, verification evidence, and commit.

@chubes4
chubes4 merged commit 96f2c00 into main Jul 23, 2026
4 checks passed
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.

Expose an authenticated idempotent Cloudflare site provisioning API

1 participant