Repository navigation
Commit 76be8ec
authored
feat(admin): the dashboard runs deliveries, signing keys, handles and account history like the CLI (#345)
The admin dashboard lagged the operator CLI: delivery triage, signing
keys, handle checks and an account's security history were
terminal-only, and the overview told administrators to go run a command
when deliveries backed up.
Now the dashboard does them too, through `AdminService`, so permissions
and audit events match every other admin change:
- **Deliveries**: list by status and channel, retry and cancel from each
row. The overview's "messages waiting" notice links straight to the
queue.
- **Signing keys**: list, rotate (optionally signing at once) and
revoke. These are new `AdminOperation`s, and the `keys` commands run
them too. The key change re-checks the administrator's rights and
confirmation just before it commits, like any other change. **Import
stays CLI-only**: the PEM private key should never pass through a
browser (the reason sits next to its `None` arm).
- **Handles**: a Handles page lists the accounts `handle check` lists
and releases handles. The rename form can now allow a reserved handle,
as `--allow-reserved` does.
- **Security history**: a History tab on each account reuses the owner's
timeline, read-only. Reading it needs no passkey confirmation, has no
report buttons, and is recorded as a view.
- **Data export stays the owner's**: an export copies every IP address
and the whole history out of auth, so only the owner's recently
confirmed session gets it. Support recovers the account instead. This is
documented in `surfaces.md` and the account module.
OIDC client management is out of scope here (another PR handles it).
Verified on a preview: both `admin.spec.ts` tests pass against it, with
screenshots of each new page. The new server-side tests and the affected
admin, CLI, keys and settings tests pass on a scratch database, and
clippy and the web lint pass.
Reviewed with review-loop: 2 rounds with 2× GPT 6.1 Sol and Claude Opus
5.5 (the last after rebasing onto main). Verdict: approved
> [!NOTE]
> Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol
and Claude Opus 5.5 (via T3 Code)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Admin dashboard
- Added **Deliveries**, **Handles**, and **Signing Keys** pages to the
administrator dashboard and sidebar.
- The Deliveries page lists up to 100 deliveries. Administrators can
filter by status and channel, and retry or cancel deliveries when the
delivery state permits. The overview’s “messages waiting” notice links
to the queue.
- The Handles page lists reserved handles, shows the accounts that use
them, and supports handle checks and releases. Administrators can also
allow a reserved handle during a rename.
- The Signing Keys page lists key types, states, and lifecycle dates.
Administrators can rotate keys and revoke keys. Rotation can make the
new key active immediately.
- Key import remains CLI-only. Dashboard changes use `AdminService`; the
key-change flow rechecks administrator rights before committing.
## Account security history
- Added a read-only History tab to each account’s settings pages. It
reuses the account timeline and records an administrator’s read as a
view.
- The administrator view has no report action. Owner-only reporting and
confirmation behavior remain distinct from the administrator view.
- Account-data export remains available only to the owner in a recently
confirmed session. Administrators cannot export account data.
Documentation describes the export’s contents and the recovery path for
owners who have lost all passkeys.
## Service and data model
- Added `AdminOperation`s for listing, rotating, revoking, and importing
signing keys. Key list operations are classified as reads; key changes
are classified as changes.
- Added signing-key error handling, including API mappings for unknown
keys, conflicts, database failures, cryptographic errors, and
authorization refusals.
- Added shared admin types for delivery status and summaries, and
signing-key state, type, and summary data. The signing-key view omits
key material.
- Updated the database repositories to use the shared admin types. Added
conversion from stored signing-key records to the public admin view.
- Routed CLI list, rotate, revoke, and import commands through
`AdminService`. Digest-usage and audit commands retain their existing
paths.
## User interface and documentation
- Added dashboard views and actions for delivery management, reserved
handles, and signing keys. Delivery and key views show actions according
to the available state and confirmation rules.
- Updated delivery-queue, administration, signing-key, handle,
account-export, and security-history documentation.
- Extended the browser test suite with coverage for account history, key
rotation and revocation, delivery filtering, and handle-release refusal.
The supplied change summary does not establish test execution results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent a9232bd commit 76be8ec
42 files changed
Lines changed: 1607 additions & 153 deletions
File tree
- apps/auth-service/src
- account
- admin
- service
- tests
- cli
- deletion
- keys
- web
- admin
- settings
- crates
- common/src
- database/src/repositories
- deliveries
- signing_keys
- ui
- assets/style
- src
- admin
- settings
- docs/architecture
- tests/browser
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
314 | 318 | | |
315 | 319 | | |
316 | 320 | | |
317 | | - | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| |||
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
354 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
355 | 362 | | |
356 | 363 | | |
357 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
150 | 165 | | |
151 | 166 | | |
152 | 167 | | |
| |||
190 | 205 | | |
191 | 206 | | |
192 | 207 | | |
| 208 | + | |
193 | 209 | | |
194 | 210 | | |
195 | 211 | | |
| |||
235 | 251 | | |
236 | 252 | | |
237 | 253 | | |
238 | | - | |
| 254 | + | |
| 255 | + | |
239 | 256 | | |
240 | 257 | | |
241 | 258 | | |
| |||
249 | 266 | | |
250 | 267 | | |
251 | 268 | | |
252 | | - | |
253 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
254 | 277 | | |
255 | 278 | | |
256 | 279 | | |
257 | 280 | | |
258 | 281 | | |
259 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
260 | 286 | | |
261 | 287 | | |
262 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | | - | |
5 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
64 | 82 | | |
| 83 | + | |
65 | 84 | | |
66 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
67 | 89 | | |
68 | 90 | | |
69 | 91 | | |
70 | 92 | | |
71 | | - | |
| 93 | + | |
72 | 94 | | |
73 | 95 | | |
74 | 96 | | |
| |||
82 | 104 | | |
83 | 105 | | |
84 | 106 | | |
85 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
86 | 111 | | |
87 | 112 | | |
88 | 113 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
93 | 122 | | |
94 | 123 | | |
95 | 124 | | |
| |||
110 | 139 | | |
111 | 140 | | |
112 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
113 | 145 | | |
114 | 146 | | |
115 | 147 | | |
116 | | - | |
| 148 | + | |
117 | 149 | | |
118 | 150 | | |
119 | 151 | | |
| |||
0 commit comments