Repository navigation
Mount @dwk/solid-oidc and let /pod trust its tokens - #89
Conversation
dwk.io now runs its own Solid-OIDC provider: discovery at /.well-known/openid-configuration, authorize/token/jwks under /oidc, consent through the existing Access-guarded /auth/login (a third signed flow). The WebID names https://dwk.io as its solid:oidcIssuer, and /pod accepts the provider's DPoP-bound tokens alongside the OWNER_TOKEN bearer. New secret: OIDC_SIGNING_KEY (P-256 private JWK). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVMgqnS8W4euNdsZn3m7ck
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://claude-bold-babbage-oxg7t5-dwk.8k9dgysp29.workers.dev (commit db2337f)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
Review of #89. I found nothing blocking in the diff, but the Looks good
Things to check
I haven't run the tests locally. Please confirm CI is green and the build failure is understood. Generated by Claude Code |
|
Workers Builds: dwk failed on 678844c, and I can't see why. The check posts no log output, and the full log is only in the Cloudflare dashboard, which I can't open. Some things point to the build never starting:
Two caveats: the preview build may run on a different npm version than mine, and I can't re-run this check from here. Could you open the log, or press Retry build there? I'll fix anything it shows that comes from this PR. Generated by Claude Code |
It is a top-level navigation, not a cross-origin fetch; discovery, JWKS, and the token endpoint keep it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVMgqnS8W4euNdsZn3m7ck
|
Replies to the review:
Generated by Claude Code |
|
I found the cause of the Workers Builds: dwk failure from the build log: It isn't caused by this PR, which adds no Durable Objects. Each Preview gets its own copy of the 5 Durable Object namespaces in the To fix it, free namespaces by deleting stale previews with Generated by Claude Code |
Each Preview carries its own copy of the Worker's five Durable Object namespaces; the free plan's 100-namespace account limit made new Previews fail to deploy (code 10067). Workers Builds never deletes them, so a pull_request closed workflow does, by branch name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVMgqnS8W4euNdsZn3m7ck
dwk.io now runs its own Solid-OIDC provider (
@dwk/solid-oidc1.0.0-beta.2). It is the only catalog endpoint that wasn't deployed anywhere live./.well-known/openid-configuration, and authorize, token and jwks live under/oidc. The issuer ishttps://dwk.io. Discovery, the JWKS and the token endpoint allow cross-origin requests, with a preflight on the token endpoint, so browser Solid apps can call them. The authorize endpoint is a browser navigation, so it doesn't need CORS./auth/loginas a third signedflow(solid-oidc), and the page names the WebID. The package doesn't check theredirect_uriagainst the client-ID document yet, so the consent page, which shows the client and its redirect, is the only check./profile/cardnow namessolid:oidcIssuer <https://dwk.io>./podaccepts DPoP-bound tokens from the provider as well as theOWNER_TOKENbearer. It needs two handlers over the same pod, because a packageauthenticatehook replaces the built-in verifier entirely. The pod fetches the JWKS throughsiteFetch, so the request stays in-process and avoids the 522 a Worker gets when fetching its own domain.OIDC_SIGNING_KEY, a P-256 private JWK. CLAUDE.md has the one-liner to generate it. Until it's set, the mount answers 503 and the rest of the site keeps serving..github/workflows/preview-cleanup.ymldeletes a PR's Worker Preview when the PR is merged or closed. Workers Builds never deletes Previews, and each one holds five Durable Object namespaces. The free plan allows 100 per account, which is why this PR's own preview failed to deploy (code: 10067). The workflow needs a repository secretCLOUDFLARE_API_TOKENwith Workers Scripts: Edit. CLAUDE.md documents the limit.After merging:
wrangler secret put OIDC_SIGNING_KEY. No new bindings are needed, and the code table is created lazily inAUTH_DB.CLOUDFLARE_API_TOKENrepository secret.Tests:
test/solid-oidc.test.tscovers discovery, CORS (including none on authorize), a JWKS that publishes only the public key, the redirect to the owner sign-in, the WebID issuer, and the 503 when unconfigured. It also checks that the pod accepts a write with an OP-minted DPoP token and refuses a token signed with any other key.npm run checkreports no errors, and all 79 tests innpm testpass. The cleanup workflow is checked for valid YAML and shell syntax only. It first runs when this PR closes.🤖 Generated with Claude Code
https://claude.ai/code/session_01SVMgqnS8W4euNdsZn3m7ck