[Feature] Support OpenSSH user certificates for SSH access (CA-signed keys)
Description / 功能描述
Add an optional OpenSSH certificate field to the SSH access (next to "SSH key" and "SSH key passphrase"), used by the SSH deployer, the SSH HTTP-01 challenger and jump servers.
When the field is set, the client authenticates with the private key plus its signed user certificate (id_ed25519-cert.pub contents) instead of the bare public key. When it is empty, behaviour is unchanged.
Implementation is small: in internal/tools/ssh/client.go, after parsing the private key, parse the certificate with ssh.ParseAuthorizedKey, check it is an *ssh.Certificate for the same key, and wrap the signer with ssh.NewCertSigner(cert, signer). The rest is plumbing the new field through ServerConfig, the access config in internal/domain/access.go, the providers, and the access form in the UI.
Motivation / 请求动机
Many teams no longer put static public keys in authorized_keys. Hosts trust an SSH user CA (TrustedUserCAKeys, e.g. OpenBao/Vault SSH secrets engine, step-ca, Teleport) and only accept keys that carry a certificate signed by that CA. Today Certimate can only offer a bare key, so on such hosts it needs an authorized_keys exception just for Certimate, which is exactly what CA-based setups are trying to remove.
With certificate support, the operator signs Certimate's key once (with principals, expiry and source-address restrictions in the certificate), and the target hosts need no per-tool key entries.
Miscellaneous / 其他
golang.org/x/crypto/sshalready provides everything needed (ParseAuthorizedKey,NewCertSigner); no new dependency.- The certificate is public data, so it can be stored as a plain text field; the private key and passphrase handling stays as is.
- Error cases to cover in tests: certificate is not a certificate, certificate belongs to a different key, empty field (unchanged behaviour).
Contribution / 贡献代码
- I am interested in contributing a PR for this! / 我乐意为此提交代码并发起 PR!
Source: certimate-go/certimate