smallstep / certificates

🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
https://smallstep.com/certificates
Apache License 2.0
6.68k stars 434 forks source link

SSH KRL Allow revocation by SSH Public Key #256

Open evilmog opened 4 years ago

evilmog commented 4 years ago

What would you like to be added

ssh-keygen allows manual key revocation by specifying a public key, such as

ssh-keygen -s /opt/ssh-ca/ca.pub -k -f /opt/rpt-ansible/etc/ssh/revoked_keys /opt/VMTools/public-keys/old/retired/* /opt/VMTools/public-keys/old/processed/*

Why this is needed

When I need to revoke somebodies access I don't want to track down every cert they issued, I want them all revoked, so I need a KRL that I can push to all our jumpservers. Being able to ban a key completely is critical to the CA operation.

unreality commented 2 years ago

I might take a crack at this, the current things stopping this are:

Perhaps @maraino or @mmalone could comment on whether these are acceptable actions before I start hacking away?

https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.krl indicates there is 2.4. Revoked key ID sections which may mean the key-ids DONT need to be stored with step, and we can just add methods to invalidate a key or host...

dopey commented 1 year ago

Hey @unreality 👋 . I would hold off on implementing this just yet. As mentioned in a few other PRs, we are planning to release a plugin or web-hook style architecture that would allow users to "attach" additional functionality without it living in the step-ca codebase.

This feature would be a great use case once that architecture becomes available.