@powerhousedao/switchboard 6.2.2-dev.7 → 6.2.2-dev.70

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.
package/Auth.md CHANGED
@@ -112,7 +112,7 @@ interface VerifiableCredential {
112
112
  1. **Token Decoding**: Extract credential information from JWT
113
113
  2. **Credential Validation**: Verify against W3C standards
114
114
  3. **Issuer Verification**: Check credential issuer authenticity
115
- 4. **Renown API Check**: Validate credential still exists and is valid
115
+ 4. **Credential Existence Check**: Validate credential still exists and is valid — against a remote Renown/Switchboard or this switchboard's own read model (see [Which Renown Instance Is Used](#which-renown-instance-is-used))
116
116
  5. **User Extraction**: Create user object from verified credentials
117
117
 
118
118
  ### 5. **Authorization**
@@ -184,6 +184,64 @@ export ADMINS="0x111,0x222,0x333"
184
184
  }
185
185
  ```
186
186
 
187
+ #### Which Renown Instance Is Used
188
+
189
+ Step 4 of the verification process re-checks that the signer's Renown credential
190
+ still exists. `auth.renown` says which instance answers that question:
191
+
192
+ ```json
193
+ {
194
+ "auth": {
195
+ "enabled": true,
196
+ "admins": ["0x111"],
197
+ "renown": {
198
+ "source": "remote",
199
+ "url": "https://renown.acme.io",
200
+ "switchboardUrl": "https://sb.acme.io/graphql"
201
+ }
202
+ }
203
+ }
204
+ ```
205
+
206
+ | Field | Env override | Meaning |
207
+ | --- | --- | --- |
208
+ | `source` | `RENOWN_SOURCE` | `remote` (default) queries another instance; `self` reads this switchboard's own `renown-read-model` subgraph in-process. |
209
+ | `url` | `RENOWN_URL` | Renown base URL, used for discovery and the REST fallback. Defaults to `https://www.renown.id`. |
210
+ | `switchboardUrl` | `SWITCHBOARD_URL` | A switchboard's GraphQL endpoint to read credentials from directly, skipping discovery. |
211
+
212
+ Env vars win over the config file field by field; a blank value counts as unset.
213
+ With `source: "remote"` the order is `switchboardUrl`, then discovery via `url`,
214
+ then the Renown REST API at `url`. With `source: "self"` both URLs are ignored
215
+ for verification — but `url` still applies to this switchboard's own identity
216
+ (below).
217
+
218
+ Either way the credential's EIP-712 proof is re-verified and expiry and
219
+ delegation binding are re-checked, so a locally stored credential is held to the
220
+ same standard as a remote one. Successful checks are cached per identity for
221
+ `CREDENTIAL_VERIFICATION_CACHE_TTL_MS` (60s default) in both modes, so
222
+ revocation still lags by up to that TTL.
223
+
224
+ `self` requires a loaded package that provides the `renown-read-model` subgraph
225
+ (`@powerhousedao/renown-package`). Startup fails if none does, rather than booting
226
+ a switchboard that rejects every authenticated request.
227
+
228
+ Where the pieces live: `@renown/sdk` owns the read-model contract
229
+ (`RENOWN_READ_MODEL_SUBGRAPH`, `createLocalCredentialVerifier`), this app wires
230
+ it to the running reactor after the API is up, and `reactor-api` only supplies
231
+ the generic `GraphQLManager.executeSubgraphQuery` plus an injectable
232
+ `verifyCredential` — core has no knowledge of the renown package. A host that
233
+ sets `source: "self"` without injecting a verifier is refused at boot rather
234
+ than silently verified against a remote Renown.
235
+
236
+ #### The Switchboard's Own Identity
237
+
238
+ Separately from verifying incoming credentials, a switchboard has its own
239
+ identity — the `ph login` keypair it uses to authenticate *outbound* to remote
240
+ drives and services. It authenticates against `auth.renown.url` too, so one
241
+ setting covers both directions. Pass `identity.baseUrl` when starting the server
242
+ to point it somewhere else; unset everywhere, it falls back to
243
+ `https://www.renown.id`.
244
+
187
245
  ### 2. **Frontend Integration**
188
246
 
189
247
  #### Using the useAuth Hook
package/CHANGELOG.md CHANGED
@@ -1,3 +1,413 @@
1
+ ## 6.2.2-dev.70 (2026-09-01)
2
+
3
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
4
+
5
+ ## 6.2.2-dev.69 (2026-08-31)
6
+
7
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
8
+
9
+ ## 6.2.2-dev.68 (2026-08-31)
10
+
11
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
12
+
13
+ ## 6.2.2-dev.67 (2026-08-31)
14
+
15
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
16
+
17
+ ## 6.2.2-dev.66 (2026-08-30)
18
+
19
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
20
+
21
+ ## 6.2.2-dev.65 (2026-08-29)
22
+
23
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
24
+
25
+ ## 6.2.2-dev.64 (2026-08-28)
26
+
27
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
28
+
29
+ ## 6.2.2-dev.63 (2026-08-27)
30
+
31
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
32
+
33
+ ## 6.2.2-dev.62 (2026-08-27)
34
+
35
+ ### 🩹 Fixes
36
+
37
+ - **ci:** build before typecheck in simulate-ci-workflow ([2ecd03e81](https://github.com/powerhouse-inc/powerhouse/commit/2ecd03e81))
38
+ - **windows:** spawn package managers through cross-spawn ([ff4140072](https://github.com/powerhouse-inc/powerhouse/commit/ff4140072))
39
+ - **windows:** make package scripts runnable under cmd.exe ([987022ed9](https://github.com/powerhouse-inc/powerhouse/commit/987022ed9))
40
+
41
+ ### ❤️ Thank You
42
+
43
+ - Claude Opus 5 (1M context)
44
+ - Wouter Kampmann
45
+
46
+ ## 6.2.2-dev.61 (2026-08-26)
47
+
48
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
49
+
50
+ ## 6.2.2-dev.60 (2026-08-26)
51
+
52
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
53
+
54
+ ## 6.2.2-dev.59 (2026-08-25)
55
+
56
+ ### 🩹 Fixes
57
+
58
+ - **reactor:** stable processor cursor ids behind legacyProcessorIds flag ([ee82e90b4](https://github.com/powerhouse-inc/powerhouse/commit/ee82e90b4))
59
+
60
+ ### ❤️ Thank You
61
+
62
+ - acaldas
63
+
64
+ ## 6.2.2-dev.58 (2026-08-25)
65
+
66
+ ### 🚀 Features
67
+
68
+ - **docker:** per-channel compose files on cr.vetra.io with fixed ports ([7d8f51b57](https://github.com/powerhouse-inc/powerhouse/commit/7d8f51b57))
69
+
70
+ ### 🩹 Fixes
71
+
72
+ - **docker:** connect image HEALTHCHECK uses 127.0.0.1 ([4c80c5759](https://github.com/powerhouse-inc/powerhouse/commit/4c80c5759))
73
+ - **docker:** healthcheck 127.0.0.1 instead of localhost in compose files ([e15bb8c9d](https://github.com/powerhouse-inc/powerhouse/commit/e15bb8c9d))
74
+
75
+ ### ❤️ Thank You
76
+
77
+ - froid1911
78
+
79
+ ## 6.2.2-dev.57 (2026-08-24)
80
+
81
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
82
+
83
+ ## 6.2.2-dev.56 (2026-08-23)
84
+
85
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
86
+
87
+ ## 6.2.2-dev.55 (2026-08-22)
88
+
89
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
90
+
91
+ ## 6.2.2-dev.54 (2026-08-21)
92
+
93
+ ### 🚀 Features
94
+
95
+ - ⚠️ **reactor-api:** type the actions mutateDocument accepts ([1b9adbe2a](https://github.com/powerhouse-inc/powerhouse/commit/1b9adbe2a))
96
+
97
+ ### ⚠️ Breaking Changes
98
+
99
+ - **reactor-api:** type the actions mutateDocument accepts ([1b9adbe2a](https://github.com/powerhouse-inc/powerhouse/commit/1b9adbe2a))
100
+
101
+ ### ❤️ Thank You
102
+
103
+ - Benjamin Jordan
104
+ - Claude Fable 5
105
+
106
+ ## 6.2.2-dev.53 (2026-08-20)
107
+
108
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
109
+
110
+ ## 6.2.2-dev.52 (2026-08-19)
111
+
112
+ ### 🚀 Features
113
+
114
+ - **switchboard:** verify renown credentials against the reactor's own read model ([9e7efe532](https://github.com/powerhouse-inc/powerhouse/commit/9e7efe532))
115
+
116
+ ### 🩹 Fixes
117
+
118
+ - **reactor-api,switchboard:** parse PGlite read-model timestamps as UTC ([e6e25758b](https://github.com/powerhouse-inc/powerhouse/commit/e6e25758b))
119
+
120
+ ### ❤️ Thank You
121
+
122
+ - acaldas
123
+
124
+ ## 6.2.2-dev.51 (2026-08-19)
125
+
126
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
127
+
128
+ ## 6.2.2-dev.50 (2026-08-18)
129
+
130
+ ### 🚀 Features
131
+
132
+ - **switchboard:** read the group and condition enforcement flags ([e3d72b0a8](https://github.com/powerhouse-inc/powerhouse/commit/e3d72b0a8))
133
+
134
+ ### 🩹 Fixes
135
+
136
+ - **ci:** install chromium from the package that owns playwright ([653349ee0](https://github.com/powerhouse-inc/powerhouse/commit/653349ee0))
137
+ - **connect:** stage the CSP rewrite instead of sed -i ([ab5cd1d8f](https://github.com/powerhouse-inc/powerhouse/commit/ab5cd1d8f))
138
+
139
+ ### ❤️ Thank You
140
+
141
+ - Benjamin Jordan
142
+ - Claude Opus 5 (1M context)
143
+
144
+ ## 6.2.2-dev.49 (2026-08-17)
145
+
146
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
147
+
148
+ ## 6.2.2-dev.48 (2026-08-15)
149
+
150
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
151
+
152
+ ## 6.2.2-dev.47 (2026-08-14)
153
+
154
+ ### 🩹 Fixes
155
+
156
+ - **connect:** sync CSP registry origin to runtime packageRegistryUrl ([418652419](https://github.com/powerhouse-inc/powerhouse/commit/418652419))
157
+
158
+ ### ❤️ Thank You
159
+
160
+ - Frank Pfeift
161
+
162
+ ## 6.2.2-dev.46 (2026-08-14)
163
+
164
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
165
+
166
+ ## 6.2.2-dev.45 (2026-08-13)
167
+
168
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
169
+
170
+ ## 6.2.2-dev.44 (2026-08-12)
171
+
172
+ ### 🚀 Features
173
+
174
+ - **reactor-api,codegen:** register upgrade manifests on the switchboard ([85383aa0f](https://github.com/powerhouse-inc/powerhouse/commit/85383aa0f))
175
+ - **reactor-group:** ship the PHGroup document model as @powerhousedao/reactor-group ([d5a323016](https://github.com/powerhouse-inc/powerhouse/commit/d5a323016))
176
+
177
+ ### 🩹 Fixes
178
+
179
+ - **shared:** harden the condition evaluator per review ([eea3fb475](https://github.com/powerhouse-inc/powerhouse/commit/eea3fb475))
180
+
181
+ ### ❤️ Thank You
182
+
183
+ - Benjamin Jordan
184
+ - Claude Fable 5
185
+
186
+ ## 6.2.2-dev.43 (2026-08-11)
187
+
188
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
189
+
190
+ ## 6.2.2-dev.42 (2026-08-10)
191
+
192
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
193
+
194
+ ## 6.2.2-dev.41 (2026-08-09)
195
+
196
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
197
+
198
+ ## 6.2.2-dev.40 (2026-08-08)
199
+
200
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
201
+
202
+ ## 6.2.2-dev.39 (2026-08-07)
203
+
204
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
205
+
206
+ ## 6.2.2-dev.38 (2026-08-06)
207
+
208
+ ### 🚀 Features
209
+
210
+ - added recipe e2e tests to the suite ([88cd1a55c](https://github.com/powerhouse-inc/powerhouse/commit/88cd1a55c))
211
+ - auth phase 4 ([28aa9ad6a](https://github.com/powerhouse-inc/powerhouse/commit/28aa9ad6a))
212
+
213
+ ### 🩹 Fixes
214
+
215
+ - stage llm files from pre-commit hook ([0af2ab705](https://github.com/powerhouse-inc/powerhouse/commit/0af2ab705))
216
+ - **reactor:** point preflight:auth at a real store ([c1315a9f9](https://github.com/powerhouse-inc/powerhouse/commit/c1315a9f9))
217
+ - **reactor:** filter initialState and keep auth in a scoped subscription read ([77fee70b4](https://github.com/powerhouse-inc/powerhouse/commit/77fee70b4))
218
+ - **reactor:** degrade the poll query against a remote on the older schema ([0c3aefe65](https://github.com/powerhouse-inc/powerhouse/commit/0c3aefe65))
219
+ - **shared:** stop a state snapshot from installing or replacing a policy ([f947e562e](https://github.com/powerhouse-inc/powerhouse/commit/f947e562e))
220
+ - **shared:** make auth-administration retention a reachability rule ([3db42daac](https://github.com/powerhouse-inc/powerhouse/commit/3db42daac))
221
+
222
+ ### ❤️ Thank You
223
+
224
+ - Benjamin Jordan
225
+ - Claude Fable 5
226
+
227
+ ## 6.2.2-dev.37 (2026-08-05)
228
+
229
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
230
+
231
+ ## 6.2.2-dev.36 (2026-08-04)
232
+
233
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
234
+
235
+ ## 6.2.2-dev.35 (2026-08-03)
236
+
237
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
238
+
239
+ ## 6.2.2-dev.34 (2026-08-02)
240
+
241
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
242
+
243
+ ## 6.2.2-dev.33 (2026-08-01)
244
+
245
+ ### 🩹 Fixes
246
+
247
+ - **reactor:** fixing a few defects with document scope reshuffle specifics ([7546b9ff2](https://github.com/powerhouse-inc/powerhouse/commit/7546b9ff2))
248
+
249
+ ### ❤️ Thank You
250
+
251
+ - Benjamin Jordan
252
+
253
+ ## 6.2.2-dev.32 (2026-07-31)
254
+
255
+ ### 🚀 Features
256
+
257
+ - **reactor:** feature flag guards and spec updates to make plan for guarded reshuffle edge cases ([20b0fd6be](https://github.com/powerhouse-inc/powerhouse/commit/20b0fd6be))
258
+
259
+ ### 🩹 Fixes
260
+
261
+ - **reactor:** fix convergence in the case we deny an operation that has a skip ([21cbb3ecb](https://github.com/powerhouse-inc/powerhouse/commit/21cbb3ecb))
262
+ - auth-scope spec updates, assert ordered streams, and fix some busted default protocol versions ([97c5a37b5](https://github.com/powerhouse-inc/powerhouse/commit/97c5a37b5))
263
+
264
+ ### ❤️ Thank You
265
+
266
+ - Benjamin Jordan
267
+
268
+ ## 6.2.2-dev.31 (2026-07-31)
269
+
270
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
271
+
272
+ ## 6.2.2-dev.30 (2026-07-31)
273
+
274
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
275
+
276
+ ## 6.2.2-dev.29 (2026-07-31)
277
+
278
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
279
+
280
+ ## 6.2.2-dev.28 (2026-07-30)
281
+
282
+ ### 🚀 Features
283
+
284
+ - **reactor-browser:** add IReactorBrowserClient and a light GraphQL client ([#2893](https://github.com/powerhouse-inc/powerhouse/pull/2893))
285
+ - **reactor:** plugging in the first decision model ([27e9b2772](https://github.com/powerhouse-inc/powerhouse/commit/27e9b2772))
286
+
287
+ ### ❤️ Thank You
288
+
289
+ - Benjamin Jordan
290
+ - Guillermo Puente Sandoval @gpuente
291
+
292
+ ## 6.2.2-dev.27 (2026-07-30)
293
+
294
+ ### 🩹 Fixes
295
+
296
+ - **connect:** pin @privy-io/react-auth to 3.35.0 ([909352ce3](https://github.com/powerhouse-inc/powerhouse/commit/909352ce3))
297
+
298
+ ### ❤️ Thank You
299
+
300
+ - acaldas
301
+
302
+ ## 6.2.2-dev.26 (2026-07-30)
303
+
304
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
305
+
306
+ ## 6.2.2-dev.25 (2026-07-29)
307
+
308
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
309
+
310
+ ## 6.2.2-dev.24 (2026-07-29)
311
+
312
+ ### 🩹 Fixes
313
+
314
+ - **reactor:** fix an issue exacerbated by auth where snapshots were ordered by insertion not revision ([4aa32fe1b](https://github.com/powerhouse-inc/powerhouse/commit/4aa32fe1b))
315
+
316
+ ### ❤️ Thank You
317
+
318
+ - Benjamin Jordan
319
+
320
+ ## 6.2.2-dev.23 (2026-07-28)
321
+
322
+ ### 🩹 Fixes
323
+
324
+ - **deps:** pin qr to 0.5.5 so RainbowKit can render the WalletConnect QR ([5343f9178](https://github.com/powerhouse-inc/powerhouse/commit/5343f9178))
325
+
326
+ ### ❤️ Thank You
327
+
328
+ - acaldas
329
+
330
+ ## 6.2.2-dev.22 (2026-07-28)
331
+
332
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
333
+
334
+ ## 6.2.2-dev.21 (2026-07-27)
335
+
336
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
337
+
338
+ ## 6.2.2-dev.20 (2026-07-27)
339
+
340
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
341
+
342
+ ## 6.2.2-dev.19 (2026-07-27)
343
+
344
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
345
+
346
+ ## 6.2.2-dev.18 (2026-07-27)
347
+
348
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
349
+
350
+ ## 6.2.2-dev.17 (2026-07-26)
351
+
352
+ ### 🚀 Features
353
+
354
+ - **attachments:** S3-compatible storage, direct transfers, and document-derived authorization ([#2884](https://github.com/powerhouse-inc/powerhouse/pull/2884))
355
+
356
+ ### ❤️ Thank You
357
+
358
+ - Guillermo Puente Sandoval @gpuente
359
+
360
+ ## 6.2.2-dev.16 (2026-07-25)
361
+
362
+ ### 🩹 Fixes
363
+
364
+ - code review fixes ([318cbefa9](https://github.com/powerhouse-inc/powerhouse/commit/318cbefa9))
365
+ - version 0 is reserved and only 1 and on is available for setting ([193ac4c56](https://github.com/powerhouse-inc/powerhouse/commit/193ac4c56))
366
+ - resolve a contradiction in group membership ([39845a65c](https://github.com/powerhouse-inc/powerhouse/commit/39845a65c))
367
+ - grant evaluation needs to ignore features that do not exist yet ([0c1d06396](https://github.com/powerhouse-inc/powerhouse/commit/0c1d06396))
368
+
369
+ ### ❤️ Thank You
370
+
371
+ - Benjamin Jordan
372
+
373
+ ## 6.2.2-dev.15 (2026-07-24)
374
+
375
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
376
+
377
+ ## 6.2.2-dev.14 (2026-07-23)
378
+
379
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
380
+
381
+ ## 6.2.2-dev.13 (2026-07-23)
382
+
383
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
384
+
385
+ ## 6.2.2-dev.12 (2026-07-23)
386
+
387
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
388
+
389
+ ## 6.2.2-dev.11 (2026-07-22)
390
+
391
+ ### 🚀 Features
392
+
393
+ - **connect:** dynamic packages can contribute to the PWA configuration ([da867e21d](https://github.com/powerhouse-inc/powerhouse/commit/da867e21d))
394
+
395
+ ### ❤️ Thank You
396
+
397
+ - Yasiel Cabrera @YasielCabrera
398
+
399
+ ## 6.2.2-dev.10 (2026-07-21)
400
+
401
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
402
+
403
+ ## 6.2.2-dev.9 (2026-07-20)
404
+
405
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
406
+
407
+ ## 6.2.2-dev.8 (2026-07-19)
408
+
409
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
410
+
1
411
  ## 6.2.2-dev.7 (2026-07-18)
2
412
 
3
413
  This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
package/README.md CHANGED
@@ -156,6 +156,43 @@ The same settings are available programmatically via
156
156
  `startSwitchboard({ workerPool: { numWorkers, dbPoolSizePerWorker, acquireTimeoutMs } })`,
157
157
  which takes precedence over the environment variables.
158
158
 
159
+ ### Reactor Enforcement Flags
160
+
161
+ | Variable | Description | Default |
162
+ | ------------------------------ | ------------------------------------------------------------------ | ------- |
163
+ | `REACTOR_DOCUMENT_DECISIONS` | Decide writes from the document stream, not the meta cache | `false` |
164
+ | `REACTOR_AUTH_ENFORCEMENT` | Enforce the auth scope's policy at admission, replay and read | `false` |
165
+ | `REACTOR_AUTH_GROUPS` | Let `{ group }` principals match against group-document rosters | `false` |
166
+ | `REACTOR_AUTH_CONDITIONS` | Evaluate `where` / `match` conditions on grants | `false` |
167
+
168
+ Set each to the literal `true` to enable. Each flag requires the one above it,
169
+ and switchboard refuses to start on a set that skips one — a partially enforcing
170
+ reactor would apply less than the operator asked for.
171
+
172
+ These change replay outcomes, which are consensus outcomes, so **a flag flips
173
+ for a whole document-sharing fleet, never per node**. Two nodes that share
174
+ documents and disagree on the flags diverge, exactly as two nodes on
175
+ incompatible versions would. Connect carries the same flags in
176
+ `connect.reactor.featureFlags` (see `apps/connect/RUNTIME-CONFIG.md`); a fleet
177
+ that includes browser replicas has to set them there too.
178
+
179
+ Sweep the store before enabling either auth flag — neither unsafe condition is
180
+ repairable after the fact, because the auth stream is never reshuffled:
181
+
182
+ ```bash
183
+ cd packages/reactor && pnpm preflight:auth --pg <connection-string>
184
+ ```
185
+
186
+ Exit `0` is clean for both; `1` means streams unsafe for `authEnforcement`, `2`
187
+ means documents unsafe for `authConditions`, `3` both, and `68` means the run
188
+ died having checked nothing. Gate on the whole code, not on a bit.
189
+
190
+ One expectation worth stating: turning enforcement on protects nothing that
191
+ already exists. The host's permission tables still own sync serving and the
192
+ GraphQL boundary, and every document that predates the auth scope carries an
193
+ uninitialized policy, which allows everything. Enforcement bites only on
194
+ documents that have emitted `INITIALIZE_AUTH`.
195
+
159
196
  ### Authentication Configuration
160
197
 
161
198
  ```typescript
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5a65c537-fadb-5705-95c0-4cec44d7b4d2")}catch(e){}}();
4
- import { a as parseForcePgVersion, r as startSwitchboard } from "./server-Cgud_ONM.mjs";
4
+ import { a as parseForcePgVersion, r as startSwitchboard } from "./server-CQKVIxsA.mjs";
5
5
  import "./utils-Baw7rThP.mjs";
6
6
  import { metrics } from "@opentelemetry/api";
7
7
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";