iobroker.eos-admin 8.0.0 → 8.0.1

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 (159) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +7 -6
  2. package/NEXOWATT_EOS_PREBUILT_MANIFEST.json +133 -51
  3. package/START_HERE_8.0.1.md +36 -0
  4. package/adminWww/.vite/manifest.json +39 -39
  5. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
  6. package/adminWww/assets/{AdapterUpdateDialog-B3y8RL_5.js → AdapterUpdateDialog-D3y2bGHM.js} +1 -1
  7. package/adminWww/assets/{Adapters-BDxfhfGe.js → Adapters-WMGNQt7g.js} +1 -1
  8. package/adminWww/assets/{ConfigManager-CFuOc_kb.js → ConfigManager-BMdQoiCg.js} +1 -1
  9. package/adminWww/assets/{Enums-CSzSzWm7.js → Enums-CHm2sGa-.js} +1 -1
  10. package/adminWww/assets/{Fields-DnckPMA8.js → Fields-Df7Llf6U.js} +1 -1
  11. package/adminWww/assets/{Files-CwUHx0pF.js → Files-Bwbw17Fb.js} +1 -1
  12. package/adminWww/assets/{Hosts-QkyuASJy.js → Hosts-BR0g-Wxo.js} +1 -1
  13. package/adminWww/assets/{Instances-BaWBemTT.js → Instances-BKydFSdw.js} +1 -1
  14. package/adminWww/assets/{Intro-DsfrPrWv.js → Intro-Dt2GzmtW.js} +1 -1
  15. package/adminWww/assets/{Logs-Cngy2Opt.js → Logs-hbcdBDN3.js} +1 -1
  16. package/adminWww/assets/{Objects-DY8KS7zK.js → Objects-HPx0yuOk.js} +1 -1
  17. package/adminWww/assets/{Overview-WwP6FjK-.js → Overview-CDvnM655.js} +1 -1
  18. package/adminWww/assets/{State-vP1o2BCL.js → State-Cc-tyuqB.js} +1 -1
  19. package/adminWww/assets/{UsedResources-CMTzFOX3.js → UsedResources-BIdU7UPm.js} +1 -1
  20. package/adminWww/assets/{Users-BjTGOjzL.js → Users-BruHA-yU.js} +1 -1
  21. package/adminWww/assets/{bootstrap-Bs4TZ7iA.js → bootstrap-D-7xcwTc.js} +3 -3
  22. package/adminWww/assets/{hostInit-2xIZYDSq.js → hostInit-huY-0clu.js} +1 -1
  23. package/adminWww/assets/{icons-material-BLgrEUSv.js → icons-material-Bu1f45BT.js} +1 -1
  24. package/adminWww/assets/{index-BZifaJHi.js → index-D8vmzGp8.js} +2 -2
  25. package/adminWww/assets/{installSVGRenderer-Pe6-VnD2.js → installSVGRenderer-BkdptYag.js} +1 -1
  26. package/adminWww/assets/{mf-entry-bootstrap-0-a6a54377.js → mf-entry-bootstrap-0-f6098d8b.js} +2 -2
  27. package/adminWww/index.html +21 -21
  28. package/adminWww/mf-manifest.json +1 -1
  29. package/adminWww/mf-stats.json +1 -1
  30. package/adminWww/{remoteEntry-eos-8.0.0.js → remoteEntry-eos-8.0.1.js} +1 -1
  31. package/adminWww/remoteEntry.js +1 -1
  32. package/build/lib/eosSessionSecurity.js +12 -4
  33. package/build/lib/eosSessionSecurity.js.map +1 -1
  34. package/build/lib/vendor/webserver/LICENSE +21 -0
  35. package/build/lib/vendor/webserver/README.md +506 -0
  36. package/build/lib/vendor/webserver/build/index.d.ts +9 -0
  37. package/build/lib/vendor/webserver/build/index.js +42 -0
  38. package/build/lib/vendor/webserver/build/index.js.map +1 -0
  39. package/build/lib/vendor/webserver/build/lib/acmeChallenge.d.ts +65 -0
  40. package/build/lib/vendor/webserver/build/lib/acmeChallenge.js +149 -0
  41. package/build/lib/vendor/webserver/build/lib/acmeChallenge.js.map +1 -0
  42. package/build/lib/vendor/webserver/build/lib/certificateManager.d.ts +60 -0
  43. package/build/lib/vendor/webserver/build/lib/certificateManager.js +128 -0
  44. package/build/lib/vendor/webserver/build/lib/certificateManager.js.map +1 -0
  45. package/build/lib/vendor/webserver/build/lib/http2Compat.d.ts +21 -0
  46. package/build/lib/vendor/webserver/build/lib/http2Compat.js +109 -0
  47. package/build/lib/vendor/webserver/build/lib/http2Compat.js.map +1 -0
  48. package/build/lib/vendor/webserver/build/lib/oauth2-authcode.d.ts +167 -0
  49. package/build/lib/vendor/webserver/build/lib/oauth2-authcode.js +619 -0
  50. package/build/lib/vendor/webserver/build/lib/oauth2-authcode.js.map +1 -0
  51. package/build/lib/vendor/webserver/build/lib/oauth2-clients.d.ts +92 -0
  52. package/build/lib/vendor/webserver/build/lib/oauth2-clients.js +230 -0
  53. package/build/lib/vendor/webserver/build/lib/oauth2-clients.js.map +1 -0
  54. package/build/lib/vendor/webserver/build/lib/oauth2-model.d.ts +84 -0
  55. package/build/lib/vendor/webserver/build/lib/oauth2-model.js +388 -0
  56. package/build/lib/vendor/webserver/build/lib/oauth2-model.js.map +1 -0
  57. package/build/lib/vendor/webserver/build/lib/oauth2.d.ts +75 -0
  58. package/build/lib/vendor/webserver/build/lib/oauth2.js +625 -0
  59. package/build/lib/vendor/webserver/build/lib/oauth2.js.map +1 -0
  60. package/build/lib/vendor/webserver/build/lib/securityChecker.d.ts +6 -0
  61. package/build/lib/vendor/webserver/build/lib/securityChecker.js +96 -0
  62. package/build/lib/vendor/webserver/build/lib/securityChecker.js.map +1 -0
  63. package/build/lib/vendor/webserver/build/lib/usedResources.d.ts +62 -0
  64. package/build/lib/vendor/webserver/build/lib/usedResources.js +231 -0
  65. package/build/lib/vendor/webserver/build/lib/usedResources.js.map +1 -0
  66. package/build/lib/vendor/webserver/build/lib/utils.d.ts +35 -0
  67. package/build/lib/vendor/webserver/build/lib/utils.js +110 -0
  68. package/build/lib/vendor/webserver/build/lib/utils.js.map +1 -0
  69. package/build/lib/vendor/webserver/build/lib/webServer.d.ts +164 -0
  70. package/build/lib/vendor/webserver/build/lib/webServer.js +454 -0
  71. package/build/lib/vendor/webserver/build/lib/webServer.js.map +1 -0
  72. package/build/lib/vendor/webserver/package.json +63 -0
  73. package/build/lib/web.js +1 -1
  74. package/build/lib/web.js.map +1 -1
  75. package/docs/ADMIN8_MIGRATION_8.0.0_DE.md +2 -0
  76. package/docs/cra/CRA_IEC_GAP_ANALYSIS_2026-09-30.md +5 -0
  77. package/docs/security/admin8-2026-11-04/development-1.log +3 -3
  78. package/docs/security/admin8-2026-11-04/development-2.log +248 -233
  79. package/docs/security/admin8-2026-11-05/copy-update/evidence-sha256.json +0 -5
  80. package/docs/security/admin8-2026-11-05/login-fix/BACKEND_DIAGNOSE_DE.md +48 -0
  81. package/docs/security/admin8-2026-11-05/login-fix/REPORT_DE.md +47 -0
  82. package/docs/security/admin8-2026-11-05/login-fix/REVIEW_DE.md +7 -0
  83. package/docs/security/admin8-2026-11-05/login-fix/controller-adapter-api.ts.txt +122 -0
  84. package/docs/security/admin8-2026-11-05/login-fix/controller-file-view.ts.txt +75 -0
  85. package/docs/security/admin8-2026-11-05/login-fix/controller-redis-view.ts.txt +471 -0
  86. package/docs/security/admin8-2026-11-05/login-fix/dependency/LICENSE-webserver-3.4.0 +21 -0
  87. package/docs/security/admin8-2026-11-05/login-fix/dependency/REPORT_DE.md +41 -0
  88. package/docs/security/admin8-2026-11-05/login-fix/dependency/evidence-sha256.json +116 -0
  89. package/docs/security/admin8-2026-11-05/login-fix/dependency/http-consumer-check.cjs +58 -0
  90. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/README_DE.md +9 -0
  91. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.provenance.json +263 -0
  92. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.tgz +0 -0
  93. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/admission.log +16 -0
  94. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-audit-stderr.log +1 -0
  95. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-audit.json +22 -0
  96. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-fixture-1.0.0.tgz +0 -0
  97. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-fixture-package.json +11 -0
  98. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-npm10-package-lock.json +387 -0
  99. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-npm11-package-lock.json +387 -0
  100. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/evidence-sha256.json +85 -0
  101. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/http-consumer-npm10-node22.json +11 -0
  102. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/http-consumer-npm11-node24.json +11 -0
  103. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/local-tests.json +38 -0
  104. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/tests-node22.log +168 -0
  105. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/tests-node24.log +36 -0
  106. package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests-node22.log +224 -0
  107. package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests-node24.log +42 -0
  108. package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests.json +31 -0
  109. package/docs/security/admin8-2026-11-05/login-fix/dependency/webserver-3.4.0-upstream.tgz +0 -0
  110. package/docs/security/admin8-2026-11-05/login-fix/eos-session-8.0.0.js.txt +385 -0
  111. package/docs/security/admin8-2026-11-05/login-fix/evidence-sha256.json +59 -0
  112. package/docs/security/admin8-2026-11-05/login-fix/path-budget.json +6 -0
  113. package/docs/security/admin8-2026-11-05/login-fix/provenance.json +51 -0
  114. package/docs/security/admin8-2026-11-05/login-fix/release/admission.log +21 -0
  115. package/docs/security/admin8-2026-11-05/login-fix/release/archive-scan.json +13 -0
  116. package/docs/security/admin8-2026-11-05/login-fix/release/artifacts.log +6 -0
  117. package/docs/security/admin8-2026-11-05/login-fix/release/backend-build.log +5 -0
  118. package/docs/security/admin8-2026-11-05/login-fix/release/consumer-package-lock.json +3258 -0
  119. package/docs/security/admin8-2026-11-05/login-fix/release/copy-update-journal.json +165 -0
  120. package/docs/security/admin8-2026-11-05/login-fix/release/development.log +365 -0
  121. package/docs/security/admin8-2026-11-05/login-fix/release/frontend-build.log +149 -0
  122. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-audit.json +22 -0
  123. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-audit.stderr +2 -0
  124. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-final-install-node22.log +9 -0
  125. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node22.json +15 -0
  126. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node22.stderr +2 -0
  127. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node24.json +15 -0
  128. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node24.stderr +0 -0
  129. package/docs/security/admin8-2026-11-05/login-fix/release/inventory.log +8 -0
  130. package/docs/security/admin8-2026-11-05/login-fix/release/npm-pack-final.json +7809 -0
  131. package/docs/security/admin8-2026-11-05/login-fix/release/npm-pack-final.stderr +6 -0
  132. package/docs/security/admin8-2026-11-05/login-fix/release/overlay-final-publish-node22.json +10213 -0
  133. package/docs/security/admin8-2026-11-05/login-fix/release/overlay-final-publish-node22.stderr +282 -0
  134. package/docs/security/admin8-2026-11-05/login-fix/release/pipeline.json +72 -0
  135. package/docs/security/admin8-2026-11-05/login-fix/release/seal.log +6 -0
  136. package/docs/security/admin8-2026-11-05/login-fix/release/vendor-final-review-node24.log +18 -0
  137. package/docs/security/admin8-2026-11-05/login-fix/reproduce.cjs +79 -0
  138. package/docs/security/admin8-2026-11-05/login-fix/reproduction.json +80 -0
  139. package/docs/security/admin8-2026-11-05/login-fix/upstream-LICENSE.txt +22 -0
  140. package/docs/security/admin8-2026-11-05/login-fix/validation.json +85 -0
  141. package/docs/third-party/admin8/NOTICE-PROVENANCE.json +3 -3
  142. package/io-package.json +9 -10
  143. package/package.json +9 -4
  144. package/release-manifests/admin8-development-validation.json +114 -31
  145. package/reports/security/artifact-inventory.json +462 -227
  146. package/reports/security/inventory-summary.json +39 -17
  147. package/reports/security/sbom-backend-lock.cdx.json +108 -111
  148. package/reports/security/sbom-frontend-lock.cdx.json +5 -5
  149. package/reports/security/source-runtime-manifest.json +455 -65
  150. package/tools/nexowatt-artifact-inventory.cjs +8 -1
  151. package/tools/nexowatt-installer-ems-selftest.cjs +1 -1
  152. package/tools/nexowatt-lock-provenance-check.cjs +8 -3
  153. package/tools/nexowatt-repair-lock-metadata.cjs +3 -3
  154. package/tools/nexowatt-security-inventory.cjs +22 -1
  155. package/tools/nexowatt-user-area-selftest.cjs +1 -1
  156. package/tools/nexowatt-v7109-clean-core-selftest.cjs +1 -1
  157. package/tools/nexowatt-vendored-webserver.cjs +69 -0
  158. package/tools/vendor/eos-retired-release-files.json +73 -1
  159. package/tools/vendor/webserver-3.4.0-source.provenance.json +244 -0
@@ -0,0 +1,385 @@
1
+ 'use strict';
2
+
3
+ // EOS session boundary. Stored tokens are capabilities: a refreshed capability may
4
+ // inherit an existing proof, but must never acquire a new proof merely by being saved.
5
+ const { AsyncLocalStorage } = require('node:async_hooks');
6
+ const { createHash, randomBytes } = require('node:crypto');
7
+ const STAMP = 'nexowattEosSessionV1';
8
+ const normalizeUser = value =>
9
+ typeof value === 'string' && /^(?:system\.user\.)?[A-Za-z0-9_.@-]{1,128}$/.test(value)
10
+ ? value.startsWith('system.user.')
11
+ ? value
12
+ : `system.user.${value}`
13
+ : null;
14
+ const failure = () => new Error('EOS_SESSION_REAUTHENTICATION_REQUIRED');
15
+ function stable(value, depth = 0) {
16
+ if (depth > 12) {
17
+ throw failure();
18
+ }
19
+ if (Array.isArray(value)) {
20
+ return value.map(item => stable(item, depth + 1));
21
+ }
22
+ if (value && typeof value === 'object') {
23
+ return Object.fromEntries(
24
+ Object.keys(value)
25
+ .sort()
26
+ .map(key => [key, stable(value[key], depth + 1)]),
27
+ );
28
+ }
29
+ return value;
30
+ }
31
+ function securityProjection(id, object) {
32
+ if (!object) {
33
+ return null;
34
+ }
35
+ if (id.startsWith('system.user.')) {
36
+ const native = object.native || {};
37
+ return [
38
+ object.type,
39
+ object.common?.password,
40
+ object.common?.enabled !== false,
41
+ object.acl,
42
+ native.nexowattEosAccount?.forcePasswordChange === true,
43
+ native.nexowattPasswordChangeRequired === true,
44
+ native.eosPasswordChangeRequired === true,
45
+ ];
46
+ }
47
+ if (id.startsWith('system.group.')) {
48
+ return [object.type, [...(object.common?.members || [])].sort(), object.common?.acl, object.acl];
49
+ }
50
+ return null;
51
+ }
52
+
53
+ class EosSessionSecurity {
54
+ constructor(adapter, options = {}) {
55
+ this.adapter = adapter;
56
+ this.epoch = randomBytes(32).toString('hex');
57
+ this.context = new AsyncLocalStorage();
58
+ this.proofs = new WeakMap();
59
+ this.connections = new Map();
60
+ this.maxPending = options.maxPending || 32;
61
+ this.timeoutMs = options.timeoutMs || 2000;
62
+ this.pending = 0;
63
+ this.stopped = false;
64
+ this.getOriginal = adapter.getSession.bind(adapter);
65
+ this.setOriginal = adapter.setSession.bind(adapter);
66
+ this.socketAdmin = null;
67
+ adapter.getSession = (id, callback) => {
68
+ const task = this.bounded(async () => {
69
+ if (typeof id !== 'string' || !/^[ar]:/.test(id) || id.length > 4098) {
70
+ return null;
71
+ }
72
+ const data = await new Promise(resolve => this.getOriginal(id, resolve));
73
+ const stamp = data?.[STAMP];
74
+ const expiry = id.startsWith('a:') ? data?.aExp : data?.rExp;
75
+ if (!stamp || stamp.epoch !== this.epoch || !Number.isFinite(expiry) || expiry <= Date.now()) {
76
+ return null;
77
+ }
78
+ const proof = await this.snapshot(data.user);
79
+ return this.matches(stamp, proof) ? data : null;
80
+ }).catch(() => null);
81
+ if (typeof callback === 'function') {
82
+ void task.then(callback);
83
+ return;
84
+ }
85
+ return task;
86
+ };
87
+ adapter.setSession = (id, ttl, data, callback) => {
88
+ const proof = this.context.getStore();
89
+ const task = this.bounded(async () => {
90
+ if (!proof || !/^[ar]:/.test(id) || !this.matches(proof, await this.snapshot(data?.user))) {
91
+ throw failure();
92
+ }
93
+ const stamped = { ...data, [STAMP]: { ...proof } };
94
+ await new Promise((resolve, reject) =>
95
+ this.setOriginal(id, ttl, stamped, error => (error ? reject(error) : resolve())),
96
+ );
97
+ if (proof.epoch !== this.epoch || this.stopped) {
98
+ throw failure();
99
+ }
100
+ });
101
+ if (typeof callback === 'function') {
102
+ void task.then(
103
+ () => callback(null),
104
+ () => callback(failure()),
105
+ );
106
+ return;
107
+ }
108
+ return task;
109
+ };
110
+ }
111
+
112
+ bounded(operation) {
113
+ if (this.stopped || this.pending >= this.maxPending) {
114
+ return Promise.reject(failure());
115
+ }
116
+ this.pending++;
117
+ // A timed-out database operation keeps its slot until it really settles. Repeated
118
+ // timeouts cannot create an unbounded backlog in a disconnected controller.
119
+ const work = Promise.resolve()
120
+ .then(operation)
121
+ .finally(() => {
122
+ this.pending--;
123
+ });
124
+ return new Promise((resolve, reject) => {
125
+ const timer = setTimeout(() => reject(failure()), this.timeoutMs);
126
+ work.then(
127
+ value => {
128
+ clearTimeout(timer);
129
+ resolve(value);
130
+ },
131
+ error => {
132
+ clearTimeout(timer);
133
+ reject(error);
134
+ },
135
+ );
136
+ });
137
+ }
138
+
139
+ async snapshot(candidate) {
140
+ const userId = normalizeUser(candidate);
141
+ if (!userId || this.stopped) {
142
+ throw failure();
143
+ }
144
+ const epoch = this.epoch;
145
+ const [user, result] = await Promise.all([
146
+ this.adapter.getForeignObjectAsync(userId),
147
+ this.adapter.getObjectViewAsync('system', 'group', {
148
+ startkey: 'system.group.',
149
+ endkey: 'system.group.\u9999',
150
+ }),
151
+ ]);
152
+ if (
153
+ !user ||
154
+ user.type !== 'user' ||
155
+ user.common?.enabled === false ||
156
+ typeof user.common?.password !== 'string' ||
157
+ !user.common.password ||
158
+ !Array.isArray(result?.rows) ||
159
+ result.rows.length > 1024 ||
160
+ epoch !== this.epoch ||
161
+ this.stopped
162
+ ) {
163
+ throw failure();
164
+ }
165
+ const groups = result.rows
166
+ .map(row => {
167
+ if (
168
+ !row?.value ||
169
+ row.value.type !== 'group' ||
170
+ typeof row.id !== 'string' ||
171
+ !row.id.startsWith('system.group.')
172
+ ) {
173
+ throw failure();
174
+ }
175
+ return [row.id, securityProjection(row.id, row.value)];
176
+ })
177
+ .sort((a, b) => a[0].localeCompare(b[0]));
178
+ const text = JSON.stringify(stable([userId, securityProjection(userId, user), groups]));
179
+ if (Buffer.byteLength(text) > 1024 * 1024) {
180
+ throw failure();
181
+ }
182
+ return { epoch, userId, fingerprint: createHash('sha256').update(text).digest('hex') };
183
+ }
184
+
185
+ matches(a, b) {
186
+ return (
187
+ !this.stopped &&
188
+ a?.epoch === this.epoch &&
189
+ a?.epoch === b?.epoch &&
190
+ a?.userId === b?.userId &&
191
+ a?.fingerprint === b?.fingerprint
192
+ );
193
+ }
194
+
195
+ bindOAuthModel(model) {
196
+ for (const name of ['getUser', 'getRefreshToken', 'saveToken']) {
197
+ if (typeof model?.[name] !== 'function') {
198
+ throw failure();
199
+ }
200
+ }
201
+ const getUser = model.getUser.bind(model);
202
+ const getRefresh = model.getRefreshToken.bind(model);
203
+ const save = model.saveToken.bind(model);
204
+ model.getUser = async (name, password) => {
205
+ try {
206
+ return await this.bounded(async () => {
207
+ const before = await this.snapshot(name);
208
+ const user = await getUser(name, password);
209
+ if (!user || !this.matches(before, await this.snapshot(user.id))) {
210
+ return null;
211
+ }
212
+ this.proofs.set(user, before);
213
+ return user;
214
+ });
215
+ } catch {
216
+ return null;
217
+ }
218
+ };
219
+ model.getRefreshToken = async token => {
220
+ try {
221
+ return await this.bounded(async () => {
222
+ const stored = await new Promise(resolve => this.adapter.getSession(`r:${token}`, resolve));
223
+ if (!stored?.[STAMP]) {
224
+ return null;
225
+ }
226
+ const result = await getRefresh(token);
227
+ if (!result?.user || !this.matches(stored[STAMP], await this.snapshot(result.user.id))) {
228
+ return null;
229
+ }
230
+ this.proofs.set(result.user, stored[STAMP]);
231
+ return result;
232
+ });
233
+ } catch {
234
+ return null;
235
+ }
236
+ };
237
+ model.saveToken = async (token, client, user) => {
238
+ const proof = user && this.proofs.get(user);
239
+ if (!proof) {
240
+ throw failure();
241
+ }
242
+ return this.bounded(async () => {
243
+ if (!this.matches(proof, await this.snapshot(user.id))) {
244
+ throw failure();
245
+ }
246
+ return this.context.run(proof, () => save(token, client, user));
247
+ });
248
+ };
249
+ }
250
+
251
+ handleObjectChange(id, object, previous) {
252
+ if (!/^system\.(?:user|group)\./.test(id)) {
253
+ return;
254
+ }
255
+ try {
256
+ if (
257
+ JSON.stringify(stable(securityProjection(id, object))) ===
258
+ JSON.stringify(stable(securityProjection(id, previous)))
259
+ ) {
260
+ return;
261
+ }
262
+ } catch {
263
+ /* Malformed security objects also revoke all sessions. */
264
+ }
265
+ this.revoke();
266
+ }
267
+
268
+ revoke() {
269
+ this.epoch = randomBytes(32).toString('hex');
270
+ for (const client of this.connections.keys()) {
271
+ this.disconnect(client);
272
+ }
273
+ }
274
+
275
+ disconnect(client) {
276
+ const record = this.connections.get(client);
277
+ if (record) {
278
+ record.revoked = true;
279
+ }
280
+ this.connections.delete(client);
281
+ try {
282
+ this.socketAdmin?.unsubscribeSocket(client);
283
+ } catch {
284
+ /* transport still closes */
285
+ }
286
+ try {
287
+ client.emit?.('reauthenticate');
288
+ } catch {
289
+ /* transport still closes */
290
+ }
291
+ try {
292
+ if (typeof client.disconnect === 'function') {
293
+ client.disconnect(true);
294
+ } else {
295
+ client.close?.();
296
+ }
297
+ } catch {
298
+ /* command and publication guards remain denied */
299
+ }
300
+ }
301
+
302
+ isSocketAllowed(client) {
303
+ const record = this.connections.get(client);
304
+ return !!record && !record.revoked && !this.stopped && record.epoch === this.epoch;
305
+ }
306
+
307
+ bindSockets(socketAdmin) {
308
+ if (
309
+ typeof socketAdmin.addEventHandler !== 'function' ||
310
+ typeof socketAdmin.__updateSession !== 'function' ||
311
+ typeof socketAdmin.__getUserFromSocket !== 'function'
312
+ ) {
313
+ throw failure();
314
+ }
315
+ this.socketAdmin = socketAdmin;
316
+ socketAdmin.addEventHandler('connect', client => {
317
+ if (this.connections.size >= 256) {
318
+ this.disconnect(client);
319
+ return;
320
+ }
321
+ this.connections.set(client, { epoch: this.epoch, revoked: false });
322
+ // Also clean up connections that close before upstream installs its post-auth hooks.
323
+ client.on?.('disconnect', () => this.connections.delete(client));
324
+ });
325
+ socketAdmin.addEventHandler('disconnect', client => this.connections.delete(client));
326
+ const update = socketAdmin.__updateSession.bind(socketAdmin);
327
+ socketAdmin.__updateSession = client => this.isSocketAllowed(client) && update(client);
328
+ const originalAuth = socketAdmin.__getUserFromSocket.bind(socketAdmin);
329
+ socketAdmin.__getUserFromSocket = (client, callback) => {
330
+ const epoch = this.epoch;
331
+ originalAuth(client, (error, user, expiry) => {
332
+ if (error || epoch !== this.epoch || !this.isSocketAllowed(client)) {
333
+ this.disconnect(client);
334
+ callback('reauthentication required');
335
+ return;
336
+ }
337
+ void this.bounded(() => this.snapshot(user)).then(
338
+ proof => {
339
+ if (epoch !== this.epoch || !this.isSocketAllowed(client)) {
340
+ this.disconnect(client);
341
+ callback('reauthentication required');
342
+ return;
343
+ }
344
+ this.connections.get(client).proof = proof;
345
+ callback(null, user, expiry);
346
+ },
347
+ () => {
348
+ this.disconnect(client);
349
+ callback('reauthentication required');
350
+ },
351
+ );
352
+ });
353
+ };
354
+ // Polling is an additional missed-event safeguard, not a grace period for normal
355
+ // user/group events: those call revoke synchronously before publication.
356
+ this.timer = setInterval(() => {
357
+ for (const [client, record] of this.connections) {
358
+ if (!record.proof || record.checking || record.revoked) {
359
+ continue;
360
+ }
361
+ record.checking = true;
362
+ void this.bounded(() => this.snapshot(record.proof.userId))
363
+ .then(
364
+ current => {
365
+ if (!this.matches(record.proof, current)) {
366
+ this.disconnect(client);
367
+ }
368
+ },
369
+ () => this.disconnect(client),
370
+ )
371
+ .finally(() => {
372
+ record.checking = false;
373
+ });
374
+ }
375
+ }, 5000);
376
+ this.timer.unref?.();
377
+ }
378
+
379
+ stop() {
380
+ this.stopped = true;
381
+ clearInterval(this.timer);
382
+ this.revoke();
383
+ }
384
+ }
385
+ module.exports = { EosSessionSecurity, securityProjection };
@@ -0,0 +1,59 @@
1
+ {
2
+ "BACKEND_DIAGNOSE_DE.md": "b7df0839e0642ebfa06590f30fd567034979dc07a9c001de95bdcbc0c10254c9",
3
+ "REPORT_DE.md": "6d1bede980f278f37f6a2dbb46f9e719bf81454558e91046876561a96ca84b13",
4
+ "REVIEW_DE.md": "5e3d9436499ab593b7556c20351103755c743b5e10e575d0b45e213fd2b8134f",
5
+ "controller-adapter-api.ts.txt": "26ed6127137c83757c52a80bfb3860bd56b4e29380372cdcd80c156949d0cfb8",
6
+ "controller-file-view.ts.txt": "6d33874c283db09212cc2de1e9713ea3363778a99c4989824a5ec041fe6b1681",
7
+ "controller-redis-view.ts.txt": "116bc9dbced45f5a4b033038726ebf7af14a53fff8eb7669e562d04b811abf61",
8
+ "dependency/LICENSE-webserver-3.4.0": "25eafd015052f4cacfaaecf7625544f1f546cf9ead289bd0e5b1f43f709db8a7",
9
+ "dependency/REPORT_DE.md": "4c08e89eb31a7d156e599e2120c1f23680e3391f343d1dd4934ade4499055a2d",
10
+ "dependency/http-consumer-check.cjs": "d165d32a4c0f41cbbd4fd94e281d0331950fecbbd34e582430f741b3c139d59c",
11
+ "dependency/rejected-file-dependency/README_DE.md": "40feacad6b9944f0bb7c4156235e1140ebcbef23e33a75e4d1bd634b54bf483b",
12
+ "dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.provenance.json": "3c6c0d8730b860ab0c4d14f17c52fb67bc3a1f75e89f4bd5f41842aceac91046",
13
+ "dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.tgz": "f573360951178d7bd2f99f21c2eaf0387e49c7eda600e73c208b7ab9c75a834b",
14
+ "dependency/rejected-file-dependency/admission.log": "5b2dd7c04429a96ffceaf29b915d16700f6597c50b7525ad0c36965fc38541d1",
15
+ "dependency/rejected-file-dependency/consumer-audit-stderr.log": "7125f194612fcff2f454c05d848e7cb71facc1967b4d5017e25b34fdee3ba74f",
16
+ "dependency/rejected-file-dependency/consumer-audit.json": "7f0f91830389a0004cc7ee6e3040fe69d006281ba3be53c7bd9f8aa877dd3477",
17
+ "dependency/rejected-file-dependency/consumer-fixture-1.0.0.tgz": "ce8207401e0e5b2f034bcf9eb9b7696e7aab77dba8e94140491140b03e789e1d",
18
+ "dependency/rejected-file-dependency/consumer-fixture-package.json": "ff8be6e3fe2de0a0d23436018442dcac38ce1b4b1096be8a8407c5c6114f157b",
19
+ "dependency/rejected-file-dependency/consumer-npm10-package-lock.json": "c0df5aa1457236f27ed5eac861a994aeca1e87328ce7b554c695ee80cef1c7a7",
20
+ "dependency/rejected-file-dependency/consumer-npm11-package-lock.json": "c0df5aa1457236f27ed5eac861a994aeca1e87328ce7b554c695ee80cef1c7a7",
21
+ "dependency/rejected-file-dependency/http-consumer-npm10-node22.json": "9592910adc15278fd6d4ec2082f405fdcf2524aeb7f198452979544323f53f35",
22
+ "dependency/rejected-file-dependency/http-consumer-npm11-node24.json": "2e7f1aedb42e5ab68ee74331370ee6e4ecf4df36643206715979a9ee260628a5",
23
+ "dependency/rejected-file-dependency/local-tests.json": "f2311c0456437e61d055f0761229bafe460e8647f6a2977ad5630b08aa734a52",
24
+ "dependency/rejected-file-dependency/tests-node22.log": "7f21cd2414a69def85dec6b7e42769e3bf5cd4371836e33396867729a77d2e61",
25
+ "dependency/rejected-file-dependency/tests-node24.log": "f5de5d65544a30be1b1ca0d04066b1e50299999a47268170488ba6a2a5f09eb6",
26
+ "dependency/source-vendor-tests-node22.log": "ce843e49da1fcad41187a952d738c6ea933eb87a28bd9da7658d847c6f8fde94",
27
+ "dependency/source-vendor-tests-node24.log": "f06b1b7ab59c3e43e9969f5a6f34a5903ff6dd3843f43ffb06432dac6e9939f6",
28
+ "dependency/source-vendor-tests.json": "37095fad7b5c64425f0ebd04d3bdd61dceb486da37f8232ddc8640dbcfa0945e",
29
+ "dependency/webserver-3.4.0-upstream.tgz": "9da0473e723b0863ac1e1d2622e4ed268fa332d7f82448201692f213346ebf32",
30
+ "eos-session-8.0.0.js.txt": "c408afc041cbe055dcacdd3aa16f65cac539ad0a9c830ee2204eed6f07d961bf",
31
+ "path-budget.json": "20c3369fd02a49d11fd72df46616d1b43fe5a2206fd407304b0f1559c0b7acdc",
32
+ "provenance.json": "4636be019baf6f6357c53ec0ef2725eb9b1182d0fae5ff0e36249698a7bc92b6",
33
+ "release/admission.log": "5999fdc93e32ec19b3f2ad9b9d25da062050b4d80c1fcb055bad76b67005ae8d",
34
+ "release/artifacts.log": "a2337d96640ebedb86c9afae52d40a74bd237e3ec75ffb799122bf03897c364c",
35
+ "release/backend-build.log": "9e2217b2411939bc31aab538d4a8a1e51f3cff2fedce23b465a162f5f3ac9a8d",
36
+ "release/consumer-package-lock.json": "a38ecb63c679e8cd2d737774b3e18163f5f19a233227fe65b22c7f39e2c81123",
37
+ "release/copy-update-journal.json": "287ed4f50cdf0b916aa21afca1e87e1a661f92bc33f5348723c019fcfeec4b21",
38
+ "release/development.log": "4ab383095ee708b190eb33c19f1878ab169092962ae57c8ed74b4c72c3478806",
39
+ "release/frontend-build.log": "cf5d4d53a866eb637984a27fb96e8fa682d52ccc8e571d129da8666128e68540",
40
+ "release/full-consumer-audit.json": "7b53c75218b00a3909b5074e81d525611cf857a7f56ca1c2741e45b4dc59bbce",
41
+ "release/full-consumer-audit.stderr": "db12ad97221988bf346c55d06788e21a01bb6a683d69266bf732ed4d6d9763c8",
42
+ "release/full-consumer-final-install-node22.log": "a3d7df7bb80a3a9b4feb3ce97c46187b2c346b331cf3469ce512c8c2f5f24b94",
43
+ "release/full-consumer-http-node22.json": "2bc393d3c056aaad9922a7b0aa00898d117e9d34b099f39ef90cf22438401f23",
44
+ "release/full-consumer-http-node22.stderr": "db12ad97221988bf346c55d06788e21a01bb6a683d69266bf732ed4d6d9763c8",
45
+ "release/full-consumer-http-node24.json": "036a4d9700f8ad0b001ad3105550b0d68f78b4db52c1ef89acb58f6221e21a9e",
46
+ "release/full-consumer-http-node24.stderr": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
47
+ "release/inventory.log": "2f7c20c53ab0d255828dd2605a31523d66b3a31b9f9fc5752c1ff76b88924b0e",
48
+ "release/npm-pack-final.json": "bc4dad6d57edec8192f3a1164461973ea2ce2fde96c3dbf4e8d66635ffb1a819",
49
+ "release/npm-pack-final.stderr": "4d9ef7168290b744c78eec62c34d47cbafb3fa330e2aa792cb0dfdbbef21bd5f",
50
+ "release/overlay-final-publish-node22.json": "f3b72188101587be87662c8150ff1bc1934225b3b3dae0dc546242d4793d9182",
51
+ "release/overlay-final-publish-node22.stderr": "1a4257318becdd72b748d19ae87aef7c1c60da4b593a07f1151e0f91dfc404d8",
52
+ "release/pipeline.json": "d858e6f056ad8d012ce788fbecf9e47f77b159255d7d5f156ed6100253753292",
53
+ "release/seal.log": "7fcf8f1a6ea65d781980e13e1bbb3d38fd08546ebe58d9cb2647791e6ece0a5f",
54
+ "release/vendor-final-review-node24.log": "25582eaeb6234290d253e0cf7c3a23e1b56a3dbc72121bd9940cc617baf3e2a5",
55
+ "reproduce.cjs": "23213386a706c6c4c4926c016b6495c1252c0f98304aa5f699dbbc4eb0e52c5b",
56
+ "reproduction.json": "21586248148b63198683763da1416614ca35f9ac89f7f7f247119b74d7bf8ac2",
57
+ "upstream-LICENSE.txt": "315fb419f7d7f93e32f19e78fb84dabe20e39a5e5b9fa1ed7f5abd2c30204780",
58
+ "validation.json": "11d89c3ab3d1b9f558039ca525125c3965848019378c99dfcfc1e0f4a1c867e2"
59
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "target": "C:\\Users\\User\\Desktop\\ioBroker\\ioBroker.eos.admin\\",
3
+ "maxChars": 248,
4
+ "longestPath": "docs/ea/upstream-source-proof/admin/custom/assets/_virtual_mf___mfe_internal__AdminComponentEasyAccessSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-wBTkI4zM.js",
5
+ "limit": 248
6
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "date": "2026-11-05",
3
+ "controllerVersion": "7.2.5",
4
+ "commit": "e4c842b9056eb5b0b18bb56e70611821ecb3cc80",
5
+ "sources": [
6
+ {
7
+ "url": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/e4c842b9056eb5b0b18bb56e70611821ecb3cc80/packages/controller/io-package.json",
8
+ "sha256": "d5b4e15ff0ffca3d0f0c2691271b6a2d5562f6edd0a68aefa3f1326a0017c6c6"
9
+ },
10
+ {
11
+ "url": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/e4c842b9056eb5b0b18bb56e70611821ecb3cc80/packages/db-objects-redis/src/lib/objects/objectsInRedisClient.ts",
12
+ "sha256": "935c9816147bfbc3612fcbe133a1b2c280d7fcc6ffd63fb68884938dc94360e8"
13
+ },
14
+ {
15
+ "url": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/e4c842b9056eb5b0b18bb56e70611821ecb3cc80/packages/db-objects-file/src/lib/objects/objectsInMemFileDB.ts",
16
+ "sha256": "5fb4e31c49e1aa0f6446554725dc2dfcfbb21ef468671084c601913cd231b6a6"
17
+ },
18
+ {
19
+ "url": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/e4c842b9056eb5b0b18bb56e70611821ecb3cc80/packages/adapter/src/lib/adapter/adapter.ts",
20
+ "sha256": "65ee2afaa2250258e850b50e01be14fad7f276bb92f329a68bccc6f2dcc43f1b"
21
+ }
22
+ ],
23
+ "excerpts": [
24
+ {
25
+ "file": "controller-file-view.ts.txt",
26
+ "kind": "exact method extraction",
27
+ "method": "_applyView",
28
+ "sourceUrl": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/e4c842b9056eb5b0b18bb56e70611821ecb3cc80/packages/db-objects-file/src/lib/objects/objectsInMemFileDB.ts",
29
+ "sourceSha256": "5fb4e31c49e1aa0f6446554725dc2dfcfbb21ef468671084c601913cd231b6a6",
30
+ "sourceStartLine": 1127,
31
+ "sourceEndLine": 1201,
32
+ "sha256": "6d33874c283db09212cc2de1e9713ea3363778a99c4989824a5ec041fe6b1681"
33
+ },
34
+ {
35
+ "file": "controller-redis-view.ts.txt",
36
+ "kind": "exact method extraction",
37
+ "method": "_applyViewFunc",
38
+ "sourceUrl": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/e4c842b9056eb5b0b18bb56e70611821ecb3cc80/packages/db-objects-redis/src/lib/objects/objectsInRedisClient.ts",
39
+ "sourceSha256": "935c9816147bfbc3612fcbe133a1b2c280d7fcc6ffd63fb68884938dc94360e8",
40
+ "sourceStartLine": 4604,
41
+ "sourceEndLine": 5074,
42
+ "sha256": "116bc9dbced45f5a4b033038726ebf7af14a53fff8eb7669e562d04b811abf61"
43
+ }
44
+ ],
45
+ "oldSessionSourceSha256": "c408afc041cbe055dcacdd3aa16f65cac539ad0a9c830ee2204eed6f07d961bf",
46
+ "fixture": {
47
+ "path": "test/fixtures/controller-7.2.5-group-view.json",
48
+ "sha256": "8096a59c3a8551e7983ccd6cf58acaf61ae350276921fe5ed875bc603ec8b8f9"
49
+ },
50
+ "license": "Upstream controller excerpts: MIT; Copyright 2013-2026 bluefox <dogafox@gmail.com>. See upstream-LICENSE.txt."
51
+ }
@@ -0,0 +1,21 @@
1
+ npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
2
+
3
+ > iobroker.eos-admin@8.0.1 check:eos-production-release
4
+ > node tools/nexowatt-lock-provenance-check.cjs
5
+
6
+ {
7
+ "schemaVersion": 1,
8
+ "generatedAt": "2026-11-05T07:47:17.913Z",
9
+ "status": "PASS",
10
+ "limitations": "Registry lock metadata admission plus exact source/runtime-byte verification of the vendored original WebServer and its direct dependencies; no CVE scan or publisher attestation.",
11
+ "scopes": [
12
+ {
13
+ "name": "backend",
14
+ "issues": []
15
+ },
16
+ {
17
+ "name": "frontend",
18
+ "issues": []
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "scope": "All delivered archive members scanned heuristically for PEM private key markers and common GitHub/npm/AWS/OpenAI credential patterns.",
3
+ "findings": [
4
+ {
5
+ "path": "CHANGELOG_OLD.md",
6
+ "line": 2002,
7
+ "classification": "false positive",
8
+ "reason": "Historical upstream changelog mentions the PEM opening marker as certificate format support; no closing marker or private key body."
9
+ }
10
+ ],
11
+ "newCredentialsFound": false,
12
+ "limitation": "Heuristic pattern scan is not exhaustive secret detection."
13
+ }
@@ -0,0 +1,6 @@
1
+ npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
2
+
3
+ > iobroker.eos-admin@8.0.1 security:artifacts
4
+ > node tools/nexowatt-artifact-inventory.cjs
5
+
6
+ {"status":"RESOLVED_WITH_DECLARED_LIMITATIONS","installed":[{"label":"backend","count":746,"absentOptional":26,"failures":0},{"label":"frontend","count":559,"absentOptional":23,"failures":0}],"frontend":{"chunks":72,"packages":168,"vendoredPackages":1,"modules":13945,"unclassified":0},"optionalPeers":[{"label":"backend","unresolved":6,"verifiedOptional":6},{"label":"frontend","unresolved":22,"verifiedOptional":22}],"licenseNotices":{"report":"docs/third-party/admin8/NOTICE-PROVENANCE.json","packages":171,"files":177,"missing":[{"name":"size-sensor","version":"1.0.2","scope":"frontend"}]}}
@@ -0,0 +1,5 @@
1
+ npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
2
+
3
+ > iobroker.eos-admin@8.0.1 build:backend
4
+ > tsc -p tsconfig.build.json && node --import tsx tasks.mts --backend-i18n
5
+