ansible-role-step-ca/templates/step-ca.service.j2

54 lines
1.4 KiB
Plaintext
Raw Normal View History

2021-05-30 01:00:24 +02:00
[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
2021-06-06 17:32:53 +02:00
ConditionFileNotEmpty=/etc/step-ca/.step/config/ca.json
2021-05-30 01:00:24 +02:00
ConditionFileNotEmpty=/etc/step-ca/password.txt
[Service]
Type=simple
User=step
Group=step
2021-06-06 17:32:53 +02:00
Environment=STEPPATH=/etc/step-ca/.step
WorkingDirectory=/etc/step-ca/.step
ExecStart=/usr/bin/step-ca config/ca.json --password-file ../password.txt
2021-05-30 01:00:24 +02:00
ExecReload=/bin/kill --signal HUP $MAINPID
Restart=on-failure
RestartSec=5
TimeoutStopSec=30
StartLimitInterval=30
StartLimitBurst=3
; 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
2021-06-06 17:32:53 +02:00
ReadWriteDirectories=/etc/step-ca/.step/db
2021-05-30 01:00:24 +02:00
[Install]
WantedBy=multi-user.target