Title: auth: NIP-98 verifier upgrades did:nostr → WebID via verificationMethod lookup (#4 Phase 2A via CID) · Issue #399 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: auth: NIP-98 verifier upgrades did:nostr → WebID via verificationMethod lookup (#4 Phase 2A via CID) · Issue #399 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: auth: NIP-98 verifier upgrades did:nostr → WebID via verificationMethod lookup (#4 Phase 2A via CID) · Issue #399 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Phase 2A of #4 ("Add did:nostr SSO and Schnorr (NIP-98) authentication"), redirected onto the CID-document substrate that #386 + #397 just landed. Problem Today's NIP-98 path (src/auth/nostr.js) authenticates a request as did:nostr: Open Graph Description: Phase 2A of #4 ("Add did:nostr SSO and Schnorr (NIP-98) authentication"), redirected onto the CID-document substrate that #386 + #397 just landed. Problem Today's NIP-98 path (src/auth/nostr.js) au...
X Description: Phase 2A of #4 ("Add did:nostr SSO and Schnorr (NIP-98) authentication"), redirected onto the CID-document substrate that #386 + #397 just landed. Problem Today's NIP-98 path (src/aut...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/399
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"auth: NIP-98 verifier upgrades did:nostr → WebID via verificationMethod lookup (#4 Phase 2A via CID)","articleBody":"**Phase 2A of #4** (\"Add did:nostr SSO and Schnorr (NIP-98) authentication\"), redirected onto the CID-document substrate that #386 + #397 just landed.\n\n## Problem\n\nToday's NIP-98 path (`src/auth/nostr.js`) authenticates a request as `did:nostr:\u003cpubkey>`. WAC then operates on that DID-shaped identity — useful for direct-did:nostr-in-ACL, but it doesn't give the user **their WebID** as the authenticated identity, so writes to their own profile fail unless ACLs explicitly grant `did:nostr:`.\n\n#4's original Phase 2A solved this with `owl:sameAs` linking in the profile + a dedicated SSO endpoint. With the verificationMethod / authentication infrastructure now in place (#386 + #397/#398), there's a smaller, more uniform alternative: **the same K→W lookup the LWS-CID verifier already does**.\n\n## Proposed change\n\nAugment `verifyNostrAuth` so that, on a successful Schnorr verification:\n\n1. Compute the resource WebID (from the request's pod / WebID URL — same logic the WAC layer already uses).\n2. Fetch that WebID's profile.\n3. Look for a `verificationMethod` whose `publicKeyMultibase` decodes to the same Nostr pubkey we just verified, **and** whose VM id is referenced by `authentication`.\n4. If found → return the WebID as the authenticated identity (instead of `did:nostr:`).\n5. If not found → return `did:nostr:\u003cpubkey>` as today (no behaviour regression).\n\nDecode of the f-form Multikey is straightforward — strip `f` prefix, strip `e701` multicodec, strip parity byte, take the remaining 32-byte x-only hex. The doctor's `B.2` (already shipped) emits exactly this shape.\n\n## Acceptance\n\n- [ ] A WebID profile that declares a Nostr Multikey VM in `authentication` accepts NIP-98 requests as **the WebID** (not `did:nostr:`)\n- [ ] WAC writes to the user's own resources (e.g. their profile) succeed under NIP-98 with no extra ACL entries\n- [ ] Profiles WITHOUT a matching VM continue to authenticate as `did:nostr:\u003cpubkey>` (no behaviour change for #4 Phase 1)\n- [ ] Profile fetch goes through the same SSRF guard / cache as the LWS-CID verifier\n- [ ] No regression in existing did:nostr ACL paths or in the existing DID-document resolver in `did-nostr.js`\n\n## Why this and not the original Phase 2A design\n\nThe original design was independent of CID: link via `owl:sameAs`, build a dedicated SSO endpoint. With CID v1 + LWS10-CID now load-bearing for keys-in-profiles, going through the same VM mechanism:\n\n- Reuses the K→W primitive across NIP-98, LWS-CID, did:key, WebAuthn (#386 Phase 4 in spirit)\n- Keeps the auth-method preference order (#306) operating on a single concept: \"look up the credential's signing key in a VM list\"\n- Means anyone who's already used doctor B.2 to add a Nostr VM gets WebID-based NIP-98 auth automatically when this lands\n\n## Out of scope\n\n- Phase 2B (Nostr-first registration with auto-pod-create) — orthogonal\n- Phase 3 (relay discovery / NIP-97) — orthogonal\n- The dedicated `/idp/nostr-login` endpoint — separate, can be layered on top later\n- The CCG f-form vs z-form Multikey debate — already settled at f-form per [w3c-ccg/community#254](https://github.com/w3c-ccg/community/issues/254#issuecomment-3148690444); this issue assumes f-form\n\n## Refs\n\n- #4 — original Phase 2 design (owl:sameAs based)\n- #386 — convergence tracker; this is part of Phase 4 (cross-protocol unification)\n- #397 / #398 — LWS-CID verifier (the VM-lookup pattern this would mirror)\n- #306 — auth-method preference order (will continue to apply)\n- #42 — did:nostr → WebID spec (the existing DID-doc resolver stays)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-09T15:11:51Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/399"}
react-profiling 0 react-import-map react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:1322af67-92e0-da31-3b25-607b93ceaf55 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id C588:14F885:C9CE57:1013B0A:6B0387F0 html-safe-nonce 10eaadc28445fcbeb8dd895edc51a93be35fef6fd2488ecce456f0d6c2430e67 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTg4OjE0Rjg4NTpDOUNFNTc6MTAxM0IwQTo2QjAzODdGMCIsInZpc2l0b3JfaWQiOiI3NDgzODM5MDYwMzI3NDk5NzYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac 4ed5b824abeaecef351d6ec78bb4f47f25b25a40b4bcd74ee2652c10cdb2a619 hovercard-subject-tag issue:4412903092 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/399/issue_layout twitter:image https://opengraph.githubassets.com/05d589739a2c4fc83d3de7cb0aa169283a0ab1560ae3773fc2258ecffd5eb146/JavaScriptSolidServer/JavaScriptSolidServer/issues/399 twitter:card summary_large_image og:image https://opengraph.githubassets.com/05d589739a2c4fc83d3de7cb0aa169283a0ab1560ae3773fc2258ecffd5eb146/JavaScriptSolidServer/JavaScriptSolidServer/issues/399 og:image:alt Phase 2A of #4 ("Add did:nostr SSO and Schnorr (NIP-98) authentication"), redirected onto the CID-document substrate that #386 + #397 just landed. Problem Today's NIP-98 path (src/auth/nostr.js) au... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username melvincarvalho hostname github.com expected-hostname github.com None 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 turbo-cache-control no-preview go-import github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git octolytics-dimension-user_id 205442424 octolytics-dimension-user_login JavaScriptSolidServer octolytics-dimension-repository_id 958025407 octolytics-dimension-repository_nwo JavaScriptSolidServer/JavaScriptSolidServer octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 958025407 octolytics-dimension-repository_network_root_nwo JavaScriptSolidServer/JavaScriptSolidServer turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 423dbb54c5e7bfecc838eb387c1435eb3d0e760d ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
Response headers:
Server github.com Content-Type text/html; charset=utf-8 Cache-Control max-age=0, private, must-revalidate
URLs of crawlers that visited me.