53 lines
1.5 KiB
Text
53 lines
1.5 KiB
Text
|
|
[Unit]
|
||
|
|
Description=step-ca service
|
||
|
|
Documentation=https://smallstep.com/docs/step-ca
|
||
|
|
Documentation=https://smallstep.com/docs/step-ca/certificate-authority-server-production
|
||
|
|
After=network-online.target
|
||
|
|
Wants=network-online.target
|
||
|
|
StartLimitIntervalSec=30
|
||
|
|
StartLimitBurst=3
|
||
|
|
ConditionFileNotEmpty={{ serveurs_step_ca_steppath }}/config/ca.json
|
||
|
|
ConditionFileNotEmpty={{ serveurs_step_ca_steppath }}/password.txt
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=simple
|
||
|
|
User={{ serveurs_step_ca_utilisateur }}
|
||
|
|
Group={{ serveurs_step_ca_utilisateur }}
|
||
|
|
Environment=STEPPATH={{ serveurs_step_ca_steppath }}
|
||
|
|
WorkingDirectory={{ serveurs_step_ca_steppath }}
|
||
|
|
ExecStart=/usr/bin/step-ca config/ca.json --password-file password.txt
|
||
|
|
ExecReload=/bin/kill --signal HUP $MAINPID
|
||
|
|
Restart=on-failure
|
||
|
|
RestartSec=5
|
||
|
|
TimeoutStopSec=30
|
||
|
|
|
||
|
|
; Process capabilities & privileges
|
||
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||
|
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||
|
|
SecureBits=keep-caps
|
||
|
|
NoNewPrivileges=yes
|
||
|
|
|
||
|
|
; Sandboxing
|
||
|
|
ProtectSystem=full
|
||
|
|
ProtectHome=true
|
||
|
|
RestrictNamespaces=true
|
||
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||
|
|
PrivateTmp=true
|
||
|
|
PrivateDevices=true
|
||
|
|
ProtectClock=true
|
||
|
|
ProtectControlGroups=true
|
||
|
|
ProtectKernelTunables=true
|
||
|
|
ProtectKernelLogs=true
|
||
|
|
ProtectKernelModules=true
|
||
|
|
LockPersonality=true
|
||
|
|
RestrictSUIDSGID=true
|
||
|
|
RemoveIPC=true
|
||
|
|
RestrictRealtime=true
|
||
|
|
SystemCallFilter=@system-service
|
||
|
|
SystemCallArchitectures=native
|
||
|
|
MemoryDenyWriteExecute=true
|
||
|
|
ReadWriteDirectories={{ serveurs_step_ca_steppath }}/db
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|