diff --git a/store/templates/installation.php b/store/templates/installation.php index cc854ea..6058a22 100644 --- a/store/templates/installation.php +++ b/store/templates/installation.php @@ -19,7 +19,15 @@ sudo apt install -y git # Requirement: netbox-plugin-store @ git+https://git.mrblake.cc/MrBlake/Netbox-Store.git@main#subdirectory=netbox_plugin -
NetBox 4.6 warnt beim Start, wenn kein Pepper für v2-API-Tokens vorhanden ist. Erzeuge einmalig einen zufälligen Wert:
+sudo /opt/netbox/venv/bin/python /opt/netbox/netbox/generate_secret_key.py
+ Übernimm die Ausgabe anschließend in /opt/netbox/netbox/netbox/configuration.py. Die Ganzzahl 1 ist die Pepper-ID:
API_TOKEN_PEPPERS = {
+ 1: "HIER_DEN_GENERIERTEN_WERT_EINTRAGEN",
+}
+
+ Ergänze die NetBox-Konfiguration:
PLUGINS = [
"netbox_plugin_store",
@@ -41,7 +49,7 @@ PLUGINS_CONFIG = {
sudo /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py migrate
sudo /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
sudo systemctl restart netbox netbox-rq
- 3. Sicheren Host-Agent einrichten
+ 4. Sicheren Host-Agent einrichten
dry_run verändert das System nicht. Für Installieren, Aktualisieren, Aktivieren und Entfernen wird der mitgelieferte Linux Host-Agent benötigt. Installiere ihn aus host_agent/, prüfe /etc/netbox-store-agent/agent.toml und stelle anschließend execution_mode auf agent.
Source-Kandidaten werden nur nach Admin-Freigabe verarbeitet. Der Agent prüft Commitbindung, Größe und SHA-256, baut daraus lokal ein Wheel und installiert nicht direkt aus einem beweglichen Branch.
diff --git a/store/tests/run.php b/store/tests/run.php
index a8f7323..4abd4ae 100644
--- a/store/tests/run.php
+++ b/store/tests/run.php
@@ -494,6 +494,8 @@ test('public and admin templates render safely with complete artifact evidence',
assertTrue(str_contains($installation, 'https://git.mrblake.cc/MrBlake/Netbox-Store/archive/main.tar.gz'));
assertTrue(str_contains($installation, 'sudo apt install -y git'));
assertTrue(str_contains($installation, 'https://netbox.mrblake.cc'));
+ assertTrue(str_contains($installation, 'API_TOKEN_PEPPERS'));
+ assertTrue(str_contains($installation, '/opt/netbox/netbox/generate_secret_key.py'));
$admin = $view->render('admin/dashboard', [
'title' => 'Admin', 'currentPath' => '/admin', 'adminEnabled' => true, 'adminUser' => 'admin',
'csrf' => 'safe-token', 'ok' => '', 'error' => '', 'sources' => $state['sources'],