Skip to content
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

Switch to secure signing algorithm for SSH secrets engine #14006

Merged
merged 6 commits into from
Feb 18, 2022

Conversation

cipherboy
Copy link
Contributor

@cipherboy cipherboy commented Feb 10, 2022

Built on top of #13991; will be rebased once that merges.


The default (empty) value for RSA keys, ssh-rsa, is an insecure default because it uses SHA-1 signing. This has lead to its removal from OpenSSH >= 8.2's default algorithm list. However, the more secure, modern signing algorithms for SSH keys, rsa-sha2-256 and rsa-sha2-512, aren't available on platforms with OpenSSH < 7.2.

This PR takes an approach of migrating existing SSH roles using the default (empty) value to an explicit ssh-rsa value and changing the default to default, which can change over time as secure defaults change. This explicit default value presently uses rsa-sha2-256. Roles can of course still explicitly specify a value if desired.

Documentation has been clarified to point out that the legacy value is insecure, what the secure value presently is, and what will occur as a result of migration.

This is motivated by #11608.

Resolves: #11608

@cipherboy cipherboy added cryptosec enhancement secret/ssh bug Used to indicate a potential bug and removed enhancement labels Feb 10, 2022
@cipherboy cipherboy force-pushed the cipherboy-switch-to-secure-signer branch from 08941bb to b4595ef Compare February 14, 2022 21:18
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 14, 2022 21:18 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 14, 2022 21:18 Inactive
@cipherboy cipherboy force-pushed the cipherboy-switch-to-secure-signer branch from b4595ef to 0be1e31 Compare February 14, 2022 21:22
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 14, 2022 21:22 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 14, 2022 21:22 Inactive
@cipherboy cipherboy force-pushed the cipherboy-switch-to-secure-signer branch from 0be1e31 to dbca886 Compare February 17, 2022 20:41
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2022 20:41 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2022 20:41 Inactive
@cipherboy cipherboy marked this pull request as ready for review February 17, 2022 20:42
@cipherboy cipherboy requested a review from a team February 17, 2022 20:42
@cipherboy cipherboy force-pushed the cipherboy-switch-to-secure-signer branch from dbca886 to 76b4d60 Compare February 17, 2022 20:44
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2022 20:44 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2022 20:44 Inactive
@cipherboy cipherboy force-pushed the cipherboy-switch-to-secure-signer branch from 76b4d60 to 055fd2f Compare February 17, 2022 22:05
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2022 22:05 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2022 22:05 Inactive
@cipherboy cipherboy force-pushed the cipherboy-switch-to-secure-signer branch from 055fd2f to d6b3386 Compare February 17, 2022 22:07
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2022 22:07 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2022 22:07 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 18, 2022 14:09 Inactive
Related: #11608

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
As mentioned in the OpenSSH 8.2 release notes, OpenSSH will no longer be
accepting ssh-rsa signatures by default as these use the insecure SHA-1
algorithm.

For roles in which an explicit signature type wasn't specified, we
should change the default from SHA-1 to SHA-256 for security and
compatibility with modern OpenSSH releases.

See also: https://www.openssh.com/txt/release-8.2

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
@cipherboy
Copy link
Contributor Author

I dropped the go.mod change as it was causing conflicts and the introduced version is new enough to contain the commit I was hoping to drag in. The remainder of the delta between where I had pulled and the introduced version contains mostly minor SSH and ACME changes (the former to the server which we don't use) and doesn't appear to be of much use for us.

@cipherboy cipherboy merged commit 67e4933 into main Feb 18, 2022
@cipherboy
Copy link
Contributor Author

Thanks @stevendpclark for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug cryptosec secret/ssh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSH CA: rsa-sha1 should not be default signing algorithm
2 participants