Skip to main content

Ward

Ward is the estate's identity service. It replaces six separately-designed auth stacks with one identity, one credential store, and one set of access grants — a Fastify + SQLite service at /ward-api, and the one login page in the estate at /ward.

Runs at
/ward (UI) and /ward-api (API) on the production site, one origin, no subdomains
Owns
Credentials, account identity, and (subject, app, roles) grants
Does not own
Anything an app stores about a person — apps keep their own rows, keyed on an opaque subject
Consumed by
atrium · public-resource-map · newspapper · sports-app
Signs with
One Ed25519 key, held by Ward alone; apps get the public half over JWKS to verify ID tokens

The shape in a paragraph​

Every app keeps its own accounts and its own login page. "Sign in with Ward" is a second button on that page: an OpenID Connect code flow with PKCE, against Ward as the provider. Ward checks the password once, keeps the session as a 30-day rotating refresh family, and hands the app an ID token naming the person's opaque subject, their role in that app, and the Ward session (ward_sid). The app makes its own session from that. While it lasts, the app asks Ward at most every 30 seconds whether the Ward session is still live (POST /session-status), so a Ward sign-out or a console revoke ends it everywhere within 30 seconds. Ward's own cookies stay under /ward-api and are never sent to an app.

Follow the emphasised path: browser → Caddy → Ward API → SQLite. The inner boundary is the loopback bind — Ward is not reachable except through Caddy — open full screen, where search, tracing and the guided views are usable.

Where to go next​

If you want toRead
Understand the whole systemArchitecture
Know why sub-paths shape every decisionThe one-origin estate
Follow a sign-in end to endSessions and tokens
Know how revocation actually takes effectSign in with Ward
Understand who may do whatGrants
Wire a new app up to WardSign in with Ward (OIDC), then the shared library's adoption guide (shared-library/README.md in the repo)
Look up an endpointHTTP API
Look up a tableData model

What this site is made of​

Two sources, kept apart on purpose, because they go stale in different ways.

  • Authored — the pages above. Written by hand against the code, and the place where architecture, the HTTP surface and the schema are described. The corpus has long recorded that it had no architecture.md, api.md or data.md; these are those pages.
  • Rendered from the corpus — everything under Deep dive and Status. Those are generated on every build from corpus/, which is the project's own decision record. They carry a banner saying so. Edit the corpus, not the copy. The diagrams are compiled by archify from typed JSON in docs/diagrams/ and validated before they ship.
In production

Ward has been deployed at /ward on the production site since 2026-10-04, and atrium, newspapper, public-resource-map and sports-app sign in through it. They moved to "Sign in with Ward" on 2026-10-13, and the old shared-cookie contract (/introspect, app keys, the access cookie at Path=/) was retired the same day. imbatranimOS was a fifth consumer until 2026-10-07, when it began signing people in itself. Local tests still cannot show the cookie paths, because handle_path strips a prefix that nothing local strips; the deployed Ward is where they run for real. See Status.