Skip to content

Commit edd7d93

Browse files
committed
docs: invitation resends, session revocation rules and audit prune match the code
After a leaked token digest key is replaced, Resend can't rebuild an invitation's link, so the runbook says to create new ones. Dashboard session revocations need the administrator's recent confirmation, undoing an unused recovery only cancels its link, and audit prune falls back to the runtime role rather than refusing.
1 parent d89424f commit edd7d93

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

‎docs/dev/architecture/sessions.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,16 @@ private to the database crate, so no revocation can skip the event. Its callers:
155155
the account switch of a sign-in.
156156
- `AccountService`'s session operations (`src/sessions`), which sign one session
157157
or every other one out from the settings, the admin dashboard and
158-
`auth-service account <user> sessions`. They need a session but no passkey
159-
confirmation: a user who suspects a stolen cookie must be able to act at once.
158+
`auth-service account <user> sessions`. The owner needs a session but no
159+
passkey confirmation: a user who suspects a stolen cookie must be able to act
160+
at once. An administrator needs the dashboard's recent passkey confirmation,
161+
as for every change on the dashboard, and an operator at the terminal none.
160162
- `AdminService::revoke_session`, which `auth-service session revoke` runs.
161163
- Changes that end the account's other sessions: removing a passkey
162164
(`src/passkey/settings.rs`), unlinking an identity
163165
(`src/federation/identities.rs`) and reporting a history entry as not the
164-
owner's (`src/history`). Undoing a recovery (`src/recovery`) ends every session.
166+
owner's (`src/history`). Undoing a recovery (`src/recovery`) whose link was
167+
used ends every session; undoing one still unused only cancels its link.
165168
- RP-initiated logout, which also ends the inline session of the app's own
166169
passkey sign-in that its `id_token_hint` names (`src/oidc/logout.rs`).
167170
- `Session::end_all`, for an account disabled, scheduled for deletion, purged or

‎docs/dev/operations/incidents.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ For a leaked key, replace it at once instead:
231231
holder, through a channel support already trusts, whether they used it,
232232
and undo it only if they didn't.
233233
4. Revoke, with `auth-service invite revoke`, the invitations created before
234-
the new key was deployed, which `auth-service invite list` lists, and invite
235-
again: each invitation's link works until the invitation expires, 7 days by
236-
default and up to a year, and **Resend** rebuilds it under the old key, which
237-
no longer works.
234+
the new key was deployed, which `auth-service invite list` lists, and create
235+
new ones: a link already sent keeps working against its stored digest until
236+
the invitation expires, 7 days by default and up to a year. **Resend** can't
237+
rebuild such a link once the old key is removed, so its delivery fails.
238238

239239
Links already sent are checked against the digest stored when they were made,
240240
so verification and recovery links keep working until they expire, within 24

‎docs/dev/security/audit-history.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ so the pruned history stays signed, and the prune itself is recorded as an
255255

256256
Auth's own role may not delete events, so pruning connects as the schema owner:
257257
set `AUTH_DATABASE_OWNER_URL` and `AUTH_DATABASE_OWNER_PASSWORD`, as for
258-
`migrate`. Without them, `audit prune` refuses before verifying anything. In a
259-
deployed environment, only the `migrate` job gets the owner's credentials, by
258+
`migrate`. Without them, `audit prune` connects as the runtime role, which works
259+
where that role owns the schema, as in development. Where it doesn't, the chain
260+
verifies, then the delete fails on permissions. In a deployed environment, only the `migrate` job gets the owner's credentials, by
260261
design, and piqueld runs jobs only before a rollout, so pruning there is not
261262
supported yet: it needs a one-off job with those credentials. Until then, history
262263
is kept. The dashboard therefore never prunes. Its Audit tab lists the

0 commit comments

Comments
 (0)