cloudfoundry / cloudfoundry/capi-release

Increase diego-ssh RSA host key size from 2048 to 4096 bits

Open
#643 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
24
Forks
110
Avg merge
3d 12h
Merged PRs (30d)
8

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read lib/cloud_controller/diego/ssh_key.rb and the AppRecipeBuilder call site to confirm how the default host-key size reaches LRPs with SSH enabled. Review the linked draft pull request and existing SSH-related tests; done means the default is 4096 bits and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend, security
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.