Skip to content

fix(workers): point WORKOS_ISSUER at accounts.mukoko.com (identity.nyuchi.com has no DNS) - #62

Merged
bryanfawcett merged 1 commit into
mainfrom
claude/authkit-issuer-fix
Aug 12, 2026
Merged

fix(workers): point WORKOS_ISSUER at accounts.mukoko.com (identity.nyuchi.com has no DNS)#62
bryanfawcett merged 1 commit into
mainfrom
claude/authkit-issuer-fix

Conversation

@bryanfawcett

Copy link
Copy Markdown
Contributor

The bug

Two deployed worker configs pointed their WorkOS OAuth issuer at a hostname that does not exist:

  • site/wrangler.tomlWORKOS_ISSUER = "https://identity.nyuchi.com"
  • nyuchi-docs-mcp-worker/wrangler.toml → same

Reproduction:

$ getent hosts identity.nyuchi.com          → (no output, exit 2 — NO DNS RECORD)
$ curl -o /dev/null -w '%{http_code}' https://identity.nyuchi.com/.well-known/openid-configuration
000
$ curl -s https://accounts.mukoko.com/.well-known/openid-configuration
{"issuer":"https://accounts.mukoko.com","authorization_endpoint":"https://accounts.mukoko.com/oauth2/authorize", ...}
$ curl -o /dev/null -w '%{http_code}' https://accounts.mukoko.com/oauth2/jwks
200
$ curl -o /dev/null -w '%{http_code}' https://auth.mukoko.com/.well-known/openid-configuration
404      # the auth API is NOT an issuer

Impact today: site/src/worker/gate.ts builds ${WORKOS_ISSUER}/oauth2/authorize, /oauth2/token and /oauth2/jwks from this var, so every page whose frontmatter says visibility: internal was gated behind a login against a host with no DNS — internal docs pages could not be signed into at all. The docs MCP worker's bearer-token verification (src/auth.ts) was broken the same way.

The AuthKit domain moved to accounts.mukoko.com in the Aug 2026 migration. Verified via the WorkOS admin API that there is exactly one WorkOS project (Mukoko Account), whose Production environment is the one accounts.mukoko.com serves — and site/wrangler.toml's client_01KVTX0V2K1VM3PSC0DJ9VZWTV is a live Connect app in it. Same environment, same app, working issuer.

Changes

File What
site/wrangler.toml Value → accounts.mukoko.com, plus a "what this host is / is NOT / do not restore" comment
nyuchi-docs-mcp-worker/wrangler.toml Same
site/src/content/docs/identity/overview.mdx Presented the dead host as the identity host — corrected, and now carries the four-host table (AuthKit issuer vs WorkOS auth API vs the two gateways) with a danger callout on the dead-end failure mode
site/src/content/docs/index.mdx Identity card description
site/src/content/docs/deployment/agentgateway.mdx WORKOS_ISSUER secret table row
README.md identity/ section blurb

No variable was renamed — only values and prose.

shamwari-docs-ai/tests/worker.test.ts deliberately untouched. Its three mentions are fixture strings standing in for AI-returned prose, asserted verbatim to prove SSE pass-through. Editing them would be pure grep-satisfaction and would risk breaking a passing test.

Gates

All from the repo root, all passing:

  • pnpm install — lockfile up to date
  • pnpm build — 58 pages built, complete
  • pnpm -r --if-present run test — 5 + 9 + 9 + 12 = 35 tests passed, 0 failed
  • pnpm skills:validate✓ skills valid
  • npx wrangler deploy --dry-run in both touched packages — configs parse, both now show env.WORKOS_ISSUER ("https://accounts.mukoko.com"). Not deployed.

Not touched (flagged for a follow-up)

  • site/src/content/docs/deployment/agentgateway.mdx says the Connect app was created in the "Nyuchi Identity" WorkOS project. No such project exists — the admin API reports only Mukoko Account. Stale prose, but renaming a project reference is a separate factual claim; left for owner confirmation.
  • site/src/content/docs/api/overview.mdx + api/security.mdx list api.mukoko.com as a "Legacy host" / "Legacy production host" for the gateway. It has no DNS record and per the ecosystem docs is a separate gateway still being built, not a legacy alias of api.nyuchi.com. Out of scope here, but it is wrong in the same family of way.

Generated by Claude Code

…d identity.nyuchi.com

Both deployed worker configs named an AuthKit issuer with no DNS record:
identity.nyuchi.com resolves to nothing (getent: no output; the discovery
fetch returns 000), so the site gate worker could not complete a WorkOS
OIDC login at all — every `visibility: internal` page was unsignable-into —
and the docs MCP worker could not verify a caller's bearer token.

The AuthKit domain moved to accounts.mukoko.com in the Aug 2026 migration;
its /.well-known/openid-configuration self-identifies as that issuer and
/oauth2/jwks answers 200. The site's client id
(client_01KVTX0V2K1VM3PSC0DJ9VZWTV) is a live Connect app in the same
WorkOS project+environment that AuthKit domain serves, so the host swap is
a correction, not a migration.

Also corrects the reader-facing docs that presented the dead host as the
canonical identity host, and adds the four-host table (AuthKit issuer vs
WorkOS auth API vs the two gateways) to the identity overview, plus a
"do not restore" note at each WORKOS_ISSUER line — pointing an issuer
variable at auth.mukoko.com yields metadata that validates but dead-ends
at discovery.

Test fixtures in shamwari-docs-ai are left alone: they are opaque
stand-ins for AI-returned prose, asserted verbatim, not configuration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFaeL83iEL5gqQXhHweH6u
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
nyuchi-docs-mcp d06153c Commit Preview URL

Branch Preview URL
Aug 12 2026, 11:17 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
shamwari-docs-ai d06153c Commit Preview URL

Branch Preview URL
Aug 12 2026, 11:17 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
nyuchi-docs d06153c Commit Preview URL

Branch Preview URL
Aug 12 2026, 11:18 AM

@bryanfawcett
bryanfawcett marked this pull request as ready for review August 12, 2026 11:19
@bryanfawcett
bryanfawcett merged commit c7d6064 into main Aug 12, 2026
11 checks passed
bryanfawcett added a commit that referenced this pull request Aug 12, 2026
…ame the real WorkOS project (#63)

Two factual errors #62 deliberately left for a separate PR, because they are
different claims about different things.

1. `api.mukoko.com` was documented as a "Legacy host" (api/overview) and
   "Legacy production host" (api/security). It is neither. `getent hosts
   api.mukoko.com` returns nothing and `GET https://api.mukoko.com/health`
   returns 000 (connection failure, not a redirect); `https://api.nyuchi.com/health`
   returns 200 `{"status":"healthy",...,"version":"4.1.0"}`. Per the ecosystem
   architecture, api.nyuchi.com is the gateway serving traffic today (FastAPI on
   Fly, nyuchi/api-gateway) and api.mukoko.com is a SEPARATE Mukoko gateway still
   being built. "Legacy" tells a reader the opposite of what is true: that it used
   to work, rather than that it does not work yet.

   Both rows are corrected rather than deleted — the name is real (it is in the
   gateway's own `DEFAULT_TRUSTED_HOSTS` in gateway/lib/security.py, allow-listed
   ahead of the host existing), so a reader who has heard it needs somewhere to
   find out what it is. Each page carries a "do not reword this back" note so the
   not-legacy/not-yet-built distinction survives a future editing pass.

2. deployment/agentgateway named a "Nyuchi Identity" WorkOS project. No such
   project exists: the account (team "Mukoko Account") has exactly ONE project,
   `Mukoko Account` (project_01KQBBSK9062YGVJB6JWW3BMN8), with two environments —
   `Staging` (sandbox) and `Production`. The Connect app's environment (Production)
   was already right; only the project name was wrong.

Swept every mention of the other three hosts plus nyuchi.dev and found no
further errors: the four-host table #62 added is confirmed live
(accounts.mukoko.com/.well-known/openid-configuration self-identifies as that
issuer; auth.mukoko.com/.well-known/oauth-authorization-server 404s, which is
exactly the dead-end #62 warns about), every api.nyuchi.com curl example is on
the host that answers, and the one nyuchi.dev URL (tester.fundi.nyuchi.dev) is an
explicitly internal-only agent, not a consumer surface. The Kweli MCP is
documented at kweli.mukoko.com/mcp, which answers 200.


Claude-Session: https://claude.ai/code/session_01HFaeL83iEL5gqQXhHweH6u

Co-authored-by: Bryan Fawcett <noreply@anthropic.com>
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.

2 participants