Description:
As part of ongoing security hardening, the RSA host key used by diego-sshd in LRPs should be increased from 2048 bits to 4096 bits.
Currently, SSHKey in lib/cloud_controller/diego/ssh_key.rb defaults to generating 2048-bit RSA keys. These keys are used when SSH is enabled on an app process to initialize the diego-sshd daemon.
Proposed solution:
I've updated(in the linked draft PR) the default in SSHKey#initialize from 2048 to 4096. Since AppRecipeBuilder instantiates SSHKey.new without an explicit bit size, this change propagates automatically to all LRPs with SSH enabled.
No other code changes are required.
Would this simple default change be acceptable, or would it be preferable to make the key size configurable via the Cloud Controller config (e.g. under diego.sshd.host_key_bits)? Happy to adjust the approach based on feedback.
Links:
Description:
As part of ongoing security hardening, the RSA host key used by diego-sshd in LRPs should be increased from 2048 bits to 4096 bits.
Currently, SSHKey in lib/cloud_controller/diego/ssh_key.rb defaults to generating 2048-bit RSA keys. These keys are used when SSH is enabled on an app process to initialize the diego-sshd daemon.
Proposed solution:
I've updated(in the linked draft PR) the default in SSHKey#initialize from 2048 to 4096. Since AppRecipeBuilder instantiates SSHKey.new without an explicit bit size, this change propagates automatically to all LRPs with SSH enabled.
No other code changes are required.
Would this simple default change be acceptable, or would it be preferable to make the key size configurable via the Cloud Controller config (e.g. under diego.sshd.host_key_bits)? Happy to adjust the approach based on feedback.
Links: