Repository navigation
Description
Goal
After this phase client builders have a public page for NEMAR sign-in, the owner has a gated runbook, a real relying-party library has completed the whole flow against the real routes in an automated test, and the OpenID Foundation conformance suite has been run locally against the provider with its results recorded.
Failures it finds are fixed here or in the owning phase.
Routing
- Readiness: expand (a planner writes the phase plan as an issue comment; it must settle how the conformance suite runs on this machine, which relying-party library is used, and how a real app session reaches the local website)
- Implementer: Sonnet
- Opus checkpoint: review before merge (the conformance results and any fix to B3 or B4 behaviour they force)
- Depends on: Phase B5: OIDC revocation cascades and back-channel logout #2019 ; Unblocks: the epic to
devpull request - Repository and base branch: nemarOrg/nemar-cli (epic branch) for the test and fixes; nemarOrg/docs (base
main) for the two pages
Scope
In: the public page, the gated runbook, the end-to-end test, the conformance runs, fixes that they force.
Out: registering any real client; production secrets; the compute routes.
Design references
Design sections 3 and 11; ADR 0119; the docs repository AGENTS.md (public versus gated, pagefind: false); OpenID Connect Core, Discovery, Back-Channel Logout.
Changes
- Docs repo,
src/content/docs/platform/sign-in-with-nemar.md(public; sidebar entry inastro.config.mjs): discovery address, endpoints, flows (code plus PKCE S256 only,client_secret_basic, client credentials for machine scopes), scope and claim tables,suband whatorcid_verifiedmeans, token lifetimes, refresh rotation and the 30 second retry, back-channel logout and what a verifier checks, error codes, and how to request a client (name, exact redirect addresses, scopes, logout address, contact). It cites no ADR or.contextand names no internal host. - Docs repo,
src/content/docs/admin/operations/oidc-clients.md(gated, top-levelpagefind: false):OIDC_SECRETand its dev twin, key bootstrap and rotation (24 hour rule), registering and disabling a client, secret rotation with grace, the cookie flag order from Phase B1: ADR 0119, partner hosts, __Host- cookie and OIDC subject #2015, the partner host list, the manual merge step (nemar admin oidc end-account), failed logout deliveries, and the checklist before the first production client. Regenerate the command reference withbun run gen:commandsafter Phase B2: OIDC client registry, signing keys and discovery #2016 and Phase B5: OIDC revocation cascades and back-channel logout #2019 are ondev. - nemar-cli
test/oidc-e2e.test.ts: a real relying-party library pinned to an exact version at least two weeks old (proposal:openid-clientv6, built onoauth4webapi; the plan confirms it runs under Bun and uses itsallowInsecureRequestsoption for the localhttpissuer) againstBun.serveoverfreshDbwithAPI_BASE_URLset to the server's own URL. Steps: create the client through the real admin route; seed a person with an ORCIDoauth_identitiesrow and a session fromissueSession; drivePOST /auth/oidc/authorizeand/consentas the website page would; redeem with PKCE; verify the ID token against discovery and JWKS; refresh; call userinfo; require the refusal onGET /users/me; revoke the account through the real admin route and require inactive introspection,invalid_granton refresh, and a back-channel logout request, on aBun.servestand-in, that the library's verifier accepts. - Conformance: run the suite's basic OP and config OP plans (
oidcc-basic-certification-test-plan,oidcc-config-certification-test-plan) against a local backend. The plan must settle the runtime (no container runtime, Maven, MongoDB or Java 17 is installed on the owner's machine today, so an owner-approved user-local install or a different host is required), HTTPS for the issuer if the suite insists, and how the suite's scripted browser signs in through the local website (the dev worker echoes sign-in codes in the response for thenemar.testfixture domain). Record each test's result in the PR as a table; the basic profile must pass, and every warning is explained or fixed. - Expected suite findings to check first: the authorize page must accept POST, unknown scopes (
address,phone) are ignored,id_token_hintis honoured, a replayed code revokes its tokens. Fix in the owning code with its own test.
Tests (write these first)
- The end-to-end test above, red until each step works. Mutation: break the
/users/merefusal and the test fails. - The test fails if the logout token is delivered unsigned or to the wrong
aud. - Every endpoint, scope and error code on the public page exists in
shared/oidc.ts(a nemar-cli test that reads the checked-out page when present, as the copy drift tests do). - The docs site builds with
bun run build(admin gating and link checks).
Acceptance criteria
- The end-to-end test passes against the real routes with an unmodified third-party relying-party library.
- Conformance basic profile passes; config profile results are recorded and explained.
- Both pages build; the public one has no internal references.
- The epic definition of done is met on a local backend plus the local website.
Gates
nemar-cli: bun run typecheck, bun run lint, bun test test/oidc-e2e.test.ts, full bun test. Docs: bun run build, bun test. Website (if touched by a fix): bun run lint, bun run typecheck, bun run test.
Rules that bite here
- No mocks of NEMAR logic; stand-ins only for the relying party's own endpoints.
- Public pages carry nothing from ADRs,
.contextor private repositories. - The docs site deploys on every push to
main: hold the docs PR until the API release is in production. - No dependency may be added unpinned or younger than two weeks.
Escalate to the owner if
- No container runtime or Java 17 can be set up locally without an install the owner has not approved.
- The conformance suite cannot reach a local issuer without a public hostname, tunnel or TLS certificate.
- A conformance failure needs a change to the design (token lifetimes, grace, response modes).
When merged
Mark design sections 3 and 11 implemented with the conformance result, link the runbook from admin/operations/systems-inventory, and open the epic to dev pull request with the results table.
Activity
neuromechanist commentedon Nov 5, 2026
Owner decisions on the B6 decision page, recorded here so the issue matches the plan.
Next: the fix round on the nemar-cli and documentation pull requests, a delta review, and the merge of the nemar-cli pull request into the epic. Then the runner rig and the configuration smoke run (S4), the Basic plan run (S5), the website change (S6), the run against the real page (S7), and the final cleanup (S8).
neuromechanist commentedon Nov 26, 2026
Done: the end-to-end test with openid-client (#2048), the conformance rig and run (#2049, results recorded there; the deliberate PKCE, client_secret_post and ES256 refusals per the owner's decisions of 2026-11-05), the public page and gated runbook (nemarOrg/docs#101, #104). Released with the epic in 0.10.33 (2026-11-11).