Smallstep: End-to-end encryption for distributed applications and the people who manage them. (we’re on Pacific Time)
ufw
to allow only port 443 and also set my network's firewall rules accordingly, it should be secure enough... Ideally I'd like to be able to generate SSH certificates from anywhere (whether I'm at home, which is 90% of the time these days, or out) to connect to my hosts. I've tried using Cloudflare, but testing with the step ca certificate
command yielded x509: certificate signed by unknown authority
errors. I guess I could also setup VPN to my home network (where the CA is hosted) and connect via VPN for SSH cert generation once per day if I'm not home, too...
ssh -T git@github.com
test. I've been extracting the currently active step SSH public key like this step ssh list --raw | step crypto key format --ssh
on my local machine, with output looking something like this ecdsa-sha2-nistp256 AAAAE2VjZHNhLXN...
, then adding it to my github account. However, that didn't seem to work and I keep getting Permission denied (publickey).
errors when testing SSH. I've also tried uploading the output of step ssh list --raw
, but their web UI didn't like that, even after changing the ecdsa-sha2-nistp256-cert-v01@openssh.com
head to ecdsa-sha2-nistp256
.Hello! Can somebody explain how stepca acme server checks the email in incoming requests?
I have stepca with admin@***.com
JWK provisioner created during ca init and if I use this email for ACME - all works fine.
But I can't use any other emails. I tried to add another JWK provisioner with acme@***.com
but I can't get the certificate for this email.
Can i get the certificate for other emails/provisioner emails or I should use only the first provisioner email?
I use Caddy as ACME client with simple config:
{
email acme@***.com
acme_ca https://acme.***.corp/acme/acme/directory
acme_ca_root /etc/caddy/root_ca.crt
}
Provisioner List:
[
{
"type": "JWK",
"name": "admin@***.com",
"key": {
"use": "sig",
"kty": "EC",
"kid": "***",
"crv": "P-256",
"alg": "ES256",
"x": "***",
"y": "***"
},
"encryptedKey": "***,
"claims": {
"maxTLSCertDuration": "8760h0m0s",
"defaultTLSCertDuration": "2160h0m0s"
}
},
{
"type": "ACME",
"name": "acme",
"claims": {
"maxTLSCertDuration": "2160h0m0s",
"defaultTLSCertDuration": "2160h0m0s"
}
},
{
"type": "JWK",
"name": "acme@***.com",
"key": {
"use": "sig",
"kty": "EC",
"kid": "***",
"crv": "P-256",
"alg": "ES256",
"x": "***",
"y": "***"
},
"encryptedKey": "***"
}
]
step-ca
the way to use ACME is by selecting the ACME provisioner from the provisioners drop down when you do step ca certificate
.
step ca certificate
command you’re trying to run that is failing.
--daemon
mode or just trigger task scheduler a couple times throughout day.
yes, the generate
one , the only thing that you need to decide is which slots do you want to use, and configure them in the ca.json, right now step-yubikey-init
stores the root key in 9a, and the intermediate in 9c
At some point all these step-foo-init
commands will be implemented in step ca init
and ssh will be supported
step-ca
and CAA
support. I can't find any references at all to this, other than @mmalone back in April 2020 implying that it doesn't (didn't) currently respect CAA
records. IMHO this would be useful to support, but we would need to know in advance so appropriate records could be provisioned before hand.Hoping someone can point me in the right direction as I'm having a hard time finding it in the docs. I need to use a yubikey for the ssh block:
"root": "/etc/step-ca/certs/root_ca.crt",
"federatedRoots": [],
"crt": "/etc/step-ca/certs/intermediate_ca.crt",
"key": "yubikey:slot-id=9c",
"kms": {
"type": "yubikey",
"pin": ""
},
"address": ":443",
"dnsNames": [
"pki.tld",
"10.20.0.15"
],
"ssh": {
"hostKey": "/etc/step-ca/secrets/ssh_host_ca_key",
"userKey": "/etc/step-ca/secrets/ssh_user_ca_key"
},
I believe I have the SSH keys loaded properly in the yubikey into slots 82 and 83:
Slot 82:
Algorithm: ECCP256
Subject DN: CN=SSH Host Key
Issuer DN: CN=SSH Host Key
Serial: 12149987402350878307
Fingerprint: 794316931b57ca9a91174f723dda3a9aa488fc7205d231f0366e8c29b8783f4e
Not before: 2021-02-04 01:37:41
Not after: 2022-02-04 01:37:41
Slot 83:
Algorithm: ECCP256
Subject DN: CN=SSH User Key
Issuer DN: CN=SSH User Key
Serial: 16282145902089869600
Fingerprint: ac28fac1f5144608f0d0211e02cae719d70a984c5408e074163edbd322e88720
Not before: 2021-02-04 01:41:37
Not after: 2022-02-04 01:41:37
yubico-piv-tool -s9e -a generate -AECCP256 -o ssh-host-key-public.pem
yubico-piv-tool -a verify-pin -a selfsign-certificate -s 9e -S "/CN=SSH Host Key/" -i ssh-host-key-public.pem -o ssh-host-key-cert.pem
yubico-piv-tool -s9e -aimport-certificate -i ssh-host-key-cert.pem
yubico-piv-tool -s9d -a generate -AECCP256 -o ssh-user-key-public.pem
yubico-piv-tool -a verify-pin -a selfsign-certificate -s 9d -S "/CN=SSH User Key/" -i ssh-user-key-public.pem -o ssh-user-key-cert.pem
yubico-piv-tool -s9d -aimport-certificate -i ssh-user-key-cert.pem
ryan@pki:~/tmp$ systemctl status step-ca
● step-ca.service - step-ca
Loaded: loaded (/etc/systemd/system/step-ca.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-02-03 21:02:27 EST; 2min 43s ago
Docs: https://smallstep.com/docs/step-ca
Main PID: 6952 (sh)
Tasks: 10 (limit: 971)
CGroup: /system.slice/step-ca.service
├─6952 /bin/sh -c /usr/local/bin/step-ca /etc/step-ca/config/ca.json
└─6953 /usr/local/bin/step-ca /etc/step-ca/config/ca.json
Feb 03 21:02:27 pki systemd[1]: Started step-ca.
Feb 03 21:02:27 pki sh[6953]: 2021/02/03 21:02:27 Serving HTTPS on :443 ..
--valid-days=3650
so the expiration matches the CA PKI certs
-a generate
commands should suffice