step-ca + step-cli install info and other useful tips #11504
heinemannj
started this conversation in
Guides
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
Public key encryption provides a secure method of transmitting data over insecure networks. It allows for secure communication by using a pair of keys:
TLS (Transport Layer Security) certificates, which are based on public key encryption, ensure the authenticity and integrity of data exchanged between a server and a client. They provide trust and verification, protecting against unauthorized access, data tampering, and eavesdropping, thus establishing secure and encrypted connections.
Smallstep
step-caandstep-cliare Certificate Authority (CA) management tools for Windows, Linux, and macOS designed to simplify the process of creation, management, and revocation of certificates for use with TLS, mutual TLS (mTLS) authentication, document signing, and other X.509 authentication as well as SSH keys through a variety of provisioners.See:
step-ca init options
step-cais built for robust certificate management in distributed systems. Runningstep-caeffectively in production requires some knowledge of its strengths and limitations.When you initialize a
two-tier CA, two private keys are generated:intermediate private key, androot private key.It is very important that these private keys be kept secret.
intermediate keyis used by the CA to sign certificates.root keyis not needed for day-to-day CA operation and should be stored offline.A functional DNS infrastructure is required when provisioning TLS certificates for internal domains.
Certificates are created for a host's DNS name(s), which ACME uses to verify the client. You will have to adapt all below instructions to follow your own DNS structure.
See:
Default settings
DomainName=$(hostname -d)
IP=$(hostname -I)
Above options can be partitually changed during the setup.
step-caconfig files:/etc/step-ca/config/ca.json(main CA config file, containing allprovisioner settings)/etc/step-ca/config/defaults.json(default configuration, containing theroot fingerprintgenerated duringstep-ca init)step-cacert files:/etc/step-ca/certs/root_ca.crt/etc/step-ca/certs/intermediate_ca.crtstep-cakey files:/etc/step-ca/secrets/root_ca_key/etc/step-ca/secrets/intermediate_ca_keySee:
SystemD Service
systemctl status step-ca.servicesystemd config file:
/etc/systemd/system/step-ca.serviceTrust your root CA
You’ll need to do this for every single computer which you use to access your sites, or you’ll get a certificate error. But once you add the root certificate, then you can continue to add homelab services without needing to individually trust each one on each user’s system.
Debian and others Linux OSs
Windows workstation
https://{ca-host}.{DomainName}/roots.pemhttps://{ca-host}.{DomainName}/1.0/intermediates.pemroot CAby double click on the cert fileLocal Computerautomatic selectionand finish the importIntermediate CAstep-ca URLs
https://{ca-host}.{DomainName}/roots.pemhttps://{ca-host}.{DomainName}/1.0/intermediates.pemhttps://{ca-host}.{DomainName}/provisionershttps://{ca-host}.{DomainName}/acme/acme@{DomainName}/directoryUseful commands
Cert db export
$STEPHOME/step-badger-x509Certs.sh$STEPHOME/step-badger-sshCerts.shCert inspect
step certificate inspect <cert-file>See:
ls -lisa $STEPHOME/certs/ls -lisa $STEPPATH/certs/Cert request
$STEPHOME/step-ca-request.shPossible future improvement:
Cert revocation
step ca revoke {serialnumber}ACME client setup
PROXMOX VE LXCs
step-cli AddonPROXMOX VE Node
node > System > Certificates > ACME >

AddDomainnode > System > Certificates > ACME >
Add ACME AccountAccount Name: acmeE-Mail: acme@{DomainName}ACME Directory: CustomURL: https://{ca-host}.{DomainName}/acme/acme@{DomainName}/directoryQuery URLRegisternode > System > Certificates > ACME >
Order Certificates NowPROXMOX Backup Server
ACME Directoryactually not implementedwget --no-check-certificate https://{ca-host}.{DomainName}/roots.pem -O /usr/local/share/ca-certificates/{PKIName}_Root_CA.crtupdate-ca-certificatesproxmox-backup-manager acme account register default acme@{DomainName} --directory https://{ca-host}.{DomainName}/acme/acme@{DomainName}/directoryPROXMOX Datacenter Manager
ACME Directoryactually not implementedSee:
https://forum.proxmox.com/threads/cli-based-tool-to-handle-acme-requests.178263/
https://forum.proxmox.com/threads/pdm-acme-account-to-local-ca.177358/
References
step-ca
step-cais a private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.step-cli
step-cliis an easy-to-use CLI tool for building, operating, and automating Public Key Infrastructure (PKI) systems and workflows.It's also a client for the
step-caonline Certificate Authority (CA) server.step-badger
Exporting data out of the badger database of step-ca.
Beta Was this translation helpful? Give feedback.
All reactions