fix(cloudflare): remove OpenCode Access gate - #25
Merged
Conversation
OpenTofu Plan |
xnoto
added a commit
that referenced
this pull request
Aug 26, 2026
Add the mcp.makeitwork.cloud CNAME for the cluster-apps tunnel and a dedicated Access service token plus self_hosted application for the ToolHive MCP gateway (non_identity machine access for headless agent clients, admins group for interactive debug). Service-token client credentials are exposed as outputs (secret marked sensitive). opencode.makeitwork.cloud stays on server-password auth per #25: an Access gate breaks opencode attach. Revisit with an attach-compatible design before re-gating it.
xnoto
added a commit
that referenced
this pull request
Aug 26, 2026
## Summary Edge authentication for the new cluster MCP gateway (paired with makeitworkcloud/kustomize-cluster#62). - **`cf-tunnels.tf`** — adds `mcp` to the cluster-apps CNAME list. **This must be applied before the TunnelBinding lands in kustomize-cluster** (documented DNS race, error `81053`); the TunnelBinding PR follows this apply. - **`cf-access-mcp.tf`** — dedicated `mcp-gateway` Access service token (`duration = "forever"`, rotate via `client_secret_version`) + `self_hosted` application on `mcp.makeitwork.cloud`: `non_identity` service-token policy for headless agent clients (opencode, Claude Code, etc. send `CF-Access-Client-*` headers) and an admins GitHub-SSO policy for interactive debug. - **`outputs.tf`** — exposes the service-token `client_id` and `client_secret` (sensitive) so agent clients can be configured after apply. **Scope change during review:** the `cf-access-opencode.tf` gate was dropped — #25 deliberately removed the opencode Access gate because it breaks `opencode attach`; opencode web stays on the SOPS-managed server password. Re-gating needs an attach-compatible design first. ## Validation - `tofu fmt` ✅, `tofu init -backend=false` + `tofu validate` ✅ - `make test` ✅ (canonical pre-commit: validate, tflint, checkov, fmt, terraform-docs README regenerated) ## Not run - `tofu plan` / `tofu apply` — CI posts the plan here and applies on merge per the shared workflow. ## Post-apply 1. `tofu output mcp_gateway_service_token_client_id` / `tofu output -raw mcp_gateway_service_token_client_secret` → local agent sessions as `CF_ACCESS_CLIENT_ID` / `CF_ACCESS_CLIENT_SECRET` (keyring/env only). 2. Then the follow-up TunnelBinding PR in kustomize-cluster is safe to merge.
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
opencode attachfrom reaching the OpenCode serverValidation
make test