batch-v07j: emergency access visibility (#887) and administrator review (#888), v0.6.336 #891

Merged
Cordy merged 14 commits from batch-v07j into main 2026-10-13 01:50:52 +00:00
Owner

Closes #887, closes #888. Built to the approved mockups (887-emergency-access-mockup.html revised, 888-admin-review-mockup.html revision 3) and the decisions on both issues.

#887 Emergency access

  • Emergency-path state (none/check/one/ok), plus GET /api/v1/admin/emergency-access and a startup WARN.
  • Overview:
    • a "No emergency account" card (amber, can't be dismissed, copyable setup);
    • a "One emergency path" notice (dismissed for 90 days);
    • an "Emergency access" row;
    • a rail dot that combines with #864.
  • Sign-in audit on every path:
    • auth-breakglass-signin and auth-admin-signin.
    • Basic and app-password sign-ins are deduplicated to one per account and path every 10 minutes, carrying suppressed=N. Pending counts are flushed at shutdown.
  • Last sign-in for every admin (admin-signins.json, which also records whether the account was an admin and through which groups).
  • Break-glass password-hash fingerprint (changed=<name>, breakglass-fp.json). The fingerprint is never logged.
  • Bell items for all admins, can't be muted:
    • break-glass sign-in, including the address, following audit.ip;
    • no emergency account left;
    • emergency path removed;
    • administrator rights changed.
  • Users & access: EMERGENCY badges and last sign-in on every admin row.
  • Audit log:
    • new picker group "Sign-in & administrators";
    • deep links #admin/audit/query?user=&actions=&path=&from=&to=, which work on any instance, are back/forward-safe and XSS-safe.

#888 Administrator review

  • Two new tabs in Users & access:
    • Admin review: filters (All / Needs a look / Emergency / source / search), paging (20 to 500 per page), flags (never signed in / no sign-in for over 90 days), Remove admin with confirmation, Mark as reviewed, Create report.
    • Reminders & reports: on/off switch, interval (default 6 months), reviewers, scheduled report (PDF/CSV, folder, recipients), and a paged history.
  • Audit verbs: admin-review and admin-review-report.
  • Overview notice and bell item admin-review-due.

Also

  • Fixed #833: the "Share review due" Overview notice never showed, and broke Storage usage while a review was due.
  • Docs:
    • users-access.md, admin-policy.md, local-accounts.md, data-protection-operators.md;
    • security-standards.md: rows for OPS.1.1.2.A5, ORP.4.A3, AR012 7/10/12, NIST AC-2(4)/AC-6(7)/AC-6(9)/AU-6 move to shipped; AC-9 is partial; #890 is planned;
    • CHANGELOG v0.6.336, with upgrade notes on the new state files.

Review

  • Task 1: 2 Important findings fixed (dedup keyed by path, rollback-safe file format), plus a ruling: one bell item per demote.
  • Task 2: 1 Important finding fixed (back/forward trap), plus rulings: frame C actions, the address in the bell item, "one path left".
  • Task 3: fixed the stale group guesses and an unaudited report generation, plus store persist-then-swap.
  • Final review: fixed R1 (#833), R2 (confirm), R3 (flush), lost-update on settings save, and the null-list noise.
  • Locally: Go vet, test, race and gofmt are clean; web 641/641. Local runs used the alt modfile; CI on the real modules is authoritative.
Closes #887, closes #888. Built to the approved mockups (`887-emergency-access-mockup.html` revised, `888-admin-review-mockup.html` revision 3) and the decisions on both issues. ## #887 Emergency access - **Emergency-path state** (`none`/`check`/`one`/`ok`), plus `GET /api/v1/admin/emergency-access` and a startup WARN. - **Overview:** - a "No emergency account" card (amber, can't be dismissed, copyable setup); - a "One emergency path" notice (dismissed for 90 days); - an "Emergency access" row; - a rail dot that combines with #864. - **Sign-in audit on every path:** - `auth-breakglass-signin` and `auth-admin-signin`. - Basic and app-password sign-ins are deduplicated to one per account and path every 10 minutes, carrying `suppressed=N`. Pending counts are flushed at shutdown. - **Last sign-in** for every admin (`admin-signins.json`, which also records whether the account was an admin and through which groups). - **Break-glass password-hash fingerprint** (`changed=<name>`, `breakglass-fp.json`). The fingerprint is never logged. - **Bell items** for all admins, can't be muted: - break-glass sign-in, including the address, following `audit.ip`; - no emergency account left; - emergency path removed; - administrator rights changed. - **Users & access:** EMERGENCY badges and last sign-in on every admin row. - **Audit log:** - new picker group "Sign-in & administrators"; - **deep links** `#admin/audit/query?user=&actions=&path=&from=&to=`, which work on any instance, are back/forward-safe and XSS-safe. ## #888 Administrator review - Two new tabs in **Users & access**: - **Admin review:** filters (All / Needs a look / Emergency / source / search), paging (20 to 500 per page), flags (never signed in / no sign-in for over 90 days), Remove admin with confirmation, Mark as reviewed, Create report. - **Reminders & reports:** on/off switch, interval (default 6 months), reviewers, scheduled report (PDF/CSV, folder, recipients), and a paged history. - **Audit verbs:** `admin-review` and `admin-review-report`. - **Overview notice and bell item** `admin-review-due`. ## Also - Fixed #833: the "Share review due" Overview notice never showed, and broke Storage usage while a review was due. - Docs: - users-access.md, admin-policy.md, local-accounts.md, data-protection-operators.md; - **security-standards.md:** rows for OPS.1.1.2.A5, ORP.4.A3, AR012 7/10/12, NIST AC-2(4)/AC-6(7)/AC-6(9)/AU-6 move to shipped; AC-9 is partial; #890 is planned; - CHANGELOG v0.6.336, with upgrade notes on the new state files. ## Review - **Task 1:** 2 Important findings fixed (dedup keyed by path, rollback-safe file format), plus a ruling: one bell item per demote. - **Task 2:** 1 Important finding fixed (back/forward trap), plus rulings: frame C actions, the address in the bell item, "one path left". - **Task 3:** fixed the stale group guesses and an unaudited report generation, plus store persist-then-swap. - **Final review:** fixed R1 (#833), R2 (confirm), R3 (flush), lost-update on settings save, and the null-list noise. - Locally: Go vet, test, race and gofmt are clean; web 641/641. Local runs used the alt modfile; **CI on the real modules is authoritative.**
- R1: admin-signins.json records per sign-in whether it held the admin
  role and through which admin groups; the directory-group fallback lists
  only accounts whose latest sign-in held it through a group. Entries
  from before (bare time) still read, as unknown, and are left out.
- R2: new admin-tier verb admin-review-report (signin group) for every
  generated report: format, by, admins, file when saved, skipped count.
- R3: API and AdminCSV comments say the CSV is the admin table only.
- adminreview.Store: copy, persist, swap.
- removable checked against the real change endpoints.
- Bell wiring guarded on a nil Admin.
review: batch-v07j final fixes (#887, #888)
All checks were successful
ci / test-and-build (pull_request) Successful in 3m41s
e7aa06bff0
Cordy merged commit ddba3d1aff into main 2026-10-13 01:50:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#891
No description provided.