enodia-sentinal/systemd/enodia-sentinel-web.service

34 lines
1.1 KiB
Desktop File

[Unit]
Description=Enodia Sentinel - read-only web dashboard
After=network-online.target enodia-sentinel.service
Wants=network-online.target
Documentation=https://github.com/Enodia/enodia-sentinel
[Service]
Type=simple
ExecStart=/usr/bin/env enodia-sentinel web
Restart=on-failure
RestartSec=5
# The dashboard only READS the log dir and binds a port. No special privileges:
# lock it down hard. It does not need root, but reads root-owned snapshots, so
# it runs as root with an otherwise minimal surface and no capabilities.
ProtectSystem=strict
# Writable so it can persist an auto-generated token and self-signed TLS
# certificate/key. Set web_token, web_tls_cert, and web_tls_key in config to
# keep this service purely read-only after provisioning.
ReadWritePaths=/var/log/enodia-sentinel
ProtectHome=yes
NoNewPrivileges=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
RestrictSUIDSGID=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes
RestrictNamespaces=yes
CapabilityBoundingSet=
AmbientCapabilities=
[Install]
WantedBy=multi-user.target