-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vault SSH CA engine issuing certs with deprecated type ssh-rsa-cert-v01@openssh.com user certificate #15488
Comments
@prbinu Hmm, this is interesting. Note the key you pasted:
So we are effectively generating a Notably, in the // CertAlgoRSASHA256v01 and CertAlgoRSASHA512v01 can't appear as a
// Certificate.Type (or PublicKey.Type), but only in
// ClientConfig.HostKeyAlgorithms.
CertAlgoRSASHA256v01 = "rsa-sha2-256-cert-v01@openssh.com"
CertAlgoRSASHA512v01 = "rsa-sha2-512-cert-v01@openssh.com" This to me says that we can't just update the constant, we'd need to fix the upstream The SSH engine was recently updated to support alternative key types, see e.g., #14006 or #14008. Perhaps switching to an ECDSA key is sufficient until If its a simple fix and it already works, a PR would be appreciated :-) |
thanks @cipherboy A workaround switching to ed25519 key algorithm is working: $ ssh-keygen -t ed25519
$ vault write -field=signed_key ssh/sign/test public_key=@$HOME/.ssh/id_ed25519.pub valid_principals=jdoe | ssh-keygen -L -f -
(stdin):1:
Type: **ssh-ed25519-cert-v01@openssh.com** user certificate
Public key: ED25519-CERT SHA256:XhZL3wGE6JiWczuSsX5M2jwaYrlG8NEhuCPITuhUp5Y
Signing CA: RSA SHA256:sPKzOUJwvkR3aCFf2oCyHnc+JoMtFcow2UxcEz+cXo4 (using rsa-sha2-256)
Key ID: "group=test pubkey_fp=5e164bdf0184e89896733b92b17e4cda3c1a62b946f0d121b823c84ee854a796
Serial: 11871586717846079993
Valid: from 2022-05-20T13:46:21 to 2022-05-21T01:46:51
Principals:
jdoe
Critical Options: (none)
Extensions:
permit-port-forwarding
permit-pty But with new OpenSSH changes, this issue is likely to affect many users. |
|
We are experiencing the same issue. After migrating to RHEL 8 machines with FIPS enabled, we are unable to use our Vault issued certs unless we relax the crypto policy for OpenSSH to allow "ssh-rsa-cert-v01@openssh.com" in PubkeyAcceptedKeyTypes and "ssh-rsa" in CASignatureAlgorithms. All other issues about this I can find seem to indicate the problem is resolved when you change the Signing Algorithm, which we have, but we see the same as the OP. The certificate type is always generated as ssh-rsa-cert-v01@openssh.com.
With FIPS enabled, we cannot use these certs at the client level, much less to connect to a server:
|
Describe the bug
After upgrading OpenSSH to 9.0 on my Mac, I'm having trouble with my Vault SSH certificates. It appears that recent OpenSSH version dropped
ssh-rsa-cert-v01@openssh.com
from theirPubkeyAcceptedAlgorithms
default set [1]The default for
PubkeyAcceptedAlgorithms
option is:Here is one example SSH certificate issued by Vault (configured for
rsa-sha2-256
):[1] https://man.openbsd.org/ssh_config#PubkeyAcceptedAlgorithms
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
ssh-add -L | ssh-keygen -L -f -
. Check theType
field (first line). Even though we are usingrsa-sha2-256
, the Type is still showingssh-rsa-cert-v01@openssh.com
(instead ofrsa-sha2-256-cert-v01@openssh.com
type)Expected behavior
I believe the SSH certificate based on
rsa-sha2-256
shall have Typersa-sha2-256-cert-v01@openssh.com
Environment:
OS: Mac Monterey
Client: OpenSSH 9.0
The text was updated successfully, but these errors were encountered: