iobroker.eos-admin 9.0.28 → 9.0.29
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 +10 -9
- package/README.md +9 -9
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-DBLX7GoO.js → AdapterUpdateDialog-DXp4Dgkx.js} +1 -1
- package/adminWww/assets/{Adapters-c250DTTU.js → Adapters-1AOp__74.js} +1 -1
- package/adminWww/assets/{ConfigManager-BBUXk8hZ.js → ConfigManager-CGGXU4Jp.js} +1 -1
- package/adminWww/assets/{Enums-CWJJ2zNF.js → Enums-Bl4EngJF.js} +1 -1
- package/adminWww/assets/{Fields-CNefAzNH.js → Fields-zSEjRWOB.js} +1 -1
- package/adminWww/assets/{Files-Bf8oZSk6.js → Files-CnYmjEbu.js} +1 -1
- package/adminWww/assets/{Hosts-8gg41ODb.js → Hosts-zFJyiuvd.js} +1 -1
- package/adminWww/assets/{Instances-PPTEPJQN.js → Instances-D10dnQY4.js} +1 -1
- package/adminWww/assets/{Intro-9c_ynpJu.js → Intro-DxLBfGZ8.js} +1 -1
- package/adminWww/assets/{Logs-Brgb9kR_.js → Logs-CAc6o-d_.js} +1 -1
- package/adminWww/assets/{Objects-DHVNfs_x.js → Objects-I64lF3ZS.js} +1 -1
- package/adminWww/assets/{Overview-CgnpH8e8.js → Overview-BQ7HBH-7.js} +1 -1
- package/adminWww/assets/{State-vVobamei.js → State-DHLL8gAc.js} +1 -1
- package/adminWww/assets/{UsedResources-1fEUqiQ6.js → UsedResources-DlQ_XqoR.js} +1 -1
- package/adminWww/assets/{Users-oRpvFtQR.js → Users-CKHDvxG5.js} +1 -1
- package/adminWww/assets/{bootstrap-st8VxLDc.js → bootstrap-CIDT4MeX.js} +3 -3
- package/adminWww/assets/{hostInit-OQMl4yOT.js → hostInit-Cvl4lPGh.js} +1 -1
- package/adminWww/assets/{icons-material-DeF0gQyK.js → icons-material-ngdwOXrt.js} +1 -1
- package/adminWww/assets/{index-D4lV2S7J.js → index-B9Tfj1YG.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-1WdbDz-H.js → installSVGRenderer-COP6GC9p.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-3b253ab0.js → mf-entry-bootstrap-0-31191d2e.js} +2 -2
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/{remoteEntry-eos-9.0.28.js → remoteEntry-eos-9.0.29.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosTlsHttp.js +25 -0
- package/build/lib/eosTlsHttp.js.map +1 -1
- package/build/lib/eosTlsManager.js +317 -67
- package/build/lib/eosTlsManager.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/reports/unified-9.0.29/PRUEFBERICHT.md +30 -0
- package/docs/reports/unified-9.0.29/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.29/raw/INDEX.json +97 -0
- package/docs/reports/unified-9.0.29/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.29/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.29/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.29/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.29/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.29/raw/node22-tests-final.log +17104 -0
- package/docs/reports/unified-9.0.29/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.29/raw/node24-tests-final.log +2852 -0
- package/docs/reports/unified-9.0.29/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.29/raw/npm-audit-runtime.json +77 -0
- package/docs/reports/unified-9.0.29/raw/tls-lint.log +0 -0
- package/docs/reports/unified-9.0.29/raw/tls-targeted-build-node22.log +139 -0
- package/docs/reports/unified-9.0.29/raw/tls-targeted-node24.log +132 -0
- package/docs/reports/unified-9.0.29/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.29/raw/ui-runtime.log +7 -0
- package/docs/start/START_HIER_9.0.29.md +22 -0
- package/docs/unified/NEXOWATT_TLS_DE.md +18 -4
- package/io-package.json +8 -8
- package/package.json +5 -3
- package/public/eos-tls/index.html +96 -8
- package/public/eos-tls/index.js +194 -41
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +85 -64
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +131 -6
- package/release-manifests/unified/runtime.cdx.json +26 -26
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/io-package.json +5 -1
- package/ui/package.json +1 -1
- package/ui/www/manifest.webmanifest +2 -2
|
@@ -1,10 +1,98 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html lang="de"
|
|
2
|
+
<html lang="de">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<title>NexoWatt EOS · Zertifikate</title>
|
|
7
|
+
<link rel="stylesheet" href="/modules/shared/eos-module.css">
|
|
8
|
+
<script src="./index.js" defer></script>
|
|
9
|
+
<script src="/eos-session-idle.js" defer></script>
|
|
3
10
|
</head>
|
|
4
|
-
<body class="eos-module-page"
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
</
|
|
11
|
+
<body class="eos-module-page">
|
|
12
|
+
<main class="eos-module-main">
|
|
13
|
+
<header class="eos-page-header">
|
|
14
|
+
<a class="eos-brand" href="/" aria-label="NexoWatt EOS Dashboard"><img src="/system/img/eos/nexowatt-eos-brand-wide.png" width="190" height="52" alt="NexoWatt EOS"></a>
|
|
15
|
+
<nav class="eos-module-nav" aria-label="EOS Navigation">
|
|
16
|
+
<a href="/">EOS Dashboard</a><a href="/installer/">Installer</a><a href="/system/">EOS Administration</a><a href="/modules/devices/">Geräte</a><a href="/modules/eebus/">EEBus</a><a href="/modules/backup/">Sicherung</a><a href="/security/tls/" aria-current="page">Zertifikate</a>
|
|
17
|
+
</nav>
|
|
18
|
+
</header>
|
|
19
|
+
<section class="eos-module-hero">
|
|
20
|
+
<div>
|
|
21
|
+
<h1>HTTPS-Zertifikate</h1>
|
|
22
|
+
<p>Erstelle ein Zertifikat für dieses EOS und richte das Vertrauen auf deinen Endgeräten ein.</p>
|
|
23
|
+
</div>
|
|
24
|
+
</section>
|
|
25
|
+
|
|
26
|
+
<p id="message" class="eos-message" role="status" aria-live="polite"></p>
|
|
27
|
+
|
|
28
|
+
<div class="eos-workflow-grid">
|
|
29
|
+
<section class="eos-panel">
|
|
30
|
+
<h2>1. Zertifikate erstellen</h2>
|
|
31
|
+
<form id="localForm" class="eos-stack-form">
|
|
32
|
+
<label for="names">Gerätenamen und IP-Adressen, je eine pro Zeile</label>
|
|
33
|
+
<textarea id="names" rows="5" maxlength="8192" aria-describedby="namesHint" required></textarea>
|
|
34
|
+
<p id="namesHint">Trage die Namen und festen IP-Adressen ein, über die du dieses EOS im Browser öffnest. Namensauflösung und Port 443 werden separat eingerichtet.</p>
|
|
35
|
+
<label class="eos-inline-check"><input id="replace" type="checkbox">Vorhandenen, noch nicht übernommenen Entwurf ersetzen</label>
|
|
36
|
+
<button type="submit" class="eos-primary" id="generateLocal" disabled>HTTPS-Zertifikate erstellen</button>
|
|
37
|
+
</form>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
<section class="eos-panel">
|
|
41
|
+
<h2>2. Herunterladen und übernehmen</h2>
|
|
42
|
+
<p id="noLocalDraft">Hier erscheinen die Downloads und der Fingerabdruck nach der Erstellung.</p>
|
|
43
|
+
<div id="localDraft" hidden>
|
|
44
|
+
<p>Lade für Windows oder iPhone das öffentliche Stammzertifikat als CER-Datei herunter. Für dieses EOS kannst du das Gerätezertifikat direkt übernehmen.</p>
|
|
45
|
+
<a class="eos-download" id="localTrustDownload" download>Stammzertifikat für Endgeräte (.cer)</a>
|
|
46
|
+
<a class="eos-download" id="localRootDownload" download>Stammzertifikat (.pem)</a>
|
|
47
|
+
<a class="eos-download" id="localDeviceDownload" download>Gerätezertifikat (.pem)</a>
|
|
48
|
+
<div class="eos-stack-form">
|
|
49
|
+
<label for="localFingerprint">SHA-256-Fingerabdruck des Stammzertifikats</label>
|
|
50
|
+
<input type="text" id="localFingerprint" spellcheck="false" readonly>
|
|
51
|
+
<button type="button" id="copyFingerprint">Fingerabdruck kopieren</button>
|
|
52
|
+
</div>
|
|
53
|
+
<p id="trustChange" class="notice" hidden>Das neue Stammzertifikat unterscheidet sich vom bisher verwendeten. Installiere es vor der Übernahme auf den Endgeräten, die du weiter für den Zugriff brauchst.</p>
|
|
54
|
+
<button type="button" class="eos-primary" id="activateLocal">Für dieses EOS übernehmen</button>
|
|
55
|
+
<p>Bei der ersten Umstellung wird das Zertifikat beim nächsten regulären Adapterneustart aktiv.</p>
|
|
56
|
+
</div>
|
|
57
|
+
</section>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<section class="eos-panel">
|
|
61
|
+
<h2>Aktueller Stand</h2>
|
|
62
|
+
<dl id="status" class="eos-detail-list"></dl>
|
|
63
|
+
<button type="button" id="reload">Status aktualisieren</button>
|
|
64
|
+
<a class="eos-download" id="rootDownload" href="/api/eos/tls/root.cer" download hidden>Öffentliches Stammzertifikat des aktuellen Stands herunterladen</a>
|
|
65
|
+
</section>
|
|
66
|
+
|
|
67
|
+
<section class="eos-panel">
|
|
68
|
+
<h2>Vertrauen auf Endgeräten</h2>
|
|
69
|
+
<p>Übertrage das öffentliche Stammzertifikat aus deiner bestätigten EOS-Verwaltung auf deine Endgeräte. Bei einer Übergabe gib den Fingerabdruck auf einem separaten, vertrauenswürdigen Weg weiter.</p>
|
|
70
|
+
<p><strong>Windows:</strong> Das öffentliche Stammzertifikat nach Vergleich des Fingerabdrucks in „Vertrauenswürdige Stammzertifizierungsstellen“ importieren.</p>
|
|
71
|
+
<p><strong>iPhone / iPad:</strong> Zertifikat installieren und anschließend unter Einstellungen → Allgemein → Info → Zertifikatsvertrauenseinstellungen das volle Vertrauen aktivieren.</p>
|
|
72
|
+
<p><strong>macOS / Android / Firefox:</strong> Das Stammzertifikat im jeweiligen System- oder Browser-Zertifikatsspeicher installieren. Eigene App-Vertrauensregeln können davon abweichen.</p>
|
|
73
|
+
<p><a href="/security/trust/">Einrichtung auf diesem Gerät öffnen</a>. Dort findest du das übernommene öffentliche Stammzertifikat auch als CER-Datei.</p>
|
|
74
|
+
</section>
|
|
75
|
+
|
|
76
|
+
<details class="eos-panel" id="externalWorkflow">
|
|
77
|
+
<summary>Optional: Zertifikat von NexoWatt signieren lassen</summary>
|
|
78
|
+
<form id="requestForm" class="eos-stack-form">
|
|
79
|
+
<p>Die Anfrage verwendet die Namen und IP-Adressen aus Schritt 1. Der private Geräteschlüssel bleibt auf diesem EOS.</p>
|
|
80
|
+
<button type="submit" id="generateExternal" disabled>Anfrage für NexoWatt erstellen</button>
|
|
81
|
+
</form>
|
|
82
|
+
<p id="noExternalDraft">Erstelle eine Anfrage, um sie herunterladen und signieren lassen zu können.</p>
|
|
83
|
+
<div id="externalDraft" hidden>
|
|
84
|
+
<p><a class="eos-download" id="requestDownload" href="/api/eos/tls/request.pem" download>Zertifikatsanfrage für NexoWatt herunterladen</a></p>
|
|
85
|
+
<form id="importForm" class="eos-stack-form">
|
|
86
|
+
<label for="certificate">Gerätezertifikat mit Zwischenzertifikaten (PEM)</label>
|
|
87
|
+
<input id="certificate" type="file" accept=".pem,.crt" required>
|
|
88
|
+
<label for="root">Öffentliches Stammzertifikat (PEM)</label>
|
|
89
|
+
<input id="root" type="file" accept=".pem,.crt" required>
|
|
90
|
+
<label for="fingerprint">Unabhängig bestätigter SHA-256-Fingerabdruck der Stamm-CA</label>
|
|
91
|
+
<input id="fingerprint" type="text" maxlength="100" autocomplete="off" required>
|
|
92
|
+
<button type="submit" class="eos-primary" id="importCertificate">Prüfen und übernehmen</button>
|
|
93
|
+
</form>
|
|
94
|
+
</div>
|
|
95
|
+
</details>
|
|
96
|
+
</main>
|
|
97
|
+
</body>
|
|
98
|
+
</html>
|
package/public/eos-tls/index.js
CHANGED
|
@@ -8,70 +8,223 @@
|
|
|
8
8
|
const errors = {
|
|
9
9
|
AUTHENTICATION_REQUIRED: 'Bitte erneut bei EOS anmelden. Die Eingaben bleiben in diesem Fenster erhalten.',
|
|
10
10
|
ADMIN_REQUIRED: 'Für die Zertifikatsverwaltung ist ein Administratorkonto erforderlich.',
|
|
11
|
+
PASSWORD_CHANGE_REQUIRED: 'Ändere zuerst dein EOS-Passwort und öffne danach die Zertifikatsverwaltung erneut.',
|
|
11
12
|
AUTH_CSRF: 'Die Sicherheitsfreigabe ist abgelaufen. Status aktualisieren und erneut versuchen.',
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
EOS_TLS_INVALID_NAMES: 'Bitte gültige Gerätenamen und IP-Adressen eingeben.',
|
|
14
|
+
EOS_TLS_LOCAL_NAME_NOT_ASSIGNED: 'Die lokale Ausstellung verwendet nur Namen und IP-Adressen dieses EOS. Nutze für weitere bestätigte Namen den optionalen Weg über NexoWatt.',
|
|
15
|
+
EOS_TLS_PENDING_REQUEST_EXISTS: 'Ein Entwurf liegt bereits vor. Aktiviere zum Ersetzen das Kontrollfeld in Schritt 1.',
|
|
16
|
+
EOS_TLS_REQUEST_MISMATCH: 'Der Vorgang gehört nicht zum aktuellen Entwurf. Bitte Status aktualisieren.',
|
|
17
|
+
EOS_TLS_LOCAL_CERTIFICATE_NOT_FOUND: 'Der lokale Entwurf ist nicht mehr verfügbar. Bitte Status aktualisieren.',
|
|
14
18
|
EOS_TLS_ROOT_FINGERPRINT_MISMATCH: 'Der bestätigte Fingerabdruck passt nicht zum Stammzertifikat.',
|
|
15
19
|
EOS_TLS_SAN_MISMATCH: 'Das Zertifikat enthält nicht alle angeforderten Namen und IP-Adressen.',
|
|
16
20
|
EOS_TLS_KEY_OR_CA_MISMATCH: 'Zertifikat, Geräteschlüssel und Stamm-CA passen nicht zusammen.',
|
|
17
21
|
EOS_TLS_SERVER_USAGE_REQUIRED: 'Das Zertifikat ist nicht ausdrücklich für HTTPS-Server ausgestellt.',
|
|
18
22
|
EOS_TLS_LIFETIME_INVALID: 'Das Gerätezertifikat muss noch mindestens einen Tag gültig sein und darf höchstens 397 Tage Laufzeit haben.',
|
|
19
|
-
EOS_TLS_OPENSSL_FAILED: 'Die
|
|
23
|
+
EOS_TLS_OPENSSL_FAILED: 'Die Zertifikatsaktion ist fehlgeschlagen. Prüfe das Systemprotokoll und die OpenSSL-Verfügbarkeit.',
|
|
20
24
|
EOS_TLS_STORAGE_UNAVAILABLE: 'Der geschützte Zertifikatsspeicher ist nicht verfügbar. Bestehenden HTTPS-Zugang beibehalten und das Systemprotokoll prüfen.',
|
|
21
25
|
EOS_TLS_BUSY: 'Eine Zertifikatsaktion läuft bereits. Kurz warten und den Status aktualisieren.',
|
|
22
|
-
EOS_TLS_STORAGE_SYNC_WARNING: 'Der neue Stand wurde
|
|
23
|
-
EOS_TLS_PENDING_CLEANUP_WARNING: 'Das Zertifikat wurde übernommen
|
|
26
|
+
EOS_TLS_STORAGE_SYNC_WARNING: 'Der neue Stand wurde gespeichert, aber das Dateisystem konnte die dauerhafte Verzeichnissicherung nicht bestätigen. Datenträger und Systemprotokoll prüfen.',
|
|
27
|
+
EOS_TLS_PENDING_CLEANUP_WARNING: 'Das Zertifikat wurde übernommen. Eine verbrauchte Anfragedatei konnte noch nicht bereinigt werden und bleibt gesperrt.',
|
|
24
28
|
};
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
function message(value, error = false) {
|
|
31
|
+
byId('message').textContent = value;
|
|
32
|
+
byId('message').className = error ? 'eos-message is-error' : 'eos-message';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function describeError(code, fallback = 'Die Zertifikatsaktion konnte nicht abgeschlossen werden.') {
|
|
36
|
+
return Object.hasOwn(errors, code) ? errors[code] : fallback;
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
async function api(path, data) {
|
|
40
|
+
if (data && (!csrf || state?.error)) throw new Error('Bitte zuerst den aktuellen Status laden.');
|
|
27
41
|
const controller = new AbortController();
|
|
28
|
-
const timer = setTimeout(() => controller.abort(),
|
|
42
|
+
const timer = setTimeout(() => controller.abort(), 45000);
|
|
29
43
|
try {
|
|
30
|
-
const response = await fetch(path, {
|
|
31
|
-
|
|
44
|
+
const response = await fetch(path, {
|
|
45
|
+
method: data ? 'POST' : 'GET',
|
|
46
|
+
credentials: 'same-origin',
|
|
47
|
+
cache: 'no-store',
|
|
48
|
+
redirect: 'error',
|
|
49
|
+
signal: controller.signal,
|
|
50
|
+
headers: data ? { 'Content-Type': 'application/json', 'x-nw-csrf': csrf } : {},
|
|
51
|
+
body: data ? JSON.stringify(data) : undefined,
|
|
52
|
+
});
|
|
32
53
|
const result = await response.json();
|
|
33
|
-
if (!response.ok) throw new Error(
|
|
54
|
+
if (!response.ok) throw new Error(describeError(result?.error));
|
|
34
55
|
return result;
|
|
35
|
-
} finally {
|
|
56
|
+
} finally {
|
|
57
|
+
clearTimeout(timer);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function fingerprintHex(value) {
|
|
62
|
+
if (typeof value !== 'string') return '';
|
|
63
|
+
const hex = value.replaceAll(':', '').toUpperCase();
|
|
64
|
+
return /^[A-F0-9]{64}$/.test(hex) ? hex : '';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function currentPending() {
|
|
68
|
+
const pending = state?.pending;
|
|
69
|
+
return typeof pending?.requestId === 'string' && /^[a-f0-9]{32}$/.test(pending.requestId) ? pending : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function localDraft() {
|
|
73
|
+
const pending = currentPending();
|
|
74
|
+
return pending?.local === true && fingerprintHex(pending.rootFingerprint) ? pending : null;
|
|
36
75
|
}
|
|
76
|
+
|
|
77
|
+
function setActions() {
|
|
78
|
+
byId('reload').disabled = busy;
|
|
79
|
+
byId('generateLocal').disabled = busy || !csrf || !!state?.error;
|
|
80
|
+
byId('generateExternal').disabled = busy || !csrf || !!state?.error;
|
|
81
|
+
const pending = currentPending();
|
|
82
|
+
const local = localDraft();
|
|
83
|
+
byId('copyFingerprint').disabled = busy || !local;
|
|
84
|
+
byId('activateLocal').disabled = busy || !csrf || !local || !!state?.error;
|
|
85
|
+
byId('importCertificate').disabled = busy || !csrf || !pending || pending.local === true || !!state?.error;
|
|
86
|
+
}
|
|
87
|
+
|
|
37
88
|
function render(value) {
|
|
38
89
|
state = value;
|
|
39
|
-
if (value.csrfToken) csrf = value.csrfToken;
|
|
40
|
-
const status = byId('status');
|
|
90
|
+
if (typeof value.csrfToken === 'string') csrf = value.csrfToken;
|
|
91
|
+
const status = byId('status');
|
|
92
|
+
status.replaceChildren();
|
|
41
93
|
const rows = [
|
|
42
|
-
['Betrieb', value.restartRequired ? 'Zertifikat geprüft und gespeichert
|
|
43
|
-
['Aussteller', value.issuer || 'Noch kein
|
|
44
|
-
['Zertifikatskette gültig bis', value.effectiveValidTo || value.validTo || '—'],
|
|
45
|
-
['
|
|
46
|
-
['
|
|
47
|
-
['
|
|
94
|
+
['Betrieb', value.restartRequired ? 'Zertifikat geprüft und gespeichert. Aktivierung beim nächsten regulären Adapterneustart.' : value.mode === 'nexowatt-managed' ? 'Verwaltetes EOS-Zertifikat aktiv' : 'Bestehendes ioBroker-Zertifikat aktiv'],
|
|
95
|
+
['Aussteller', value.issuer || 'Noch kein EOS-Zertifikat übernommen'],
|
|
96
|
+
['Zertifikatskette gültig bis', value.effectiveValidTo || value.validTo || '—'],
|
|
97
|
+
['Zertifikatsstatus', value.valid === false ? 'Abgelaufen oder noch nicht gültig. Erneuerung erforderlich.' : value.expiresSoon ? 'Erneuerung innerhalb von 30 Tagen erforderlich.' : value.valid ? 'Zeitlich gültig' : '—'],
|
|
98
|
+
['Namen und IP-Adressen', (value.names || []).join(', ') || '—'],
|
|
99
|
+
['Stamm-CA SHA-256', value.rootFingerprint || '—'],
|
|
100
|
+
['Gerätezertifikat SHA-256', value.fingerprint || '—'],
|
|
48
101
|
];
|
|
49
|
-
for (const [name, content] of rows) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
102
|
+
for (const [name, content] of rows) {
|
|
103
|
+
const term = document.createElement('dt');
|
|
104
|
+
term.textContent = name;
|
|
105
|
+
const detail = document.createElement('dd');
|
|
106
|
+
detail.textContent = content;
|
|
107
|
+
status.append(term, detail);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const pending = currentPending();
|
|
111
|
+
const local = localDraft();
|
|
112
|
+
const external = Boolean(pending && pending.local !== true);
|
|
113
|
+
const localFingerprint = fingerprintHex(local?.rootFingerprint);
|
|
114
|
+
const activeFingerprint = fingerprintHex(value.rootFingerprint);
|
|
115
|
+
byId('localDraft').hidden = !local;
|
|
116
|
+
byId('noLocalDraft').hidden = Boolean(local);
|
|
117
|
+
byId('localFingerprint').value = localFingerprint.match(/../g)?.join(':') || '';
|
|
118
|
+
byId('trustChange').hidden = !local || !activeFingerprint || localFingerprint === activeFingerprint;
|
|
119
|
+
for (const [id, file] of [['localTrustDownload', 'root.cer'], ['localRootDownload', 'root.pem'], ['localDeviceDownload', 'device.pem']]) {
|
|
120
|
+
const link = byId(id);
|
|
121
|
+
if (local) link.href = `/api/eos/tls/local/${file}?requestId=${local.requestId}`;
|
|
122
|
+
else link.removeAttribute('href');
|
|
123
|
+
}
|
|
124
|
+
byId('rootDownload').hidden = !activeFingerprint;
|
|
125
|
+
byId('externalDraft').hidden = !external;
|
|
126
|
+
byId('noExternalDraft').hidden = external;
|
|
127
|
+
if (external) byId('externalWorkflow').open = true;
|
|
128
|
+
if (!byId('names').value) byId('names').value = (pending?.names || value.suggestedNames || []).join('\n');
|
|
129
|
+
setActions();
|
|
130
|
+
if (value.error) message(describeError(value.error), true);
|
|
131
|
+
else if (value.warnings?.length) message(value.warnings.map(code => describeError(code)).join(' '), true);
|
|
55
132
|
}
|
|
133
|
+
|
|
56
134
|
async function run(task) {
|
|
57
135
|
if (busy) return;
|
|
58
136
|
busy = true;
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
|
|
137
|
+
setActions();
|
|
138
|
+
try {
|
|
139
|
+
await task();
|
|
140
|
+
} catch (error) {
|
|
141
|
+
message(error.name === 'AbortError' ? 'Zeitüberschreitung. Status aktualisieren, bevor du die Aktion erneut ausführst.' : error.message, true);
|
|
142
|
+
} finally {
|
|
143
|
+
busy = false;
|
|
144
|
+
setActions();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function pendingInput() {
|
|
149
|
+
return {
|
|
150
|
+
names: byId('names').value.split(/[\n,]+/).map(value => value.trim()).filter(Boolean),
|
|
151
|
+
replace: byId('replace').checked,
|
|
152
|
+
};
|
|
62
153
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
154
|
+
|
|
155
|
+
function showActivation(value) {
|
|
156
|
+
render(value);
|
|
157
|
+
if (value.error || value.warnings?.length) return;
|
|
158
|
+
message(value.restartRequired
|
|
159
|
+
? 'Gespeichert. Beim nächsten regulären Adapterneustart wird das Zertifikat aktiv.'
|
|
160
|
+
: 'Das Zertifikat ist jetzt aktiv. Richte das Vertrauen auf deinen Endgeräten ein.');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
byId('reload').addEventListener('click', () => {
|
|
164
|
+
void run(async () => {
|
|
165
|
+
const value = await api('/api/eos/tls');
|
|
166
|
+
render(value);
|
|
167
|
+
if (!value.error && !value.warnings?.length) message('Status aktualisiert.');
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
byId('localForm').addEventListener('submit', event => {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
void run(async () => {
|
|
173
|
+
const value = await api('/api/eos/tls/local', pendingInput());
|
|
174
|
+
render(value);
|
|
175
|
+
byId('replace').checked = false;
|
|
176
|
+
if (localDraft() && !value.error && !value.warnings?.length) message('Zertifikate und Fingerabdruck stehen in Schritt 2 bereit.');
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
byId('copyFingerprint').addEventListener('click', async () => {
|
|
180
|
+
const field = byId('localFingerprint');
|
|
181
|
+
if (busy || !field.value) return;
|
|
182
|
+
try {
|
|
183
|
+
await navigator.clipboard.writeText(field.value);
|
|
184
|
+
message('SHA-256-Fingerabdruck kopiert.');
|
|
185
|
+
} catch {
|
|
186
|
+
field.focus();
|
|
187
|
+
field.select();
|
|
188
|
+
message('Der Fingerabdruck ist markiert. Kopiere ihn über die Tastatur oder das Auswahlmenü.');
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
byId('activateLocal').addEventListener('click', () => {
|
|
192
|
+
void run(async () => {
|
|
193
|
+
const local = localDraft();
|
|
194
|
+
if (!local) throw new Error('Bitte zuerst HTTPS-Zertifikate erstellen.');
|
|
195
|
+
showActivation(await api('/api/eos/tls/local/activate', {
|
|
196
|
+
requestId: local.requestId,
|
|
197
|
+
rootFingerprint: byId('localFingerprint').value,
|
|
198
|
+
}));
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
byId('requestForm').addEventListener('submit', event => {
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
void run(async () => {
|
|
204
|
+
if (!byId('names').reportValidity()) return;
|
|
205
|
+
const value = await api('/api/eos/tls/request', pendingInput());
|
|
206
|
+
render(value);
|
|
207
|
+
byId('replace').checked = false;
|
|
208
|
+
if (!value.error && !value.warnings?.length) message('Anfrage erstellt. Lade sie herunter und lasse sie von NexoWatt signieren.');
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
byId('importForm').addEventListener('submit', event => {
|
|
212
|
+
event.preventDefault();
|
|
213
|
+
void run(async () => {
|
|
214
|
+
const pending = currentPending();
|
|
215
|
+
if (!pending || pending.local === true) throw new Error('Bitte zuerst eine Anfrage für NexoWatt erstellen.');
|
|
216
|
+
const certificate = byId('certificate').files[0];
|
|
217
|
+
const root = byId('root').files[0];
|
|
218
|
+
if (!certificate || !root || certificate.size > 48000 || root.size > 16000) throw new Error('Bitte gültige PEM-Dateien auswählen (Gerätekette bis 48 kB, Stammzertifikat bis 16 kB).');
|
|
219
|
+
const value = await api('/api/eos/tls/certificate', {
|
|
220
|
+
requestId: pending.requestId,
|
|
221
|
+
certificate: await certificate.text(),
|
|
222
|
+
rootCertificate: await root.text(),
|
|
223
|
+
rootFingerprint: byId('fingerprint').value.trim(),
|
|
224
|
+
});
|
|
225
|
+
showActivation(value);
|
|
226
|
+
byId('importForm').reset();
|
|
227
|
+
});
|
|
228
|
+
});
|
|
76
229
|
void run(async () => { render(await api('/api/eos/tls')); });
|
|
77
230
|
})();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.5",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:984fca16-c5d6-4dd6-8ac9-241b085d8165",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-26T09:06:38.751Z",
|
|
9
9
|
"lifecycles": [
|
|
10
10
|
{
|
|
11
11
|
"phase": "pre-build"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"component": {
|
|
22
|
-
"bom-ref": "iobroker.eos-admin@9.0.
|
|
22
|
+
"bom-ref": "iobroker.eos-admin@9.0.29",
|
|
23
23
|
"type": "library",
|
|
24
24
|
"name": "iobroker.eos-admin",
|
|
25
|
-
"version": "9.0.
|
|
25
|
+
"version": "9.0.29",
|
|
26
26
|
"scope": "required",
|
|
27
27
|
"author": "NexoWatt",
|
|
28
28
|
"description": "NexoWatt EOS: licensed local energy management, dashboard and ioBroker system administration in one adapter.",
|
|
29
|
-
"purl": "pkg:npm/iobroker.eos-admin@9.0.
|
|
29
|
+
"purl": "pkg:npm/iobroker.eos-admin@9.0.29",
|
|
30
30
|
"properties": [],
|
|
31
31
|
"externalReferences": []
|
|
32
32
|
}
|
|
@@ -26355,7 +26355,7 @@
|
|
|
26355
26355
|
],
|
|
26356
26356
|
"dependencies": [
|
|
26357
26357
|
{
|
|
26358
|
-
"ref": "iobroker.eos-admin@9.0.
|
|
26358
|
+
"ref": "iobroker.eos-admin@9.0.29",
|
|
26359
26359
|
"dependsOn": [
|
|
26360
26360
|
"@iobroker/adapter-core@3.4.3",
|
|
26361
26361
|
"@iobroker/plugin-docker@1.2.1",
|