Eigener ACME Server
- step-ca erlaubt es einen eigenen ACME Server zu hosten
- die Software wurde von der Firma Smallstep entwickelt
- ACME-Client bots, die custom ACME Server benutzen können (wie z.B. acme.sh), sind so in der Lage Zertifikate von einen selbst gehosteten Server signieren zu lassen
Installation
[Unit]
Description=step-ca
After=syslog.target network.target
[Service]
User=step
Group=step
ExecStart=/bin/sh -c '/bin/step-ca /home/step/.step/config/ca.json --password-file=/home/step/.step/pwd >> /var/log/step-ca/output.log 2>&1'
Type=simple
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
- Nun noch die richtigen Berechtigungen und Eigentümer auf die benötigten Ordner setzen
- mkdir -p /var/log/step-ca
- chown -R step:step /var/log/step-ca
- Falls der Server auf Port 443 laufen sollte, muss eine Capability auf die Binary gesetzt werden
- setcap CAP_NET_BIND_SERVICE=+eip /bin/step-ca
Konfiguration
- Für die initiale Konfiguration gibt es einen Wizard, welcher die Parameter für eine minimalen Konfiguration abfrägt
- Die Konfiguration sollte als Benutzer step ausgeführt werden
- su - step
- step ca init
Use the arrow keys to navigate: ↓ ↑ → ←
? What deployment type would you like to configure?:
▸ Standalone - step-ca instance you run yourself <--- Das hier
Linked - standalone, plus cloud configuration, reporting & alerting
Hosted - fully-managed step-ca cloud instance run for you by smallstep
✔ Deployment Type: Standalone
What would you like to name your new PKI?
✔ (e.g. Smallstep): MyCompanyName
What DNS names or IP addresses will clients use to reach your CA?
✔ (e.g. ca.example.com[,10.1.2.3,etc.]): acme.domain.internal,1.2.3.4
What IP and port will your new CA bind to? (:443 will bind to 0.0.0.0:443)
✔ (e.g. :443 or 127.0.0.1:443): :443
What would you like to name the CA's first provisioner?
✔ (e.g. you@smallstep.com): admin@domain.mine
Choose a password for your CA keys and first provisioner.
✔ [leave empty and we'll generate one]:
✔ Password: nE&8KP.Ya7BMxxxxxxxxxxxxxe!3}XYm <--- Passwort wird später noch gebraucht
- Das Passwort sollte unter dem Pfad ~/.step/pwd abgespeichert und lesegeschützt gemacht werden
- chmod 400 ~/.step/pwd
- Damit der Dienst das ACME Protokoll bedienen kann, muss ein Provisioner für den Dienst angelegt werden
- step ca provisioner add acme --type ACME --ca-url ~/.step/certs/root_ca.crt
Zertifikat Signierung
Links