iobroker.eos-admin 8.0.0 → 8.0.2
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/NEXOWATT_EOS_BUILD_INFO.json +7 -6
- package/NEXOWATT_EOS_PREBUILT_MANIFEST.json +195 -107
- package/START_HERE_8.0.1.md +36 -0
- package/START_HERE_8.0.2.md +41 -0
- package/adminWww/.vite/manifest.json +278 -278
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +333 -329
- package/adminWww/assets/{AccessTime-Dpa6PKHY.js → AccessTime-5f47qrw7.js} +1 -1
- package/adminWww/assets/{AceEditor-DTzNaeVy.js → AceEditor-CJ-_Ev2E.js} +1 -1
- package/adminWww/assets/{AdapterUpdateDialog-B3y8RL_5.js → AdapterUpdateDialog-QwlPbETd.js} +3 -3
- package/adminWww/assets/Adapters-gKngfaOu.js +7 -0
- package/adminWww/assets/{AdminUtils-DDT_kD8H.js → AdminUtils-CopxRJZ2.js} +1 -1
- package/adminWww/assets/{Apps-C8LE9l6Z.js → Apps-BKnx1gzD.js} +1 -1
- package/adminWww/assets/{Book-QmHxDaHb.js → Book-DrhneQH0.js} +1 -1
- package/adminWww/assets/{Cached-f77QQBQD.js → Cached-XJmxLN4E.js} +1 -1
- package/adminWww/assets/{Computer-DFIUq-fL.js → Computer-DDMBRY5r.js} +1 -1
- package/adminWww/assets/{Config-BZDUILCW.js → Config-BwTa1LdH.js} +1 -1
- package/adminWww/assets/{ConfigManager-CFuOc_kb.js → ConfigManager-DYwC4yq9.js} +1 -1
- package/adminWww/assets/{CustomModal-B8vdCRn1.js → CustomModal-DjI4oCb8.js} +1 -1
- package/adminWww/assets/{CustomTab-DSPqif6P.js → CustomTab-_HYUrXsZ.js} +1 -1
- package/adminWww/assets/{DeleteForever-BnEM-6_v.js → DeleteForever-Caoe64_y.js} +1 -1
- package/adminWww/assets/EasyMode-CCRqFtQq.js +1 -0
- package/adminWww/assets/Enums-BTurn3-x.js +92 -0
- package/adminWww/assets/{Extension-DU1jqvic.js → Extension-D-tNJv4S.js} +1 -1
- package/adminWww/assets/{Fields-DnckPMA8.js → Fields-C2Bn4V04.js} +1 -1
- package/adminWww/assets/{Files-CwUHx0pF.js → Files-XdmhxGOR.js} +1 -1
- package/adminWww/assets/Hosts-DiTMe9fw.js +120 -0
- package/adminWww/assets/{InfoOutlined-l86Si1qa.js → InfoOutlined-DIGDQvu6.js} +1 -1
- package/adminWww/assets/Instances-DA6FIgRs.js +4 -0
- package/adminWww/assets/Intro-CJpwLg8Q.js +2 -0
- package/adminWww/assets/{KeyboardArrowRight-zZUJhG9e.js → KeyboardArrowRight-DVPBjTKi.js} +1 -1
- package/adminWww/assets/Logs-CA0mEMlO.js +2 -0
- package/adminWww/assets/{MoreHoriz-CR2kD-dc.js → MoreHoriz-BYaCptH0.js} +1 -1
- package/adminWww/assets/Objects-B2IC3Bce.js +301 -0
- package/adminWww/assets/{Overview-WwP6FjK-.js → Overview-HG8fAMFM.js} +2 -2
- package/adminWww/assets/{Pageview-DBITLOzI.js → Pageview-DFHddrKX.js} +1 -1
- package/adminWww/assets/{PersonOff-ANdO5Nu4.js → PersonOff-BwYQLD1M.js} +1 -1
- package/adminWww/assets/{PushPinOutlined-DvxsqPHo.js → PushPinOutlined-CEBeTmNm.js} +1 -1
- package/adminWww/assets/Remove-BPxvNccW.js +1 -0
- package/adminWww/assets/{Schedule-BMMrgd7j.js → Schedule-BQlh1nhQ.js} +1 -1
- package/adminWww/assets/{Star-DNdm064z.js → Star-ChMjBwLn.js} +1 -1
- package/adminWww/assets/State-UGfoS6qW.js +1 -0
- package/adminWww/assets/Storage-DrC3j-wf.js +1 -0
- package/adminWww/assets/{TextSnippet-Bywi1YuG.js → TextSnippet-BQ4TSmvS.js} +1 -1
- package/adminWww/assets/{Timeline-IQCnSLiw.js → Timeline-CEyldmz2.js} +1 -1
- package/adminWww/assets/{Timer-Be9yF62g.js → Timer-I0twtyWh.js} +1 -1
- package/adminWww/assets/{UnfoldMore-Du7-8wYn.js → UnfoldMore-_DDSfPKk.js} +1 -1
- package/adminWww/assets/{Usb-Ca47vqRv.js → Usb-Dwk7qdYu.js} +1 -1
- package/adminWww/assets/{UsedResources-CMTzFOX3.js → UsedResources-B6HWeXGX.js} +2 -2
- package/adminWww/assets/Users-DFeYuC5y.js +1 -0
- package/adminWww/assets/{ViewCompact-C3SC0jFF.js → ViewCompact-BbfomOIi.js} +1 -1
- package/adminWww/assets/ViewList-1pB5VinA.js +1 -0
- package/adminWww/assets/{ViewSidebar-kHvah-XS.js → ViewSidebar-DdedDirX.js} +1 -1
- package/adminWww/assets/{VpnKey-iMA7KrB-.js → VpnKey-o8QeqmnU.js} +1 -1
- package/adminWww/assets/{WifiTethering-Da8nW7Do.js → WifiTethering-Cp63fmkC.js} +1 -1
- package/adminWww/assets/{_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-CpelrCgN.js → _virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-uaKFfE5p.js} +1 -1
- package/adminWww/assets/{bootstrap-Bs4TZ7iA.js → bootstrap-DSDOwKWU.js} +33 -33
- package/adminWww/assets/{date-fns-Bpgjk9P-.js → date-fns-ukillHs-.js} +1 -1
- package/adminWww/assets/helpers-CDcY0YJ-.js +1 -0
- package/adminWww/assets/{hostInit-2xIZYDSq.js → hostInit-Cd61hJHh.js} +1 -1
- package/adminWww/assets/{icons-material-BLgrEUSv.js → icons-material-Dms1APQk.js} +1 -1
- package/adminWww/assets/{index-BZifaJHi.js → index-D6uhIclX.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-Pe6-VnD2.js → installSVGRenderer-BR-zIijZ.js} +1 -1
- package/adminWww/assets/{lib-CE1B3iHH.js → lib-BZRGBDoe.js} +2 -2
- package/adminWww/assets/{loadShare-eager-CRNcc8D7.js → loadShare-eager-BpwDZfDr.js} +93 -93
- package/adminWww/assets/{mf-entry-bootstrap-0-a6a54377.js → mf-entry-bootstrap-0-2d631020.js} +3 -3
- package/adminWww/assets/{pendingShares-CuQbFsaK.js → pendingShares-D1Vr_qYv.js} +2 -2
- package/adminWww/assets/{sentry-B4uGc7ut.js → sentry-BFzW-2KQ.js} +1 -1
- package/adminWww/assets/{setYear-DurmWw03.js → setYear-DhVdgUBF.js} +1 -1
- package/adminWww/css/nexowatt-native-shell.css +72 -0
- package/adminWww/index.html +21 -21
- package/adminWww/js/eos-license-link.js +9 -16
- package/adminWww/js/nexowatt-native-shell.js +2 -2
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/{remoteEntry-eos-8.0.0.js → remoteEntry-eos-8.0.2.js} +2 -2
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosSessionSecurity.js +12 -4
- package/build/lib/eosSessionSecurity.js.map +1 -1
- package/build/lib/vendor/webserver/LICENSE +21 -0
- package/build/lib/vendor/webserver/README.md +506 -0
- package/build/lib/vendor/webserver/build/index.d.ts +9 -0
- package/build/lib/vendor/webserver/build/index.js +42 -0
- package/build/lib/vendor/webserver/build/index.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/acmeChallenge.d.ts +65 -0
- package/build/lib/vendor/webserver/build/lib/acmeChallenge.js +149 -0
- package/build/lib/vendor/webserver/build/lib/acmeChallenge.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/certificateManager.d.ts +60 -0
- package/build/lib/vendor/webserver/build/lib/certificateManager.js +128 -0
- package/build/lib/vendor/webserver/build/lib/certificateManager.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/http2Compat.d.ts +21 -0
- package/build/lib/vendor/webserver/build/lib/http2Compat.js +109 -0
- package/build/lib/vendor/webserver/build/lib/http2Compat.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-authcode.d.ts +167 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-authcode.js +619 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-authcode.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-clients.d.ts +92 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-clients.js +230 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-clients.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-model.d.ts +84 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-model.js +388 -0
- package/build/lib/vendor/webserver/build/lib/oauth2-model.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/oauth2.d.ts +75 -0
- package/build/lib/vendor/webserver/build/lib/oauth2.js +625 -0
- package/build/lib/vendor/webserver/build/lib/oauth2.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/securityChecker.d.ts +6 -0
- package/build/lib/vendor/webserver/build/lib/securityChecker.js +96 -0
- package/build/lib/vendor/webserver/build/lib/securityChecker.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/usedResources.d.ts +62 -0
- package/build/lib/vendor/webserver/build/lib/usedResources.js +231 -0
- package/build/lib/vendor/webserver/build/lib/usedResources.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/utils.d.ts +35 -0
- package/build/lib/vendor/webserver/build/lib/utils.js +110 -0
- package/build/lib/vendor/webserver/build/lib/utils.js.map +1 -0
- package/build/lib/vendor/webserver/build/lib/webServer.d.ts +164 -0
- package/build/lib/vendor/webserver/build/lib/webServer.js +454 -0
- package/build/lib/vendor/webserver/build/lib/webServer.js.map +1 -0
- package/build/lib/vendor/webserver/package.json +63 -0
- package/build/lib/web.js +26 -6
- package/build/lib/web.js.map +1 -1
- package/docs/ADMIN8_MIGRATION_8.0.0_DE.md +4 -0
- package/docs/cra/CRA_IEC_GAP_ANALYSIS_2026-09-30.md +10 -0
- package/docs/security/admin8-2026-11-04/development-1.log +4 -4
- package/docs/security/admin8-2026-11-04/development-2.log +275 -233
- package/docs/security/admin8-2026-11-05/copy-update/evidence-sha256.json +0 -5
- package/docs/security/admin8-2026-11-05/login-fix/BACKEND_DIAGNOSE_DE.md +48 -0
- package/docs/security/admin8-2026-11-05/login-fix/REPORT_DE.md +47 -0
- package/docs/security/admin8-2026-11-05/login-fix/REVIEW_DE.md +7 -0
- package/docs/security/admin8-2026-11-05/login-fix/controller-adapter-api.ts.txt +122 -0
- package/docs/security/admin8-2026-11-05/login-fix/controller-file-view.ts.txt +75 -0
- package/docs/security/admin8-2026-11-05/login-fix/controller-redis-view.ts.txt +471 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/LICENSE-webserver-3.4.0 +21 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/REPORT_DE.md +41 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/evidence-sha256.json +116 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/http-consumer-check.cjs +58 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/README_DE.md +9 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.provenance.json +263 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.tgz +0 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/admission.log +16 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-audit-stderr.log +1 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-audit.json +22 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-fixture-1.0.0.tgz +0 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-fixture-package.json +11 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-npm10-package-lock.json +387 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-npm11-package-lock.json +387 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/evidence-sha256.json +85 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/http-consumer-npm10-node22.json +11 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/http-consumer-npm11-node24.json +11 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/local-tests.json +38 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/tests-node22.log +168 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/tests-node24.log +36 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests-node22.log +224 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests-node24.log +42 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests.json +31 -0
- package/docs/security/admin8-2026-11-05/login-fix/dependency/webserver-3.4.0-upstream.tgz +0 -0
- package/docs/security/admin8-2026-11-05/login-fix/eos-session-8.0.0.js.txt +385 -0
- package/docs/security/admin8-2026-11-05/login-fix/evidence-sha256.json +59 -0
- package/docs/security/admin8-2026-11-05/login-fix/path-budget.json +6 -0
- package/docs/security/admin8-2026-11-05/login-fix/provenance.json +51 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/admission.log +21 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/archive-scan.json +13 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/artifacts.log +6 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/backend-build.log +5 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/consumer-package-lock.json +3258 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/copy-update-journal.json +165 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/development.log +365 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/frontend-build.log +149 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-audit.json +22 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-audit.stderr +2 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-final-install-node22.log +9 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node22.json +15 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node22.stderr +2 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node24.json +15 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node24.stderr +0 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/inventory.log +8 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/npm-pack-final.json +7809 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/npm-pack-final.stderr +6 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/overlay-final-publish-node22.json +10213 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/overlay-final-publish-node22.stderr +282 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/pipeline.json +72 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/seal.log +6 -0
- package/docs/security/admin8-2026-11-05/login-fix/release/vendor-final-review-node24.log +18 -0
- package/docs/security/admin8-2026-11-05/login-fix/reproduce.cjs +79 -0
- package/docs/security/admin8-2026-11-05/login-fix/reproduction.json +80 -0
- package/docs/security/admin8-2026-11-05/login-fix/upstream-LICENSE.txt +22 -0
- package/docs/security/admin8-2026-11-05/login-fix/validation.json +85 -0
- package/docs/security/admin8-2026-11-05/system-fix/BACKEND_ROLE_REVIEW_DE.md +79 -0
- package/docs/security/admin8-2026-11-05/system-fix/NAVIGATION_DE.md +30 -0
- package/docs/security/admin8-2026-11-05/system-fix/REPORT_DE.md +51 -0
- package/docs/security/admin8-2026-11-05/system-fix/REVIEW_DE.md +65 -0
- package/docs/security/admin8-2026-11-05/system-fix/SCOPE_DE.md +21 -0
- package/docs/security/admin8-2026-11-05/system-fix/SYSTEM_DE.md +44 -0
- package/docs/security/admin8-2026-11-05/system-fix/archive-scan.json +12 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/README.md +46 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/integrity.json +16 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/system-browser-result.json +3607 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/system-browser.cjs +221 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/system-fixture.cjs +60 -0
- package/docs/security/admin8-2026-11-05/system-fix/evidence-sha256.json +49 -0
- package/docs/security/admin8-2026-11-05/system-fix/license-ui-tests-node22.log +80 -0
- package/docs/security/admin8-2026-11-05/system-fix/license-ui-tests-node24.log +19 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/lint.log +0 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/node22-tests.log +56 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/node24-tests.log +15 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/source-sha256.json +11 -0
- package/docs/security/admin8-2026-11-05/system-fix/path-budget.json +7 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/artifacts.log +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/audit-root.json +22 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/audit-root.stderr +1 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/backend-build.log +5 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/clean.log +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-audit.json +22 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-audit.stderr +2 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-install.log +4 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-package-lock.json +3258 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/development.log +392 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/frontend-build.log +149 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/http-node22.json +15 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/http-node24.json +15 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/inventory.log +8 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/overlay-journal.json +452 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/overlay-publish.log +10790 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/overlay-validation.json +12 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/pack.json +8104 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/pack.stderr +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/retired-801.json +68 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/seal.log +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/review-tests.log +30 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-before.log +86 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-lint.log +0 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-node22.log +44 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-test.log +13 -0
- package/docs/security/admin8-2026-11-05/system-fix/validation.json +90 -0
- package/docs/third-party/admin8/NOTICE-PROVENANCE.json +3 -3
- package/io-package.json +13 -15
- package/package.json +10 -4
- package/release-manifests/admin8-development-validation.json +136 -43
- package/reports/security/artifact-inventory.json +822 -587
- package/reports/security/inventory-summary.json +39 -17
- package/reports/security/sbom-backend-lock.cdx.json +108 -111
- package/reports/security/sbom-frontend-lock.cdx.json +5 -5
- package/reports/security/source-runtime-manifest.json +553 -163
- package/tools/nexowatt-admin8-development-check.cjs +8 -1
- package/tools/nexowatt-artifact-inventory.cjs +8 -1
- package/tools/nexowatt-installer-ems-selftest.cjs +1 -1
- package/tools/nexowatt-lock-provenance-check.cjs +8 -3
- package/tools/nexowatt-repair-lock-metadata.cjs +3 -3
- package/tools/nexowatt-role-security-selftest.cjs +2 -2
- package/tools/nexowatt-security-inventory.cjs +22 -1
- package/tools/nexowatt-user-area-selftest.cjs +1 -1
- package/tools/nexowatt-v7109-clean-core-selftest.cjs +1 -1
- package/tools/nexowatt-vendored-webserver.cjs +69 -0
- package/tools/vendor/eos-retired-release-files.json +268 -1
- package/tools/vendor/webserver-3.4.0-source.provenance.json +244 -0
- package/adminWww/assets/Adapters-BDxfhfGe.js +0 -7
- package/adminWww/assets/EasyMode-TwIN5yxu.js +0 -1
- package/adminWww/assets/Enums-CSzSzWm7.js +0 -92
- package/adminWww/assets/Hosts-QkyuASJy.js +0 -120
- package/adminWww/assets/Instances-BaWBemTT.js +0 -4
- package/adminWww/assets/Intro-DsfrPrWv.js +0 -2
- package/adminWww/assets/Logs-Cngy2Opt.js +0 -2
- package/adminWww/assets/Objects-DY8KS7zK.js +0 -301
- package/adminWww/assets/Remove-DplJatnC.js +0 -1
- package/adminWww/assets/State-vP1o2BCL.js +0 -1
- package/adminWww/assets/Storage-COo2RkS1.js +0 -1
- package/adminWww/assets/Users-BjTGOjzL.js +0 -1
- package/adminWww/assets/ViewList-DuKCnBnc.js +0 -1
- package/adminWww/assets/helpers-DBoACUHw.js +0 -1
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
# Webserver for ioBroker adapters
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
This module provides a webserver, which automatically takes care of
|
|
6
|
+
certificate handling using the ioBroker certificates.
|
|
7
|
+
|
|
8
|
+
## How-To
|
|
9
|
+
|
|
10
|
+
Install via `npm i @iobroker/webserver`.
|
|
11
|
+
|
|
12
|
+
Use the webserver in your ioBroker adapter as the following:
|
|
13
|
+
|
|
14
|
+
- TypeScript:
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { WebServer } from '@iobroker/webserver';
|
|
18
|
+
|
|
19
|
+
const webServer = new WebServer({ app, adapter, secure: true });
|
|
20
|
+
|
|
21
|
+
// initialize and you can use your server as known
|
|
22
|
+
const server = await webServer.init();
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- JavaScript:
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
const { WebServer } = require('@iobroker/webserver');
|
|
29
|
+
|
|
30
|
+
const webServer = new WebServer({ app, adapter, secure: true });
|
|
31
|
+
|
|
32
|
+
// initialize and you can use your server as known
|
|
33
|
+
const server = await webServer.init();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
And so you can use `CertificateManager` that is used in the WebServer already:
|
|
37
|
+
|
|
38
|
+
- TypeScript:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { CertificateManager } from '@iobroker/webserver';
|
|
42
|
+
|
|
43
|
+
// Not required for server
|
|
44
|
+
const certManager = new CertificateManager({ adapter });
|
|
45
|
+
|
|
46
|
+
// get all collections
|
|
47
|
+
const collections = await certManager.getAllCollections();
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- JavaScript:
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
const { CertificateManager } = require('@iobroker/webserver');
|
|
54
|
+
|
|
55
|
+
// Not required for server
|
|
56
|
+
const certManager = new CertificateManager({ adapter });
|
|
57
|
+
|
|
58
|
+
// get all collections
|
|
59
|
+
const collections = await certManager.getAllCollections();
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## ACME HTTP-01 challenges
|
|
63
|
+
|
|
64
|
+
A certificate authority validates an HTTP-01 challenge by fetching `http://<domain>/.well-known/acme-challenge/<token>` on port 80. Path and port are fixed by RFC 8555, so on a host with a single public IP that request lands on whichever adapter holds port 80 - usually `web` or `admin`. The `acme` adapter used to take that port over for the duration of an order, stopping the adapter that had it.
|
|
65
|
+
|
|
66
|
+
`WebServer` answers those requests itself instead. The `acme` adapter publishes its tokens in `acme.<instance>.info.httpChallenges` and the lookup happens in front of the app, before any authentication, because the CA is anonymous:
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// Nothing to do - this is on by default
|
|
70
|
+
const webServer = new WebServer({ app, adapter, secure: true });
|
|
71
|
+
|
|
72
|
+
// Opt out and keep /.well-known/acme-challenge/ entirely to the app
|
|
73
|
+
const webServer = new WebServer({ app, adapter, secure: true, acmeChallenge: false });
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Only a request whose token is actually published is answered here; everything else is passed on to the app untouched, so nothing the app serves on that path is shadowed.
|
|
77
|
+
|
|
78
|
+
An adapter that builds its server without `WebServer` can mount the same lookup itself, before any authentication middleware:
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
import { acmeChallengeMiddleware } from '@iobroker/webserver';
|
|
82
|
+
|
|
83
|
+
app.use(acmeChallengeMiddleware(adapter));
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`serveAcmeChallenge(adapter, req, res)` is the same thing for a plain `http.RequestListener`; it resolves to `true` when it answered the request.
|
|
87
|
+
|
|
88
|
+
## HTTP/2
|
|
89
|
+
|
|
90
|
+
A secure server speaks HTTP/2, and HTTP/1.1 to every client that does not offer HTTP/2. This is on by default:
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
// HTTP/2 with HTTP/1.1 fallback
|
|
94
|
+
const webServer = new WebServer({ app, adapter, secure: true });
|
|
95
|
+
|
|
96
|
+
// HTTP/1.1 only
|
|
97
|
+
const webServer = new WebServer({ app, adapter, secure: true, http2: false });
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Without `secure` the option has no effect - browsers use HTTP/2 over TLS only.
|
|
101
|
+
|
|
102
|
+
- **Express works unchanged.** Express replaces the prototype of every request and response with its own HTTP/1 one, which breaks the HTTP/2 compat objects (the first body read even crashes the process). `WebServer` pins the HTTP/2 members to each request and response beforehand, fills in the `host` header from `:authority`, gives each response the `_implicitHeader()` of HTTP/1 that express-session relies on, and drops HTTP/1 connection headers (`Connection`, `Keep-Alive`, `Transfer-Encoding`, ...) an app sets on the response, which HTTP/2 forbids.
|
|
103
|
+
- **WebSockets keep working.** Browsers open them on a separate HTTP/1.1 connection, which the server hands to its `upgrade` listeners as before (`ws`, `socket.io`, `@iobroker/ws-server`).
|
|
104
|
+
- **`close()` does not hang** on HTTP/2 sessions a browser keeps open: they are closed gracefully along with the server.
|
|
105
|
+
- **Types:** `init()` resolves to `http.Server | https.Server | http2.Http2SecureServer`, and to `http.Server | https.Server` only with `http2: false`. `Http2SecureServer` lacks some `http.Server` members, e.g. `closeAllConnections()` and `maxHeadersCount`.
|
|
106
|
+
|
|
107
|
+
## Used resources
|
|
108
|
+
|
|
109
|
+
`js-controller` 8 keeps a per-host registry of the exclusive resources its instances occupy - the ones only a single instance can hold at a time, such as a TCP port - under `system.host.<hostname>.usedResources.<type>`. It answers "which port is already spoken for on this host", so a user configuring a new instance can pick a free one instead of running into `EADDRINUSE`.
|
|
110
|
+
|
|
111
|
+
`WebServer` reports its port there by itself: it registers what the server bound to once it listens, and frees the entry when the server closes again.
|
|
112
|
+
|
|
113
|
+
```json5
|
|
114
|
+
// io-package.json - without this js-controller derives the entry from native.port instead
|
|
115
|
+
{
|
|
116
|
+
"common": {
|
|
117
|
+
"declareUsedResources": true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
// Nothing else to do - this is on by default
|
|
124
|
+
const webServer = new WebServer({ app, adapter, secure: true });
|
|
125
|
+
const server = await webServer.init();
|
|
126
|
+
server.listen(port, bind); // registered from here on, freed on close()
|
|
127
|
+
|
|
128
|
+
// Opt out
|
|
129
|
+
const webServer = new WebServer({ app, adapter, secure: true, usedResources: false });
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- The port is taken from the **listening server**, not from the configuration, so what is registered is what was really bound - including the address (`family` only for a concrete one: a wildcard listener occupies the port in both families).
|
|
133
|
+
- **The feature is asked for before anything is sent.** `adapter.supportsFeature('CONTROLLER_USED_RESOURCES')` has to say yes and the adapter's `@iobroker/adapter-core` has to have the methods - a host that does not know `registerUsedResource` never answers, so every call would first sit out the five second timeout of the adapter API. Without both, nothing is sent and a debug line says which half is missing.
|
|
134
|
+
- Without `common.declareUsedResources` nothing is reported either (js-controller derives the entry from `native.port` and would refuse the registration). The server is unaffected in every case; a registration the host refuses is logged, never thrown.
|
|
135
|
+
- Freeing happens on `close()`. An instance that is stopped or crashes without closing keeps its entry, which the host marks as no longer held.
|
|
136
|
+
|
|
137
|
+
An adapter that builds its server without `WebServer`, or listens on more than one port, can report the same way:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import { trackUsedPort, registerUsedPort, freeUsedPort, supportsUsedResources } from '@iobroker/webserver';
|
|
141
|
+
|
|
142
|
+
// Bound to the lifetime of a server: registered on `listening`, freed on `close`
|
|
143
|
+
const stopTracking = trackUsedPort(adapter, server);
|
|
144
|
+
|
|
145
|
+
// Or one-shot, for a port that is not owned by a `net.Server`
|
|
146
|
+
await registerUsedPort(adapter, { port: 1883 });
|
|
147
|
+
await freeUsedPort(adapter, { port: 1883 });
|
|
148
|
+
|
|
149
|
+
// All of them check this themselves; it is exported for an adapter that wants to know beforehand
|
|
150
|
+
if (supportsUsedResources(adapter)) {
|
|
151
|
+
// this js-controller keeps the registry and this adapter-core can talk to it
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## CORS / access control
|
|
156
|
+
|
|
157
|
+
`accessControl` puts the CORS headers in front of the app, so every answer carries them:
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
const webServer = new WebServer({
|
|
161
|
+
app,
|
|
162
|
+
adapter,
|
|
163
|
+
secure: true,
|
|
164
|
+
accessControl: {
|
|
165
|
+
// A literal origin, `*`, or a function picking one per request
|
|
166
|
+
accessControlAllowOrigin: origin => origin,
|
|
167
|
+
accessControlAllowMethods: 'GET,PUT,POST,DELETE,OPTIONS',
|
|
168
|
+
accessControlAllowHeaders: 'Content-Type, Authorization',
|
|
169
|
+
accessControlAllowCredentials: true,
|
|
170
|
+
accessControlMaxAge: 600,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Doing it here rather than as an Express middleware matters when the app registers routes that answer without calling `next()`: an `app.use()` added after `createOAuth2Server()` never sees `POST /oauth/token`, so that answer would go out without any CORS header. A concrete origin is sent together with `Vary: Origin`; `*` is not.
|
|
176
|
+
|
|
177
|
+
`accessControlRequestHeaders` and `accessControlRequestMethod` are deprecated - those are request headers a browser sends in a preflight and never did anything on a response. They now only fill in for `accessControlAllowHeaders` / `accessControlAllowMethods`.
|
|
178
|
+
|
|
179
|
+
## OAuth2 support
|
|
180
|
+
You can activate the OAuth2 support for the webserver. To do this, add the following code after the server is initialized:
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
// ... initialization of the webserver
|
|
184
|
+
this.webServer.app.use(cookieParser());
|
|
185
|
+
this.webServer.app.use(bodyParser.urlencoded({ extended: true }));
|
|
186
|
+
this.webServer.app.use(bodyParser.json());
|
|
187
|
+
this.webServer.app.use(bodyParser.text());
|
|
188
|
+
|
|
189
|
+
// Install oauth2 server (Only this line is required)
|
|
190
|
+
createOAuth2Server(this, { app: this.webServer.app, secure: this.config.secure, withSession: true });
|
|
191
|
+
|
|
192
|
+
// Old authentication method
|
|
193
|
+
this.webServer.app.use(
|
|
194
|
+
session({
|
|
195
|
+
secret: this.secret,
|
|
196
|
+
saveUninitialized: true,
|
|
197
|
+
resave: true,
|
|
198
|
+
cookie: { maxAge: (parseInt(this.config.ttl as string, 10) || 3600) * 1000, httpOnly: false }, // default TTL
|
|
199
|
+
// @ts-expect-error missing typing
|
|
200
|
+
store: this.store!,
|
|
201
|
+
}),
|
|
202
|
+
);
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
If you want to completely disable old authentication method, the code should looks like:
|
|
206
|
+
```typescript
|
|
207
|
+
// ... initialization of the webserver
|
|
208
|
+
this.webServer.app.use(cookieParser());
|
|
209
|
+
this.webServer.app.use(bodyParser.urlencoded({ extended: true }));
|
|
210
|
+
this.webServer.app.use(bodyParser.json());
|
|
211
|
+
this.webServer.app.use(bodyParser.text());
|
|
212
|
+
|
|
213
|
+
// Install oauth2 server (Only this line is required)
|
|
214
|
+
createOAuth2Server(this, { app: this.webServer.app, secure: this.config.secure });
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Login with OAuth2 is available under `/oauth/token` URL:
|
|
218
|
+
|
|
219
|
+
```http
|
|
220
|
+
POST /oauth/token HTTP/1.1
|
|
221
|
+
Host: IP:PORT
|
|
222
|
+
Content-Type: application/x-www-form-urlencoded
|
|
223
|
+
Data: grant_type=password&username=<user>&password=<password>&client_id=ioBroker&stayloggedin=<false/true>
|
|
224
|
+
```
|
|
225
|
+
`stayloggedin=true` means that the token will be stored in the browser and will be used for the next requests and is optional.
|
|
226
|
+
|
|
227
|
+
The answer is like:
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"access_token": "21f89e3eee32d3af08a71c1cc44ec72e0e3014a9",
|
|
231
|
+
"expires_in": 3600,
|
|
232
|
+
"refresh_token": "66d35faa5d53ca8242cfe57367210e76b7ffded7",
|
|
233
|
+
"refresh_token_expires_in": "600000",
|
|
234
|
+
"token_type": "Bearer"
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Refresh token is available under `/oauth/token` URL:
|
|
239
|
+
|
|
240
|
+
```http
|
|
241
|
+
POST /oauth/token HTTP/1.1
|
|
242
|
+
Host: IP:PORT
|
|
243
|
+
Content-Type: application/x-www-form-urlencoded
|
|
244
|
+
Data: grant_type=refresh_token&refresh_token=<REFRESH_TOKEN>&client_id=ioBroker&stayloggedin=<false/true>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
The answer is the same as for the login but with new tokens.
|
|
248
|
+
|
|
249
|
+
## Authorization code flow with PKCE
|
|
250
|
+
|
|
251
|
+
The password grant above requires the client to handle the user's credentials. Clients that run
|
|
252
|
+
outside your control — MCP clients such as Claude Desktop, or any "connect your account" integration —
|
|
253
|
+
must not do that. For them the webserver can additionally offer the browser-based **authorization
|
|
254
|
+
code flow with PKCE** (RFC 7636), including dynamic client registration (RFC 7591), authorization
|
|
255
|
+
server metadata (RFC 8414), resource indicators (RFC 8707) and token revocation (RFC 7009).
|
|
256
|
+
|
|
257
|
+
It is **opt-in**, because it exposes a browser-facing login page and — unless disabled — an open
|
|
258
|
+
registration endpoint:
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
createOAuth2Server(this, {
|
|
262
|
+
app: this.webServer.app,
|
|
263
|
+
secure: this.config.secure,
|
|
264
|
+
// Enable the browser-based flow
|
|
265
|
+
authorizationCode: true,
|
|
266
|
+
// Externally reachable base URL. REQUIRED behind a reverse proxy: the URLs published in the
|
|
267
|
+
// discovery document must be the ones the client can actually reach.
|
|
268
|
+
baseUrl: 'https://iobroker.example.com',
|
|
269
|
+
// Optional: pin the name shown on the login and consent pages
|
|
270
|
+
productName: 'ioBroker',
|
|
271
|
+
// Optional: require clients to be registered by hand instead of via RFC 7591
|
|
272
|
+
dynamicClientRegistration: false,
|
|
273
|
+
// Optional: how many clients to keep before the oldest dynamic ones are pruned (default 100)
|
|
274
|
+
maxClients: 100,
|
|
275
|
+
});
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
This adds the following endpoints:
|
|
279
|
+
|
|
280
|
+
| Endpoint | Purpose |
|
|
281
|
+
|-----------------------------------------------|----------------------------------------------------------------|
|
|
282
|
+
| `GET /.well-known/oauth-authorization-server` | Discovery document (RFC 8414) |
|
|
283
|
+
| `POST /oauth/register` | Dynamic client registration (RFC 7591), can be disabled |
|
|
284
|
+
| `GET /oauth/authorize` | Login and consent page |
|
|
285
|
+
| `POST /oauth/authorize` | Login and consent submission |
|
|
286
|
+
| `POST /oauth/token` | Also accepts `grant_type=authorization_code` |
|
|
287
|
+
| `POST /oauth/revoke` | Token revocation (RFC 7009) |
|
|
288
|
+
|
|
289
|
+
Notes:
|
|
290
|
+
|
|
291
|
+
- **PKCE is mandatory.** Only `code_challenge_method=S256` is accepted; there are no client secrets,
|
|
292
|
+
every client is a public client.
|
|
293
|
+
- **Only registered redirect URIs are accepted**, compared byte-for-byte. Plain `http:` is allowed
|
|
294
|
+
only for loopback addresses (RFC 8252 §7.3), so native apps can use an ephemeral local port.
|
|
295
|
+
- **Users who are already signed in** (an `access_token` cookie from the web UI) only see the consent
|
|
296
|
+
step, not another login form.
|
|
297
|
+
- **`resource` (RFC 8707) is bound to the token.** `OAuth2Model.getTokenInfo(accessToken)` returns
|
|
298
|
+
the stored record including `aud` and `clientId`, so a resource server can reject tokens that were
|
|
299
|
+
issued for something else. The binding survives a refresh.
|
|
300
|
+
- **HTTPS is required** for anything but localhost — the flow runs through the user's browser, and
|
|
301
|
+
clients refuse plain `http:` for remote hosts.
|
|
302
|
+
- Registered clients are stored as ioBroker objects under `<adapter.namespace>.oauth.clients.*`.
|
|
303
|
+
|
|
304
|
+
Client registration:
|
|
305
|
+
|
|
306
|
+
```http
|
|
307
|
+
POST /oauth/register HTTP/1.1
|
|
308
|
+
Content-Type: application/json
|
|
309
|
+
|
|
310
|
+
{ "client_name": "Claude", "redirect_uris": ["https://claude.ai/api/mcp/auth_callback"] }
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Token exchange:
|
|
314
|
+
|
|
315
|
+
```http
|
|
316
|
+
POST /oauth/token HTTP/1.1
|
|
317
|
+
Content-Type: application/x-www-form-urlencoded
|
|
318
|
+
|
|
319
|
+
grant_type=authorization_code&code=<CODE>&code_verifier=<VERIFIER>&client_id=<CLIENT_ID>&redirect_uri=<REDIRECT_URI>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## Single sign-on with OpenID Connect
|
|
323
|
+
|
|
324
|
+
With the `oidc` option, `createOAuth2Server` adds `/sso` and `/sso-callback` for a login at an
|
|
325
|
+
external identity provider (Keycloak, Authentik, Auth0, Entra ID, ...):
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
createOAuth2Server(this, {
|
|
329
|
+
app: this.webServer.app,
|
|
330
|
+
secure: this.config.secure,
|
|
331
|
+
oidc: { issuer: 'https://auth.example.com/application/o/iobroker/', clientId: 'iobroker' },
|
|
332
|
+
// REQUIRED behind a TLS-terminating reverse proxy: the redirect URI sent to the identity provider
|
|
333
|
+
// is `<baseUrl>/sso-callback` and must match the one registered there
|
|
334
|
+
baseUrl: 'https://iobroker.example.com',
|
|
335
|
+
// Recommended: put only a one-time code into the URL instead of the tokens
|
|
336
|
+
ssoHandoff: 'code',
|
|
337
|
+
});
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
How the result gets to the page:
|
|
341
|
+
|
|
342
|
+
- `ssoHandoff: 'url'` (default, for compatibility): after a login the page gets
|
|
343
|
+
`?ssoLoginResponse=<tokens as JSON>`, after connecting an identity `?id_token=<ID token>`. Both
|
|
344
|
+
end up in the browser history and in proxy logs.
|
|
345
|
+
- `ssoHandoff: 'code'`: the page gets `?ssoCode=<code>` and exchanges it within 60 seconds, once:
|
|
346
|
+
|
|
347
|
+
```http
|
|
348
|
+
POST /sso-token HTTP/1.1
|
|
349
|
+
Content-Type: application/json
|
|
350
|
+
|
|
351
|
+
{ "code": "<CODE>" }
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
The answer is the same as for `/oauth/token` after a login, or `{ "id_token": "..." }` after
|
|
355
|
+
connecting an identity.
|
|
356
|
+
|
|
357
|
+
In both cases a login also sets the `access_token` cookie (`HttpOnly`, `SameSite=Lax`, `Secure`
|
|
358
|
+
on https).
|
|
359
|
+
|
|
360
|
+
## Changelog
|
|
361
|
+
|
|
362
|
+
<!--
|
|
363
|
+
Placeholder for the next version (at the beginning of the line):
|
|
364
|
+
### **WORK IN PROGRESS**
|
|
365
|
+
-->
|
|
366
|
+
### 3.4.0 (2026-10-26)
|
|
367
|
+
- (@GermanBluefox) Fixed: the `access_token` cookie of a single sign-on was set without any flags, so page scripts could read it and it was sent along cross-site requests. It is now `HttpOnly`, `SameSite=Lax` and `Secure` on https
|
|
368
|
+
- (@GermanBluefox) Fixed: behind a TLS-terminating reverse proxy `/sso` sent `http://.../sso-callback` as redirect URI, which did not match the one registered at the identity provider, and refused a `redirectUrl` with `https:`. The `baseUrl` option is now used for the single sign-on too
|
|
369
|
+
- (@GermanBluefox) Added: `ssoHandoff: 'code'` puts only a one-time code into the URL after a single sign-on, the page exchanges it via `POST /sso-token`. Without it the tokens (`?ssoLoginResponse=`) and the ID token (`?id_token=`) are in the URL, as before
|
|
370
|
+
|
|
371
|
+
### 3.3.2 (2026-10-25)
|
|
372
|
+
- (@GermanBluefox) `/sso?method=register` Fixed problem with authentication
|
|
373
|
+
|
|
374
|
+
### 3.3.1 (2026-10-11)
|
|
375
|
+
- (@GermanBluefox) Added tests for the single sign-on. They run the whole flow against an identity provider that is started inside the test: it publishes a discovery document and its keys, hands out a code and signs the ID token itself. Covered are the login of a connected user, the connecting of an ioBroker user, PKCE for a public client, the secret of a confidential client, the configured scopes, and that the routes do not exist without a configuration, that a foreign redirect target and an unknown state are refused, that a state works only once, and that an identity provider that cannot be reached gives a 502 instead of a dead end. `npm test` builds and runs them
|
|
376
|
+
- (@GermanBluefox) Fixed the crash `server.shouldUpgradeCallback is not a function` on WebSocket connections over HTTP/1.1 with HTTP/2 enabled (Node.js 22.21 bug)
|
|
377
|
+
|
|
378
|
+
### 3.3.0 (2026-10-01)
|
|
379
|
+
- (@GermanBluefox) Added: the identity provider for the single sign-on is configured instead of being part of the code. `createOAuth2Server` takes an `oidc` option with the issuer, the client ID, an optional client secret and the scopes, and reads the endpoints from the discovery document of the issuer, so every provider that follows the standard works: Keycloak, Authentik, Auth0, Entra ID. Until now a Keycloak realm on a private address was compiled in, which nobody but its owner could use
|
|
380
|
+
- (@GermanBluefox) **Breaking:** without the `oidc` option `/sso` and `/sso-callback` do not exist any more. They used to be registered always and sent the user to the compiled-in Keycloak, so an installation that did not configure anything is not losing a login that worked
|
|
381
|
+
- (@GermanBluefox) Fixed: `/sso` redirected the browser to whatever `redirectUrl` said once the login was through. Anybody who could get a user to open that address could send them anywhere; the target now has to be on the same server
|
|
382
|
+
- (@GermanBluefox) Fixed: everything about a started login - the redirect target, whether it signs in or connects a user, and which user - travelled through the browser inside the `state` parameter, where it could be changed. The state is now an opaque random value, the login itself stays on the server, is accepted exactly once and is forgotten after ten minutes
|
|
383
|
+
- (@GermanBluefox) Added: a public client proves with PKCE (S256) that the authorization code belongs to its own login, a confidential client authenticates with its `client_secret`, and the ID token has to carry the `nonce` of that login, so a token obtained elsewhere cannot be replayed
|
|
384
|
+
- (@GermanBluefox) Changed: an identity provider that cannot be reached answers with 502 instead of sending the browser into nothing, and a failed discovery is not cached, so the next login tries again
|
|
385
|
+
|
|
386
|
+
### 3.2.2 (2026-09-25)
|
|
387
|
+
- (@GermanBluefox) `WebServer` now reports the port it listens on to the per-host registry of used resources of js-controller 8 and frees the entry when the server is closed, so the occupied port of an adapter is the one it really bound to instead of the `native.port` js-controller derives it from. Nothing is sent unless `supportsFeature('CONTROLLER_USED_RESOURCES')` says the controller keeps the registry, so an older js-controller is unaffected. Requires `"declareUsedResources": true` in `common` of the `io-package.json`; opt out with `usedResources: false`. `trackUsedPort()`, `registerUsedPort()`, `freeUsedPort()` and `supportsUsedResources()` are the same for adapters building their own server
|
|
388
|
+
|
|
389
|
+
### 3.1.2 (2026-09-19)
|
|
390
|
+
- (@GermanBluefox) HTTP/2: responses now have `_implicitHeader()`, which HTTP/1 responses have and express-session calls whenever it saves the session before the response ends. With `resave`, every response of an app using express-session failed with `res._implicitHeader is not a function`
|
|
391
|
+
|
|
392
|
+
### 3.1.1 (2026-09-18)
|
|
393
|
+
- (@GermanBluefox) The result type of `init()` now includes `http2.Http2SecureServer` unless `http2: false` is set, matching the default of the `http2` option since 3.1.0. It claimed `http.Server | https.Server` before, so members that an HTTP/2 server does not have - like `closeAllConnections()` - compiled and failed at runtime
|
|
394
|
+
- (@GermanBluefox) Added the `http2` option: a secure server speaks HTTP/2 with HTTP/1.1 fallback. Express apps, body parsers, WebSocket upgrades and `close()` keep working unchanged
|
|
395
|
+
|
|
396
|
+
### 3.0.2 (2026-09-03)
|
|
397
|
+
- (@GermanBluefox) The `access_token` cookie of a "stay logged in" login gets its lifetime as `Max-Age` (relative to the browser clock) instead of `Expires` (an absolute date from the server clock): a server with a wrong time handed out cookies the browser dropped at once
|
|
398
|
+
|
|
399
|
+
### 3.0.1 (2026-08-26)
|
|
400
|
+
- (@GermanBluefox) HTTPS servers built from a certificate collection now also send the issuing chain from `collection.chain`. Only the leaf was sent before, so clients that do not already know the intermediate - `curl` and most non-browser HTTP clients - failed with `unable to get local issuer certificate`
|
|
401
|
+
- (@GermanBluefox) `accessControl`: `accessControlAllowOrigin` now also accepts a function, so the allowed origin can be picked per request (`origin => origin` reflects it back)
|
|
402
|
+
- (@GermanBluefox) `accessControl`: added `accessControlMaxAge`, and a concrete allowed origin is now sent together with `Vary: Origin`
|
|
403
|
+
- (@GermanBluefox) `accessControl`: `accessControlRequestHeaders` and `accessControlRequestMethod` are deprecated. They are request headers a browser sends in a preflight and had no effect as response headers; they now serve as a fallback for `accessControlAllowHeaders` / `accessControlAllowMethods`
|
|
404
|
+
|
|
405
|
+
### 3.0.0 (2026-08-26)
|
|
406
|
+
- (@GermanBluefox) Fixed the OAuth2 consent page dropping the authorization response in Chromium and WebKit: `form-action` also applies to the redirect that follows the form POST, so the client's callback origin is now part of the policy. Clicking "Allow" appeared to do nothing and a second click reported "Request expired"
|
|
407
|
+
- (@GermanBluefox) The login and consent forms now post to a relative URL, so the flow also works when the server is reverse-proxied under a path prefix
|
|
408
|
+
- (@GermanBluefox) An unexpected error in an OAuth2 endpoint no longer escapes as an unhandled rejection (which terminates the host adapter); it is logged and answered with an error page
|
|
409
|
+
- (@GermanBluefox) `WebServer` now answers ACME HTTP-01 challenges published by the acme adapter, so it no longer has to be stopped to free port 80 (opt out via `acmeChallenge: false`)
|
|
410
|
+
- (@GermanBluefox) Exported `acmeChallengeMiddleware` and `serveAcmeChallenge` for adapters that build their server themselves
|
|
411
|
+
- (@GermanBluefox) **BREAKING:** Updated `jwks-rsa` to 4.x. It depends on the ESM-only jose 6, so the minimal Node.js version is now 20.19 (or 22.12 / 23+)
|
|
412
|
+
|
|
413
|
+
### 2.0.1 (2026-08-04)
|
|
414
|
+
- (@GermanBluefox) Added the OAuth2 authorization code flow with PKCE, dynamic client registration, authorization server metadata and token revocation (opt-in via `authorizationCode: true`)
|
|
415
|
+
- (@GermanBluefox) Tokens can now be bound to a client and a resource (RFC 8707); the binding survives a refresh
|
|
416
|
+
- (@GermanBluefox) `/oauth/token` no longer requires the host adapter to install a body parser
|
|
417
|
+
|
|
418
|
+
### 1.4.0 (2026-04-13)
|
|
419
|
+
- (@GermanBluefox) Fixed possible errors
|
|
420
|
+
- (@GermanBluefox) Updated packages
|
|
421
|
+
|
|
422
|
+
### 1.3.3 (2026-02-12)
|
|
423
|
+
- (@GermanBluefox) Added missing types for the acme adapter
|
|
424
|
+
|
|
425
|
+
### 1.3.1 (2025-06-17)
|
|
426
|
+
- (@foxriver76) Implemented (for now - inofficial) Keycloack SSO support
|
|
427
|
+
|
|
428
|
+
### 1.2.8 (2025-04-29)
|
|
429
|
+
|
|
430
|
+
- (@GermanBluefox) Corrected time to live for the access token
|
|
431
|
+
|
|
432
|
+
### 1.2.7 (2025-04-21)
|
|
433
|
+
|
|
434
|
+
- (@GermanBluefox) Corrected a problem with authentication, as type-is was too old.
|
|
435
|
+
|
|
436
|
+
### 1.2.6 (2025-04-01)
|
|
437
|
+
|
|
438
|
+
- (@GermanBluefox) Changed the order of authentications. Basic authentication will be checked as the last one.
|
|
439
|
+
- (@GermanBluefox) Added the setting to disable basic authentication
|
|
440
|
+
|
|
441
|
+
### 1.2.4 (2025-03-25)
|
|
442
|
+
|
|
443
|
+
- (@GermanBluefox) Added the possibility to give tokens for internal use (like node-red)
|
|
444
|
+
|
|
445
|
+
### 1.2.0 (2025-03-05)
|
|
446
|
+
|
|
447
|
+
- (@GermanBluefox) Added the log output for invalid password in OAuth2
|
|
448
|
+
- (@GermanBluefox) A minimal Node.js version is 16 (Not breaking, as no one uses node 14)
|
|
449
|
+
- (@GermanBluefox) Updated TypeScript to 5.8
|
|
450
|
+
|
|
451
|
+
### 1.1.7 (2025-02-27)
|
|
452
|
+
|
|
453
|
+
- (@GermanBluefox) Added support for OAuth2 authentication with brute force
|
|
454
|
+
|
|
455
|
+
### 1.0.8 (2025-02-07)
|
|
456
|
+
|
|
457
|
+
- (@GermanBluefox) Updated packages and typing
|
|
458
|
+
|
|
459
|
+
### 1.0.6 (2024-09-14)
|
|
460
|
+
|
|
461
|
+
- (@GermanBluefox) Added access control options for server
|
|
462
|
+
- (@GermanBluefox) Used `@iobroker/eslint-config` for linting
|
|
463
|
+
|
|
464
|
+
### 1.0.3 (2023-10-16)
|
|
465
|
+
|
|
466
|
+
- (@GermanBluefox) Extend the security checker with the pattern detection and custom URL
|
|
467
|
+
|
|
468
|
+
### 1.0.1 (2023-10-11)
|
|
469
|
+
|
|
470
|
+
- (@GermanBluefox) Changed the error text of the security checker
|
|
471
|
+
|
|
472
|
+
### 1.0.0 (2023-10-11)
|
|
473
|
+
|
|
474
|
+
- (@GermanBluefox) added the security checker
|
|
475
|
+
|
|
476
|
+
### 0.3.7 (2023-09-24)
|
|
477
|
+
|
|
478
|
+
- (raintonr) Fix contexts for SNICallback ([#3](https://github.com/ioBroker/webserver/issues/3)).
|
|
479
|
+
|
|
480
|
+
### 0.3.6 (2023-07-07)
|
|
481
|
+
|
|
482
|
+
- (@GermanBluefox) Update packages
|
|
483
|
+
|
|
484
|
+
### 0.3.4 (2023-03-27)
|
|
485
|
+
|
|
486
|
+
- (@GermanBluefox) Corrected small error with CA certificate
|
|
487
|
+
|
|
488
|
+
### 0.3.3 (2023-03-24)
|
|
489
|
+
|
|
490
|
+
- (@GermanBluefox) Added check of the cert files
|
|
491
|
+
|
|
492
|
+
### 0.3.1 (2023-03-20)
|
|
493
|
+
|
|
494
|
+
- (@GermanBluefox) Corrected error with `getCertificatesAsync`
|
|
495
|
+
|
|
496
|
+
### 0.3.0 (2023-03-20)
|
|
497
|
+
|
|
498
|
+
- (@GermanBluefox) Added support for user-configured certificates for fallback
|
|
499
|
+
|
|
500
|
+
### 0.2.1 (2023-03-20)
|
|
501
|
+
|
|
502
|
+
- (@GermanBluefox) Rename `Webserver` to `WebServer`
|
|
503
|
+
|
|
504
|
+
### 0.1.0 (2023-03-13)
|
|
505
|
+
|
|
506
|
+
- (foxriver76) initial release based on https://github.com/ioBroker/ioBroker.js-controller/pull/2104 by @raintonr
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { WebServer } from './lib/webServer';
|
|
2
|
+
export { serveAcmeChallenge, acmeChallengeMiddleware, acmeChallengeToken, findAcmeChallenge, ACME_CHALLENGE_PREFIX, ACME_CHALLENGE_STATE_PATTERN, ACME_TOKEN_REGEX, type PublishedAcmeChallenge, } from './lib/acmeChallenge';
|
|
3
|
+
export { trackUsedPort, registerUsedPort, freeUsedPort, supportsUsedResources, type UsedTcpPort, } from './lib/usedResources';
|
|
4
|
+
export * from './lib/certificateManager';
|
|
5
|
+
export * from './lib/securityChecker';
|
|
6
|
+
export { createOAuth2Server, type OidcConfig } from './lib/oauth2';
|
|
7
|
+
export { type TokenBinding, type OAuth2Model } from './lib/oauth2-model';
|
|
8
|
+
export { AuthorizationCodeFlow, type AuthorizationCodeFlowOptions } from './lib/oauth2-authcode';
|
|
9
|
+
export { OAuth2ClientStore, ClientRegistrationError, type OAuth2Client, type OAuth2ClientMetadata, } from './lib/oauth2-clients';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ClientRegistrationError = exports.OAuth2ClientStore = exports.AuthorizationCodeFlow = exports.createOAuth2Server = exports.supportsUsedResources = exports.freeUsedPort = exports.registerUsedPort = exports.trackUsedPort = exports.ACME_TOKEN_REGEX = exports.ACME_CHALLENGE_STATE_PATTERN = exports.ACME_CHALLENGE_PREFIX = exports.findAcmeChallenge = exports.acmeChallengeToken = exports.acmeChallengeMiddleware = exports.serveAcmeChallenge = exports.WebServer = void 0;
|
|
18
|
+
var webServer_1 = require("./lib/webServer");
|
|
19
|
+
Object.defineProperty(exports, "WebServer", { enumerable: true, get: function () { return webServer_1.WebServer; } });
|
|
20
|
+
var acmeChallenge_1 = require("./lib/acmeChallenge");
|
|
21
|
+
Object.defineProperty(exports, "serveAcmeChallenge", { enumerable: true, get: function () { return acmeChallenge_1.serveAcmeChallenge; } });
|
|
22
|
+
Object.defineProperty(exports, "acmeChallengeMiddleware", { enumerable: true, get: function () { return acmeChallenge_1.acmeChallengeMiddleware; } });
|
|
23
|
+
Object.defineProperty(exports, "acmeChallengeToken", { enumerable: true, get: function () { return acmeChallenge_1.acmeChallengeToken; } });
|
|
24
|
+
Object.defineProperty(exports, "findAcmeChallenge", { enumerable: true, get: function () { return acmeChallenge_1.findAcmeChallenge; } });
|
|
25
|
+
Object.defineProperty(exports, "ACME_CHALLENGE_PREFIX", { enumerable: true, get: function () { return acmeChallenge_1.ACME_CHALLENGE_PREFIX; } });
|
|
26
|
+
Object.defineProperty(exports, "ACME_CHALLENGE_STATE_PATTERN", { enumerable: true, get: function () { return acmeChallenge_1.ACME_CHALLENGE_STATE_PATTERN; } });
|
|
27
|
+
Object.defineProperty(exports, "ACME_TOKEN_REGEX", { enumerable: true, get: function () { return acmeChallenge_1.ACME_TOKEN_REGEX; } });
|
|
28
|
+
var usedResources_1 = require("./lib/usedResources");
|
|
29
|
+
Object.defineProperty(exports, "trackUsedPort", { enumerable: true, get: function () { return usedResources_1.trackUsedPort; } });
|
|
30
|
+
Object.defineProperty(exports, "registerUsedPort", { enumerable: true, get: function () { return usedResources_1.registerUsedPort; } });
|
|
31
|
+
Object.defineProperty(exports, "freeUsedPort", { enumerable: true, get: function () { return usedResources_1.freeUsedPort; } });
|
|
32
|
+
Object.defineProperty(exports, "supportsUsedResources", { enumerable: true, get: function () { return usedResources_1.supportsUsedResources; } });
|
|
33
|
+
__exportStar(require("./lib/certificateManager"), exports);
|
|
34
|
+
__exportStar(require("./lib/securityChecker"), exports);
|
|
35
|
+
var oauth2_1 = require("./lib/oauth2");
|
|
36
|
+
Object.defineProperty(exports, "createOAuth2Server", { enumerable: true, get: function () { return oauth2_1.createOAuth2Server; } });
|
|
37
|
+
var oauth2_authcode_1 = require("./lib/oauth2-authcode");
|
|
38
|
+
Object.defineProperty(exports, "AuthorizationCodeFlow", { enumerable: true, get: function () { return oauth2_authcode_1.AuthorizationCodeFlow; } });
|
|
39
|
+
var oauth2_clients_1 = require("./lib/oauth2-clients");
|
|
40
|
+
Object.defineProperty(exports, "OAuth2ClientStore", { enumerable: true, get: function () { return oauth2_clients_1.OAuth2ClientStore; } });
|
|
41
|
+
Object.defineProperty(exports, "ClientRegistrationError", { enumerable: true, get: function () { return oauth2_clients_1.ClientRegistrationError; } });
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAAnC,sGAAA,SAAS,OAAA;AAClB,qDAS6B;AARzB,mHAAA,kBAAkB,OAAA;AAClB,wHAAA,uBAAuB,OAAA;AACvB,mHAAA,kBAAkB,OAAA;AAClB,kHAAA,iBAAiB,OAAA;AACjB,sHAAA,qBAAqB,OAAA;AACrB,6HAAA,4BAA4B,OAAA;AAC5B,iHAAA,gBAAgB,OAAA;AAGpB,qDAM6B;AALzB,8GAAA,aAAa,OAAA;AACb,iHAAA,gBAAgB,OAAA;AAChB,6GAAA,YAAY,OAAA;AACZ,sHAAA,qBAAqB,OAAA;AAGzB,2DAAyC;AACzC,wDAAsC;AACtC,uCAAmE;AAA1D,4GAAA,kBAAkB,OAAA;AAE3B,yDAAiG;AAAxF,wHAAA,qBAAqB,OAAA;AAC9B,uDAK8B;AAJ1B,mHAAA,iBAAiB,OAAA;AACjB,yHAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
/** Path the CA requests. Reserved for ACME by RFC 8615, so nothing else owns it. */
|
|
3
|
+
export declare const ACME_CHALLENGE_PREFIX = "/.well-known/acme-challenge/";
|
|
4
|
+
/**
|
|
5
|
+
* Where the acme adapter publishes. The instance number is not fixed and two
|
|
6
|
+
* instances may be ordering at once, so every match is consulted.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ACME_CHALLENGE_STATE_PATTERN = "acme.*.info.httpChallenges";
|
|
9
|
+
/**
|
|
10
|
+
* RFC 8555 tokens are base64url. Anything else is rejected before it can reach
|
|
11
|
+
* a lookup, which keeps this unauthenticated path from turning arbitrary URLs
|
|
12
|
+
* into database reads.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ACME_TOKEN_REGEX: RegExp;
|
|
15
|
+
/** One entry of the published token map, keyed by token. */
|
|
16
|
+
export interface PublishedAcmeChallenge {
|
|
17
|
+
/** Served verbatim as the response body: `token.thumbprint` */
|
|
18
|
+
keyAuthorization: string;
|
|
19
|
+
/** ms epoch after which the entry must be treated as gone */
|
|
20
|
+
expires: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Pick the challenge token out of a request URL, if it is one at all.
|
|
24
|
+
*
|
|
25
|
+
* @param url the raw request URL
|
|
26
|
+
* @returns the token, or null when this request is not an ACME challenge
|
|
27
|
+
*/
|
|
28
|
+
export declare function acmeChallengeToken(url: string | undefined): string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Look a token up in what the acme adapter currently publishes.
|
|
31
|
+
*
|
|
32
|
+
* Read on demand rather than kept in a subscription cache: the adapter
|
|
33
|
+
* publishes a token and has the CA validate it immediately afterwards, so a
|
|
34
|
+
* cache would race with the order it is meant to serve. The path is only hit a
|
|
35
|
+
* handful of times per certificate.
|
|
36
|
+
*
|
|
37
|
+
* @param adapter the ioBroker adapter
|
|
38
|
+
* @param token the token from the request URL
|
|
39
|
+
* @returns the key authorization to answer with, or null
|
|
40
|
+
*/
|
|
41
|
+
export declare function findAcmeChallenge(adapter: ioBroker.Adapter, token: string): Promise<string | null>;
|
|
42
|
+
/**
|
|
43
|
+
* Answer an ACME HTTP-01 challenge request.
|
|
44
|
+
*
|
|
45
|
+
* Answers only when the token is actually published. Anything else - a request
|
|
46
|
+
* that is not a challenge, an unknown token, a states DB that cannot be read -
|
|
47
|
+
* is reported as unhandled so the caller passes it on. Nothing an application
|
|
48
|
+
* serves on that path is ever shadowed by this.
|
|
49
|
+
*
|
|
50
|
+
* @param adapter the ioBroker adapter
|
|
51
|
+
* @param req the incoming request
|
|
52
|
+
* @param res the response to write to
|
|
53
|
+
* @returns true when the request was answered here
|
|
54
|
+
*/
|
|
55
|
+
export declare function serveAcmeChallenge(adapter: ioBroker.Adapter, req: IncomingMessage, res: ServerResponse): Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* The same as express middleware, for an adapter that builds its server itself
|
|
58
|
+
* instead of through `WebServer`.
|
|
59
|
+
*
|
|
60
|
+
* Mount it before any authentication:
|
|
61
|
+
* `app.use(acmeChallengeMiddleware(adapter))`
|
|
62
|
+
*
|
|
63
|
+
* @param adapter the ioBroker adapter
|
|
64
|
+
*/
|
|
65
|
+
export declare function acmeChallengeMiddleware(adapter: ioBroker.Adapter): (req: IncomingMessage, res: ServerResponse, next: (err?: any) => void) => void;
|