Sign in with Ward, and the requests that follow

Sign in with Ward, and the requests that follow A sequence diagram generated by Archify. press Sign in with Ward 302 → /ward-api/oidc/auth (PKCE) authorize → login step /refresh/oidc/:uid no live Ward session → /login?oidc= Continue to Atrium POST /login — identifier + password scrypt verify · write refresh family Set-Cookie under /ward-api: access · refresh login step done → app callback ?code= GET /auth/ward/callback?code= POST /oidc/token + client assertion ID token: sub · ward_role · ward_sid the app's own session cookie GET /atrium — the app's cookie POST /session-status (≤ every 30 s) family live? account active? grant held? { active, role } — cached 30 s 200 — the page Sign in with Ward The app's own session Every request after Person · one browser · Sequence participant Person one browser Consuming app · e.g. atrium, own sessions · Sequence participant Consuming app e.g. atrium, own sessions Ward UI · ward.<domain>/login · Sequence participant Ward UI ward.<domain>/login Ward API · /ward-api, OIDC provider · Sequence participant Ward API /ward-api, OIDC provider SQLite · accounts, sessions, grants · Sequence participant SQLite accounts, sessions, grants Legend request return security default message

Why a code flow

  • • Each app keeps its own accounts; Ward is a second way in
  • • Ward redirects only to an app's registered redirect URIs
  • • Apps prove who they are with a client assertion; Ward holds no app secret

Ward's cookies stay at Ward

  • • Access: 15-minute EdDSA JWT at /ward-api, for Ward's own pages
  • • Refresh: opaque 30-day row, rotated on use, at /ward-api/refresh
  • • The refresh family is the Ward session an app knows as ward_sid

The 30-second window

  • • Apps cache the /session-status answer for 30 seconds
  • • So a sign-out or revoke at Ward ends app sessions within 30 s
  • • Ward unreachable fails closed: the person uses the app's local password