podman pull docker.io/mallstep/step-ca:latest
podman run -itd --name smallstep \
-v /home/support/smallstep:/home/step \
-e "DOCKER_STEPCA_INIT_NAME=UNiXStep" \
-e "DOCKER_STEPCA_INIT_DNS_NAMES=localhost,$(hostname -f)" \
-e "DOCKER_STEPCA_INIT_PASSWORD=strongPassword123" \
--health-cmd 'curl -f -k https://localhost:9000/health || exit 1' \
--health-interval 10s \
--health-timeout 3s \
--health-retries 10 \
--health-start-period 10s \
docker.io/smallstep/step-ca:latest
Minimum: 5 minutes
Maximum: 2 years and 30 days (18240 hours)
Default: 1 year (8760 hours)
jq '.authority.claims = {
minTLSCertDuration: "5m",
maxTLSCertDuration: "18240h",
defaultTLSCertDuration: "8760h"
}' /home/support/smallstep/config/ca.json > ca.json.tmp && mv ca.json.tmp /home/support/smallstep/config/ca.json
podman restart smallstep
mkdir -p /home/support/smallstep/aws
podman exec -it smallstep step ca certificate aws aws/aws.crt aws/aws.key --san "*.eu-west-2.compute.amazonaws.com" --san "*.eu-west-2.compute.internal" --san "support" --san "localhost" --san "127.0.0.1" --san "::1" --not-after=8760h
cat smallstep/aws/aws.crt smallstep/certs/intermediate_ca.crt smallstep/aws/aws.key > smallstep/aws/aws.pem
# PFX Certificate
openssl pkcs12 -export -out smallstep/aws/aws.pfx -inkey smallstep/aws/aws.key -in smallstep/aws/aws.crt -certfile smallstep/certs/intermediate_ca.crt
mkdir -p /home/support/smallstep/client
podman exec -it smallstep step ca certificate client client/client.crt client/client.key --not-after=8760h
cat smallstep/client/client.crt smallstep/certs/intermediate_ca.crt smallstep/client/client.key > smallstep/client/client.pem
# PFX Certificate
openssl pkcs12 -export -out smallstep/client/client.pfx -inkey smallstep/client/client.key -in smallstep/client/client.crt -certfile smallstep/certs/intermediate_ca.crt
--kty=kty The kty to build the certificate upon. If unset, default is EC.
kty is a case-sensitive string and must be one of:
--size=size The size (in bits) of the key for RSA and oct key types. RSA keys require a minimum key size of 2048 bits. If unset, default is 2048 bits for RSA keys and 128 bits for oct keys.
podman exec -it smallstep step ca renew aws/aws.crt aws/aws.key
cat aws/aws.crt certs/intermediate_ca.crt aws/aws.key > aws.pem
certutil -addstore Root root_ca.crt
certutil -addstore CA intermediate_ca.crt
certutil -verify aws.crt
...
CertUtil: -verify command completed successfully.
openssl verify -CAfile certs/root_ca.crt -untrusted certs/intermediate_ca.crt aws/aws.crt
# Output
aws.crt: OK
openssl x509 -in aws.crt -noout -text
podman stop smallstep
podman rm smallstep