-
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
Selecting any algorithm_signer for a ssh engine causes sign error #10067
Comments
Not sure whether that's expected behaviour or not, however, it looks like this is failing because you're trying to use RSA algo while using ed25519 key for it.
The issue does not reproduce with Perhaps, the error could be a bit more informative, if the underlying error was appended to it. E.g.
|
ed25519 keys can sign rsa keys and the other way around. But the signer needs to select the correct signature algorithm. This probably means the #9824 was not expansive enough. |
I wanted to bump this issue as clients on our side had to downgrade back to rsa for now after I got everyone to update to ed25519 keys. |
I did a quick test based on the OP's request. Actually, signing with an ed25519 CA key works just fine, as long as you rely on the default signing algorithm.
There you go: RSA user key signed by ED25519 CA. And it works for ED25519 user key signed by ED25519 CA as well:
The main problem is you can't choose the algorithm in
(EDIT: of course, when the CA key type is ed25519, you'd never want to choose an RSA-based signature algorithm like In practice, you probably never need to specify the signing algorithm, except when the key type is RSA: in which case, it's just a question of documentation ("other CA key types are allowed, but you must you leave That just leaves the feature request to specify a non-RSA key type when using |
Checking in crypto/ssh source, the only cases where you can specify the algorithm signer are RSA. In all other cases, the algorithm signer must be either blank or equal to the key type - and both these cases are treated identically. In this case, requiring blank for all non-RSA CA keys is perfectly fine. |
I'm fairly certain I also tried executing the commands without a selected But it's nice to see that this does work and I can tell my users that they can use their keys again as they used too. |
Excellent. Just be to be clear: you can keep your CA as RSA, and users can use ed25519 keys; or you can have a CA which is ed25519 and the users have RSA keys. There's no need for the signing key to be of the same type as the user key.
|
The [1]:
|
Yes. I will go ahead and close the issue as my problem is definitely solved. |
BTW, I also provided pull request #11036 to clarify the documentation and give a better error than just "sign error". |
#11036) * SSH: report signing error reason, and clarify docs re. non-RSA CA keys See #10067 * Update website/content/api-docs/secret/ssh.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> Co-authored-by: hghaf099 <83242695+hghaf099@users.noreply.github.com> Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com>
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
(I wonder how often the user ca is quoted in this kind of context)
Expected behavior
Selecting an, as per documentation, secure signing algorithm should not cause a signing error.
Environment:
vault status
): 1.5.4vault version
): 1.5.4 (1a73077)Vault server configuration file(s):
vault server -dev
Additional context
The text was updated successfully, but these errors were encountered: