Step CA: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 58: | Zeile 58: | ||
What IP and port will your new CA bind to? (:443 will bind to 0.0.0.0:443) | 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''' | ✔ (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''' | ||
= Zertifikat Signierung = | = Zertifikat Signierung = | ||
Version vom 15. Februar 2024, 14:57 Uhr
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
- Es sind zwei Pakete erforderlich, um step-ca zu betreiben: step-cli und step-certificates
- Für Debian basierte Systeme wäre es:
- wget https://dl.smallstep.com/gh-release/certificates/gh-release-header/vXX.YY.ZZ/step-ca_XX.YY.ZZ_amd64.deb
- dpkg -i step-ca_XX.YY.ZZ_amd64.deb
- wget https://dl.smallstep.com/gh-release/cli/gh-release-header/vXX.YY.ZZ/step-cli_XX.YY.ZZ_amd64.deb
- dpkg -i step-cli_XX.YY.ZZ_amd64.deb
- Der step-Dienst sollte unter einen dedizierten Nutzer laufen
- useradd -m -s /bin/bash step
- Ein systemd-Dienst kann angelegt werden, um das Starten, Überwachen und Stoppen zu vereinfachen
- vim /etc/systemd/system/step-ca.service
[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
- 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