open-vault/builtin/logical/ssh
Alexander Scheel 6e069e94ca
Fix PKI Weak Cryptographic Key Lenghths Warning (#12886)
* Modernize SSH key lengths

No default change was made in this commit; note that the code already
enforced a default of 2048 bits. ssh-keygen and Go's RSA key generation
allows for key sizes including 3072, 4096, 8192; update the values of
SSH key generation to match PKI's allowed RSA key sizes (from
certutil.ValidateKeyTypeLength(...)). We still allow the legacy SSH key
size of 1024; in the near future we should likely remove it.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Ensure minimum of 2048-bit PKI RSA keys

While the stated path is a false-positive, verifying all paths is
non-trivial. We largely validate API call lengths using
certutil.ValidateKeyTypeLength(...), but ensuring no other path calls
certutil.generatePrivateKey(...) --- directly or indirectly --- is
non-trivial. Thus enforcing a minimum in this method sounds like a sane
compromise.

Resolves: https://github.com/hashicorp/vault/security/code-scanning/55

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2021-10-26 09:30:09 -04:00
..
cmd/ssh Update to api 1.0.1 and sdk 0.1.8 2019-04-15 14:10:07 -04:00
backend.go Switch to go modules (#6585) 2019-04-13 03:44:06 -04:00
backend_test.go Let allowed_users template mix templated and non-templated parts (#10886) 2021-10-19 15:00:15 -07:00
communicator.go builtin: deprecate errwrap.Wrapf() throughout (#11430) 2021-04-22 11:20:59 -04:00
linux_install_script.go Use locking to avoid parallel script execution (#4358) 2018-04-23 18:04:22 -04:00
path_config_ca.go Use the system rand reader for SSH keypair generation (#12560) 2021-09-15 11:59:28 -05:00
path_config_ca_test.go Add ssh signing algorithm as a role option. (#9096) 2020-06-11 08:10:13 -04:00
path_config_zeroaddress.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
path_creds_create.go builtin: deprecate errwrap.Wrapf() throughout (#11430) 2021-04-22 11:20:59 -04:00
path_fetch.go Switch to go modules (#6585) 2019-04-13 03:44:06 -04:00
path_keys.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_lookup.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_roles.go Fix PKI Weak Cryptographic Key Lenghths Warning (#12886) 2021-10-26 09:30:09 -04:00
path_sign.go Let allowed_users template mix templated and non-templated parts (#10886) 2021-10-19 15:00:15 -07:00
path_verify.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
secret_dynamic_key.go builtin: deprecate errwrap.Wrapf() throughout (#11430) 2021-04-22 11:20:59 -04:00
secret_otp.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
util.go Move to go 1.17 (#12868) 2021-10-21 09:32:03 -04:00