@@ -271,14 +271,16 @@ just auth account alice picture remove --reason "Impersonates someone"
271271- Accounts are named by handle, ID or a verified email of an active account.
272272- ` --output json ` prints the views the dashboard shows for ` user search `
273273 (` UserPage ` ), ` user show ` (` UserDetail ` ), ` audit list ` (` EventPage ` ), `client
274- list` , ` invite list` and ` admin list` , as defined in ` piquel_common::admin`.
274+ list` , ` invite list` , ` admin list` , ` announcement list` and ` announcement show`
275+ (` AnnouncementDetail ` ), as defined in ` piquel_common::admin ` .
275276 ` audit verify --output json ` prints the verification.
276277- ` audit verify ` and ` audit prune ` are described in
277278 [ audit-history.md] ( docs/security/audit-history.md ) . ` audit prune ` connects as
278279 the schema owner when ` AUTH_DATABASE_OWNER_URL ` is set, since auth's own role
279280 may not delete events.
280281- ` user disable|delete ` , ` user recover ` , ` user undo-recovery ` , ` session revoke-all ` ,
281- ` admin revoke ` , ` client disable|suspend|delete ` , ` audit prune ` , and `account …
282+ ` admin revoke ` , ` client disable|suspend|delete ` , ` audit prune ` , `announcement
283+ send` , and ` account …
282284 passkeys revoke` , ` identities unlink` and
283285 ` sessions revoke-all ` describe what they will change and ask for confirmation.
284286 Without a terminal they refuse unless given ` --yes ` .
@@ -323,8 +325,9 @@ just auth account alice picture remove --reason "Impersonates someone"
323325- Failures print their causes and exit with 1; usage errors exit with 2.
324326
325327Administrators manage accounts, their settings and security history, sessions,
326- invitations, other administrators, handles, the delivery queue, signing keys and
327- the origins approved for clients' pages to sign users in from the admin dashboard,
328+ invitations, other administrators, handles, announcements, the delivery queue,
329+ signing keys and the origins approved for clients' pages to sign users in from
330+ the admin dashboard,
328331which auth serves on ` AUTH_ADMIN_LISTENER ` for the dashboard's origin,
329332` AUTH_ADMIN_ORIGIN ` , and which only a private route reaches.
330333Its pages call ` AdminService ` in-process; there is no admin API.
@@ -387,18 +390,21 @@ Piquel tells its owner about the account, newest first, with the unread count in
387390the settings sidebar and on the overview. Today that is a replaced primary
388391address, a removed address, a recovery that revoked the account's passkeys,
389392enrolled one or was undone, an account disabled, enabled, scheduled for deletion
390- or restored, and a handle or display name changed, or a profile picture removed,
391- by support. Each notification opens on a page of its own, which marks it read
392- when the browser came from auth's own pages, so a link from another site cannot
393- dismiss one, and shows the security history entry of the event it came from
394- while the history keeps it, with "This wasn’t me" where the history allows a
395- report. A notification holds no personal data, so it reads the same after its
396- event's personal data is erased or the event is pruned.
393+ or restored, a handle or display name changed, or a profile picture removed, by
394+ support, and administrators' announcements. Each notification opens on a page of
395+ its own, which marks it read when the browser came from auth's own pages, so a
396+ link from another site cannot dismiss one, and shows the security history entry
397+ of the event it came from while the history keeps it, with "This wasn’t me"
398+ where the history allows a report. A notification holds no personal data, so it
399+ reads the same after its event's personal data is erased or the event is pruned;
400+ an announcement holds the text its administrators wrote, which goes with its
401+ recipients.
397402
398403Each notification is also emailed: a recovery's to every verified address, a
399404replaced or removed address's to that address, and any other to the primary
400405verified address. The email says what the inbox says, and links the
401- notification's page.
406+ notification's page; an announcement's goes out on a channel of its own and
407+ links the inbox.
402408
403409The owner marks one unread, or every one read, in settings or through
404410` POST /account/notifications/{id}/read ` , ` …/{id}/unread ` and
@@ -439,6 +445,43 @@ sign-in. For development, `just auth mailpit` runs a local Mailpit: set
439445` http://localhost:8025 ` . Sending domains need SPF, DKIM and DMARC; see
440446[ infra/README.md] ( infra/README.md#email ) .
441447
448+ ### Announcements
449+
450+ Administrators tell accounts what they must know, such as a security incident or
451+ a change to the privacy policy, with an announcement: a subject and a plain text,
452+ to every account or to up to 1,000 chosen ones. It is emailed to each recipient's
453+ primary verified address, and every recipient, including those without an
454+ address, gets it as a notification in their inbox (see
455+ [ Notifications] ( #notifications ) ), whose page keeps its paragraphs. Its page on
456+ the dashboard says how many recipients read it. It is not for support
457+ conversations, which happen elsewhere.
458+
459+ An announcement starts as a draft, which goes to nobody and which any
460+ administrator may change or discard; its page shows the email exactly as it will
461+ be sent, and how many recipients it reaches. Sending it needs the dashboard's
462+ passkey confirmation, and sends only the revision that was checked: a draft
463+ changed meanwhile, by another administrator say, is refused, to be checked again.
464+ Once sent, nothing, not even the database's own role, changes its text. One to
465+ everyone goes to every account at that moment, disabled ones and
466+ ones being deleted included, since Piquel still holds their data. Sending records
467+ an ` announcement_sent ` event with who sent it and to how many accounts.
468+
469+ ``` sh
470+ just auth announcement draft --subject " Security incident on 2 November" \
471+ --body-file incident.txt --everyone # or --to alice --to bob; prints the draft's ID
472+ just auth announcement show < id> # its text, recipients, and once sent, its emails
473+ just auth announcement edit < id> --subject " …" --body-file - --to alice
474+ just auth announcement send < id> --revision < n> # the revision `show` printed; asks first
475+ just auth announcement discard < id> # a draft only
476+ just auth announcement list
477+ ```
478+
479+ Its emails go out on the ` announcement ` delivery channel, apart from the ` email `
480+ channel's verification and recovery links, so sending one to every account
481+ holds none of them back. Each is sent to the address the account has when it
482+ goes out, for up to three days, and dropped once the account has none. The
483+ dashboard counts them by status while the queue keeps them.
484+
442485### Data export and account deletion
443486
444487Owners download their data and delete their account on
@@ -466,7 +509,9 @@ probation sign-in.
466509- ** Purge:** every five minutes, one replica purges the accounts past their grace
467510 period. It deletes the apps the account registered, leaving tombstones with
468511 only their ID, settings and dates, then the account with its emails, passkeys,
469- identities, sessions, grants, consents and email deliveries, and the personal
512+ identities, sessions, grants, consents, email and announcement deliveries, and
513+ the announcements to chosen accounts it was the last recipient of, which may
514+ concern it, and the personal
470515 data (IP, device, provider subjects, app origins, operators' reasons) of every
471516 event it is the subject or actor of, including one a request records while the
472517 purge runs. The events stay, with pseudonymous IDs only. Its handles stay in the
@@ -494,7 +539,8 @@ their records come with #66 and #97.
494539
495540### Outbound deliveries
496541
497- Messages for other systems, such as back-channel logout tokens and email, wait in
542+ Messages for other systems, such as back-channel logout tokens, email and
543+ announcements, wait in
498544a queue in the database until a worker sends them. Inspect and repair it with:
499545
500546``` sh
0 commit comments