@camstack/server 1.2.129 → 1.2.130
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.
|
@@ -28,11 +28,24 @@ exports.createAddonSettingsRouter = createAddonSettingsRouter;
|
|
|
28
28
|
* the whole per-key set, so a write here deletes every other row of that addon
|
|
29
29
|
* in this table.
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
31
|
+
* ## ⚠️ ADMIN-ONLY — every method here is `adminProcedure`
|
|
32
|
+
*
|
|
33
|
+
* Reads (`getGlobal` / `getDeviceOverrides`) return RAW, un-redacted addon
|
|
34
|
+
* config — the same blob that holds notifier tokens, webhook secrets and API
|
|
35
|
+
* keys; writes (`updateGlobal` / `updateDevice` / `replaceGlobal`) overwrite it
|
|
36
|
+
* with no schema gate. Before 2026-08-13 these were `protectedProcedure`, so
|
|
37
|
+
* any authenticated non-admin token could read and rewrite every addon's
|
|
38
|
+
* config. The `:139` comment claimed "only workers with valid hub tokens can
|
|
39
|
+
* call this" but nothing enforced it.
|
|
40
|
+
*
|
|
41
|
+
* Gating with `adminProcedure` costs the legitimate callers NOTHING: this
|
|
42
|
+
* router is in `CORE_NAMESPACES` (`core-cap-bridge.ts`), so a forked addon's
|
|
43
|
+
* `ctx.api.addonSettingsRaw.*` arrives over the trusted core-cap/UDS mesh whose
|
|
44
|
+
* context is `createMeshTrpcContext` (`isAdmin: true`), and the admin UI is an
|
|
45
|
+
* admin session. The two consumers:
|
|
46
|
+
* 1. Forked addons (via `ctx.api` over the mesh) reading/writing their
|
|
47
|
+
* 3-level settings chain from the worker process.
|
|
48
|
+
* 2. Admin UI flows inspecting/mutating addon settings.
|
|
36
49
|
*
|
|
37
50
|
* The router is deliberately thin — it does NOT perform schema-based
|
|
38
51
|
* resolver merging (defaults → global → per-device). That happens on the
|
|
@@ -89,6 +89,12 @@ function serializeRecentEvent(e) {
|
|
|
89
89
|
}
|
|
90
90
|
function createEventBusProxyRouter(eventBus) {
|
|
91
91
|
return (0, trpc_middleware_js_1.trpcRouter)({
|
|
92
|
+
// ADMIN-ONLY. `emit` injects a fully-attributed SystemEvent onto the hub's
|
|
93
|
+
// real EventBus — including a spoofable `source` (a fake `device`/`addon`
|
|
94
|
+
// origin). Forked addons that legitimately emit reach this over the
|
|
95
|
+
// trusted core-cap/UDS mesh, whose context is `createMeshTrpcContext`
|
|
96
|
+
// (`isAdmin: true`), so gating it here withholds the surface from
|
|
97
|
+
// non-admin HTTP/WS principals without blinding a worker.
|
|
92
98
|
emit: trpc_middleware_js_1.adminProcedure
|
|
93
99
|
.input(SystemEventInputSchema)
|
|
94
100
|
.output(zod_1.z.object({ ok: zod_1.z.literal(true) }))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.130",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
37
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
38
|
-
"@camstack/addon-auth": "1.2.
|
|
39
|
-
"@camstack/addon-decoder-nodeav": "1.2.
|
|
40
|
-
"@camstack/addon-notifiers": "1.2.
|
|
41
|
-
"@camstack/addon-pipeline": "1.2.
|
|
42
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
43
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
44
|
-
"@camstack/sdk": "1.2.
|
|
45
|
-
"@camstack/shm-ring": "1.1.
|
|
46
|
-
"@camstack/system": "1.2.
|
|
47
|
-
"@camstack/types": "1.2.
|
|
48
|
-
"@camstack/ui-library": "1.2.
|
|
36
|
+
"@camstack/addon-admin-ui": "1.2.78",
|
|
37
|
+
"@camstack/addon-agent-ui": "1.2.21",
|
|
38
|
+
"@camstack/addon-auth": "1.2.23",
|
|
39
|
+
"@camstack/addon-decoder-nodeav": "1.2.20",
|
|
40
|
+
"@camstack/addon-notifiers": "1.2.25",
|
|
41
|
+
"@camstack/addon-pipeline": "1.2.95",
|
|
42
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.78",
|
|
43
|
+
"@camstack/addon-post-analysis": "1.2.93",
|
|
44
|
+
"@camstack/sdk": "1.2.23",
|
|
45
|
+
"@camstack/shm-ring": "1.1.20",
|
|
46
|
+
"@camstack/system": "1.2.104",
|
|
47
|
+
"@camstack/types": "1.2.87",
|
|
48
|
+
"@camstack/ui-library": "1.2.59",
|
|
49
49
|
"@fastify/compress": "^9.0.0",
|
|
50
50
|
"@fastify/cookie": "^11.0.2",
|
|
51
51
|
"@fastify/cors": "^11.2.0",
|