@pithy-sh/auth 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +1 -1
  2. package/dist/admin/users.js +1 -1
  3. package/dist/audit/actions.d.ts +19 -0
  4. package/dist/audit/actions.d.ts.map +1 -1
  5. package/dist/audit/actions.js +20 -1
  6. package/dist/audit/emit.d.ts +2 -0
  7. package/dist/audit/emit.d.ts.map +1 -1
  8. package/dist/audit/emit.js +1 -1
  9. package/dist/capability.d.ts +19 -0
  10. package/dist/capability.d.ts.map +1 -1
  11. package/dist/capability.js +20 -3
  12. package/dist/data/tables.d.ts +1 -0
  13. package/dist/data/tables.d.ts.map +1 -1
  14. package/dist/data/userLifecycle.d.ts +1 -0
  15. package/dist/data/userLifecycle.d.ts.map +1 -1
  16. package/dist/data/userLifecycle.js +2 -1
  17. package/dist/http/adminRoutes.d.ts.map +1 -1
  18. package/dist/http/adminRoutes.js +270 -5
  19. package/dist/http/guards.d.ts +8 -7
  20. package/dist/http/guards.d.ts.map +1 -1
  21. package/dist/http/guards.js +38 -7
  22. package/dist/http/middleware.d.ts +25 -1
  23. package/dist/http/middleware.d.ts.map +1 -1
  24. package/dist/http/middleware.js +44 -3
  25. package/dist/http/responses.d.ts +180 -0
  26. package/dist/http/responses.d.ts.map +1 -1
  27. package/dist/http/responses.js +142 -1
  28. package/dist/http/routes.d.ts +1 -0
  29. package/dist/http/routes.d.ts.map +1 -1
  30. package/dist/http/routes.js +45 -3
  31. package/dist/http/schemas.d.ts +57 -0
  32. package/dist/http/schemas.d.ts.map +1 -1
  33. package/dist/http/schemas.js +51 -1
  34. package/dist/http/views.d.ts +39 -2
  35. package/dist/http/views.d.ts.map +1 -1
  36. package/dist/http/views.js +105 -1
  37. package/dist/instance/auth.d.ts.map +1 -1
  38. package/dist/instance/auth.js +2 -2
  39. package/dist/lifecycle/audited.d.ts +48 -0
  40. package/dist/lifecycle/audited.d.ts.map +1 -0
  41. package/dist/lifecycle/audited.js +65 -0
  42. package/dist/lifecycle/enforce.d.ts +37 -2
  43. package/dist/lifecycle/enforce.d.ts.map +1 -1
  44. package/dist/lifecycle/enforce.js +46 -5
  45. package/dist/lifecycle/reason.d.ts +11 -0
  46. package/dist/lifecycle/reason.d.ts.map +1 -0
  47. package/dist/lifecycle/reason.js +13 -0
  48. package/dist/lifecycle/request.d.ts +5 -2
  49. package/dist/lifecycle/request.d.ts.map +1 -1
  50. package/dist/lifecycle/request.js +6 -2
  51. package/dist/lifecycle/transitions.d.ts +158 -18
  52. package/dist/lifecycle/transitions.d.ts.map +1 -1
  53. package/dist/lifecycle/transitions.js +344 -70
  54. package/dist/migrations/0005_purge_once.d.ts +22 -0
  55. package/dist/migrations/0005_purge_once.d.ts.map +1 -0
  56. package/dist/migrations/0005_purge_once.js +35 -0
  57. package/dist/migrations/pluginTables.d.ts +8 -0
  58. package/dist/migrations/pluginTables.d.ts.map +1 -1
  59. package/dist/migrations/pluginTables.js +8 -1
  60. package/dist/migrations/set.d.ts +2 -1
  61. package/dist/migrations/set.d.ts.map +1 -1
  62. package/dist/migrations/set.js +4 -2
  63. package/dist/purge/contribution.d.ts +47 -0
  64. package/dist/purge/contribution.d.ts.map +1 -0
  65. package/dist/purge/contribution.js +141 -0
  66. package/dist/purge/retryPolicy.d.ts +22 -0
  67. package/dist/purge/retryPolicy.d.ts.map +1 -0
  68. package/dist/purge/retryPolicy.js +26 -0
  69. package/dist/purge/run.d.ts +88 -0
  70. package/dist/purge/run.d.ts.map +1 -0
  71. package/dist/purge/run.js +102 -0
  72. package/dist/purge/specs.d.ts +71 -0
  73. package/dist/purge/specs.d.ts.map +1 -0
  74. package/dist/purge/specs.js +72 -0
  75. package/dist/purge/start.d.ts +42 -0
  76. package/dist/purge/start.d.ts.map +1 -0
  77. package/dist/purge/start.js +37 -0
  78. package/dist/purge/workflow.d.ts +58 -0
  79. package/dist/purge/workflow.d.ts.map +1 -0
  80. package/dist/purge/workflow.js +96 -0
  81. package/dist/test-utils/accountFootprint.d.ts +10 -0
  82. package/dist/test-utils/accountFootprint.d.ts.map +1 -0
  83. package/dist/test-utils/accountFootprint.js +44 -0
  84. package/dist/version.generated.d.ts +1 -1
  85. package/dist/version.generated.js +1 -1
  86. package/docs/account-lifecycle.md +123 -11
  87. package/package.json +5 -5
  88. package/pithy.manifest.json +1 -1
  89. package/src/audit/actions.ts +19 -0
  90. package/src/audit/emit.ts +3 -1
  91. package/src/capability.ts +48 -1
  92. package/src/data/userLifecycle.ts +4 -1
  93. package/src/http/adminRoutes.ts +398 -2
  94. package/src/http/guards.ts +39 -7
  95. package/src/http/middleware.ts +45 -2
  96. package/src/http/responses.ts +245 -0
  97. package/src/http/routes.ts +55 -3
  98. package/src/http/schemas.ts +110 -0
  99. package/src/http/views.ts +147 -2
  100. package/src/instance/auth.ts +7 -2
  101. package/src/lifecycle/audited.ts +104 -0
  102. package/src/lifecycle/enforce.ts +55 -5
  103. package/src/lifecycle/reason.ts +11 -0
  104. package/src/lifecycle/request.ts +10 -2
  105. package/src/lifecycle/transitions.ts +482 -93
  106. package/src/migrations/0005_purge_once.ts +42 -0
  107. package/src/migrations/pluginTables.ts +19 -1
  108. package/src/migrations/set.ts +3 -1
  109. package/src/purge/contribution.ts +191 -0
  110. package/src/purge/retryPolicy.ts +26 -0
  111. package/src/purge/run.ts +185 -0
  112. package/src/purge/specs.ts +95 -0
  113. package/src/purge/start.ts +79 -0
  114. package/src/purge/workflow.ts +144 -0
  115. package/src/test-utils/accountFootprint.ts +95 -0
  116. package/src/version.generated.ts +1 -1
@@ -58,24 +58,67 @@ export interface LifecycleDeps {
58
58
  readonly log?: Logger | undefined;
59
59
  /** The clock. Defaults to the system's. */
60
60
  readonly now?: (() => Date) | undefined;
61
+ /**
62
+ * The request a transition was asked from, carried onto its audit event: the correlation every admin event
63
+ * carries, and metadata the caller adds — the management connection's id, for a control-plane call.
64
+ */
65
+ readonly context?: LifecycleAuditContext | undefined;
66
+ }
67
+ /** What the caller's request adds to a transition's audit event. */
68
+ export interface LifecycleAuditContext {
69
+ /** The caller's address, from `cf-connecting-ip`. */
70
+ readonly ip?: string | undefined;
71
+ /** The caller's user agent. */
72
+ readonly userAgent?: string | undefined;
73
+ /** The request's id, from `cf-ray`. */
74
+ readonly requestId?: string | undefined;
75
+ /** Extra metadata, merged under the transition's own. */
76
+ readonly metadata?: Record<string, unknown> | undefined;
61
77
  }
62
78
  /** What a transition did. */
63
79
  export interface LifecycleTransition {
64
80
  /** Whether the account moved. `false` when it was already where the call asked to put it. */
65
81
  readonly changed: boolean;
82
+ /** Whether a lifecycle mail was enqueued for the account. False when the config, the call or a missing email capability sent none. */
83
+ readonly mailed: boolean;
84
+ }
85
+ /** What a suspension did, and the suspension it left in force. */
86
+ export interface SuspendTransition extends LifecycleTransition {
87
+ /**
88
+ * True when the account was already suspended and this call restated the reason and the end instead (#621).
89
+ * That is not a transition — `changed` is false and no hook fires — but it is written, audited and mailed.
90
+ */
91
+ readonly updated: boolean;
92
+ /** When the suspension in force began. A restatement keeps the original start. */
93
+ readonly suspendedAt: Date;
94
+ /** When it ends by itself, or null for one that lasts until a reinstatement. */
95
+ readonly suspendedUntil: Date | null;
66
96
  }
67
97
  /**
68
98
  * Suspend an account, until `until` or until it is reinstated.
69
99
  *
70
100
  * A deleted account cannot be suspended — deletion already shuts it, and outranks a suspension — so that is a
71
- * conflict rather than a no-op. A suspension whose end has passed is not in force, and a new one replaces it.
101
+ * conflict rather than a no-op, and names `restoreRoute` when the caller gives one. A suspension whose end has
102
+ * passed is not in force, and a new one replaces it.
103
+ *
104
+ * **An account already suspended has its terms restated (#621).** The reason and the end are replaced, a
105
+ * `suspended` row records the new reason — the newest one is what the person is shown — and the audit event
106
+ * and the mail say so. The start is kept, and no hook fires: the account was suspended and still is, so
107
+ * nothing transitioned. A fresh suspension that loses the race to another suspension finds the account
108
+ * suspended, so it retries once as a restatement rather than failing. A write that finds the account moved
109
+ * under it any other way, by a reinstatement or a deletion that landed first, is a conflict: what the caller
110
+ * asked for no longer describes the account.
111
+ *
112
+ * `notify: false` sends no mail, whatever the config says; the config can only turn mail off, never on.
72
113
  */
73
114
  export declare function suspendUser(deps: LifecycleDeps, input: {
74
115
  userId: string;
75
116
  actor: LifecycleActor;
76
117
  reason: string | null;
77
118
  until?: Date | null;
78
- }): Promise<LifecycleTransition>;
119
+ notify?: boolean;
120
+ restoreRoute?: string;
121
+ }): Promise<SuspendTransition>;
79
122
  /**
80
123
  * Lift a suspension. An account that is not suspended — including one whose suspension ran out — is a no-op.
81
124
  *
@@ -83,50 +126,147 @@ export declare function suspendUser(deps: LifecycleDeps, input: {
83
126
  * past its end leaves `suspendedAt` set and is not a suspension. A deleted account is a conflict, as it is
84
127
  * for `suspendUser`: deletion outranks the suspension it keeps, so lifting that suspension would mail "you can
85
128
  * sign in again" to somebody every sign-in still refuses. Restore it first.
129
+ *
130
+ * `notify: false` sends no mail, on the same rule as `suspendUser`.
86
131
  */
87
132
  export declare function reinstateUser(deps: LifecycleDeps, input: {
88
133
  userId: string;
89
134
  actor: LifecycleActor;
90
135
  reason: string | null;
136
+ notify?: boolean;
137
+ restoreRoute?: string;
91
138
  }): Promise<LifecycleTransition>;
139
+ /** How a deletion runs: shut now and purged once the window closes, or purged now. */
140
+ export type DeletionMode = "soft" | "hard";
141
+ /** What a deletion did, and the deletion it left in force. */
142
+ export interface DeleteTransition extends LifecycleTransition {
143
+ /**
144
+ * `deleted` when this call deleted an account in good standing; `brought_forward` when the account was
145
+ * already deleted and a hard deletion moved its purge to now; `unchanged` when it was already deleted and
146
+ * this call had nothing to move.
147
+ */
148
+ readonly outcome: "deleted" | "brought_forward" | "unchanged";
149
+ /** When the account was deleted. A deletion brought forward keeps its original start. */
150
+ readonly deletedAt: Date;
151
+ /** When the purge may erase it — now, for a hard deletion. Restorable until then. */
152
+ readonly purgeAfter: Date;
153
+ }
92
154
  /**
93
- * Delete an account, softly: it is shut now, and its data is erased once `retention.purgeAfterDays` have
94
- * passed. Restorable until then. Audited as the account's own deletion when its holder is the actor.
155
+ * Delete an account. Audited as the account's own deletion when its holder is the actor.
156
+ *
157
+ * **Soft, the default**: it is shut now, and its data is erased once `retention.purgeAfterDays` have passed.
158
+ * Restorable until then. The deletion-scheduled mail carries the purge date and, when the config names one,
159
+ * the restore path. A deleted account deleted softly again is no transition.
160
+ *
161
+ * **Hard** (#622): `purgeAfter` is now, so the window is already closed — nothing can restore it — and the
162
+ * caller starts the purge. No deletion-scheduled mail, because nothing is scheduled; the purge sends the
163
+ * deletion-complete one. An account already deleted softly has its purge brought forward to now, which is
164
+ * written and audited but fires no hook: the account was deleted and still is. One already due is unchanged.
95
165
  *
96
166
  * A suspension the account was under is left in place, so restoring the account does not lift it.
167
+ * `notify: false` sends no mail, whatever the config says.
97
168
  */
98
169
  export declare function deleteUser(deps: LifecycleDeps, input: {
99
170
  userId: string;
100
171
  actor: LifecycleActor;
101
172
  reason: string | null;
102
- }): Promise<LifecycleTransition>;
173
+ mode?: DeletionMode;
174
+ notify?: boolean;
175
+ }): Promise<DeleteTransition>;
176
+ /** What a restoration did, and where it left the account. */
177
+ export interface RestoreTransition extends LifecycleTransition {
178
+ /** Where the account stands now: `active`, or `suspended` when a suspension it was under is still in force. */
179
+ readonly state: "active" | "suspended";
180
+ }
103
181
  /**
104
- * Restore a deleted account inside its purge window. After the purge there is no account, and that is a 404
105
- * whose action says the data is gone.
182
+ * Restore a deleted account inside its purge window.
183
+ *
184
+ * **Only inside it.** Once `purgeAfter` has passed the purge is due, may already be running, and erases each
185
+ * capability's rows in turn, so restoring then would hand back an account with some of its data gone. That
186
+ * is a conflict naming the date the window closed. After the purge there is no account at all, and that is a
187
+ * 404 whose action says the data is gone — read off the history row the purge leaves behind, so it is told
188
+ * apart from an id that never existed.
189
+ *
190
+ * An account that is not deleted is no transition. A suspension it was under is still in force after.
106
191
  */
107
192
  export declare function restoreUser(deps: LifecycleDeps, input: {
108
193
  userId: string;
109
194
  actor: LifecycleActor;
110
195
  reason: string | null;
111
- }): Promise<LifecycleTransition>;
112
- /** Record that one purge step — one capability's contribution — erased its rows. */
196
+ }): Promise<RestoreTransition>;
197
+ /**
198
+ * The account's row, or the refusal for one that is not there — the 404 that says the data is gone when the
199
+ * purge erased it, and the plain one otherwise. For a route that reads an account outside a transition: the
200
+ * export.
201
+ */
202
+ export declare function requirePresent(db: AuthDatabase, userId: string): Promise<void>;
203
+ /** Who the purge's last mail goes to, captured before any step erases the address. */
204
+ export interface PurgeRecipient {
205
+ readonly email: string;
206
+ readonly name: string | null;
207
+ readonly locale: string | null;
208
+ }
209
+ /**
210
+ * Whether one account is due for its purge, who its last mail goes to, and whether it goes (#622).
211
+ *
212
+ * `due` only for an account that is deleted and whose `purgeAfter` has passed — the cron and a hard deletion
213
+ * both start a purge, and this is the one check either passes through, so an account restored in between is
214
+ * `not_due` and nothing is erased. `gone` when there is no row: the purge already erased it, or the id never
215
+ * existed, and either way there is nothing to do. The recipient is read here, before the first step, because
216
+ * the last step erases it.
217
+ *
218
+ * `notify` is what the deletion in force asked of the last mail — its newest `deleted` row's — so a hard
219
+ * deletion's `notify: false` holds for a purge the daily pass started, which was handed no such parameter.
220
+ */
221
+ export declare function purgeSubject(deps: LifecycleDeps, userId: string): Promise<{
222
+ state: "due";
223
+ recipient: PurgeRecipient;
224
+ notify: boolean | null;
225
+ } | {
226
+ state: "not_due";
227
+ } | {
228
+ state: "gone";
229
+ }>;
230
+ /** One account whose purge is due: which, and the deletion it is due under — ms-epoch, so a Workflow journal holds it. */
231
+ export interface DuePurge {
232
+ readonly userId: string;
233
+ readonly deletedAt: number;
234
+ }
235
+ /**
236
+ * The accounts whose purge is due — deleted, with `purgeAfter` passed — oldest first, at most `limit` (#622).
237
+ * What the daily cron starts a purge for. An account still inside its window is not here, and neither is one
238
+ * that was restored. Each carries its deletion's start, which names the purge's instance (`../purge/start.ts`).
239
+ */
240
+ export declare function duePurges(deps: LifecycleDeps, limit: number): Promise<DuePurge[]>;
241
+ /**
242
+ * Record that one purge step — one capability's contribution — erased its rows. The contribution's summary is
243
+ * the row's reason, so the history says what the step erased and not only that it ran.
244
+ */
113
245
  export declare function recordPurgeStep(deps: LifecycleDeps, input: {
114
246
  userId: string;
115
247
  step: string;
248
+ summary?: string | null;
116
249
  }): Promise<void>;
117
250
  /**
118
- * Finish a purge: the last mail, the record, the audit event, the hook.
251
+ * The deletion-complete mail, sent **before the address is erased** (#622). The purge calls this after every
252
+ * other capability's rows are gone and before auth's own, which holds the address, so the last mail is
253
+ * enqueued while there is still an account to have sent it to. The address is handed in, captured before the
254
+ * first step. `notify: false` sends nothing, whatever the config says.
255
+ */
256
+ export declare function mailPurgeComplete(deps: LifecycleDeps, input: {
257
+ recipient: PurgeRecipient;
258
+ notify?: boolean;
259
+ }): Promise<LifecycleTransition>;
260
+ /**
261
+ * Finish a purge: the record, the audit event, the hook. The last thing that happens to the account.
119
262
  *
120
- * **The address is handed in, not read**, because by the time a purge finishes the user row is gone — the
121
- * Workflow captures the recipient before its first step and passes it here. Finishing a purge that already
122
- * finished is a no-op, so a retried Workflow step mails nobody twice.
263
+ * By the time a purge finishes the user row is gone, so this reads nothing about the account. Finishing a
264
+ * purge that already finished is a no-op, so a retried Workflow step records and fires once — and so do two
265
+ * purges of one account that overlapped. **The insert is the check**: `0005_purge_once` allows one `purged` row
266
+ * per account, the insert ignores a second, and only the call whose row landed audits and fires. A read
267
+ * before the insert would let two concurrent calls both find nothing and both write.
123
268
  */
124
269
  export declare function completePurge(deps: LifecycleDeps, input: {
125
270
  userId: string;
126
- recipient: {
127
- email: string;
128
- name: string | null;
129
- locale: string | null;
130
- };
131
271
  }): Promise<LifecycleTransition>;
132
272
  //# sourceMappingURL=transitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/lifecycle/transitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,2BAA2B,CAAC;AAEj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