terraform-plugin-sdk icon indicating copy to clipboard operation
terraform-plugin-sdk copied to clipboard

helper/acctest: Generate 2048 bit long private keys in helper/acctest.RandTLSCert

Open LKaemmerling opened this issue 5 years ago • 1 comments

Generate 2048 bit long private keys in helper/acctest.RandTLSCert instead of 1024 bit long private keys.

This closes #621

LKaemmerling avatar Oct 22 '20 06:10 LKaemmerling

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Mar 12 '22 18:03 hashicorp-cla

Hi @LKaemmerling 👋 Thank you for submitting this change and apologies for the delayed response here. Unfortunately, we cannot merge a change like this as-is because it could represent a breaking change for systems or testing that may be explicitly expecting the lower bit count. Similar to the response in the associated issue, its not likely we would accept a different form of the change either, therefore I'm going to close this submission not because its security concerns aren't valid, but because these helpers are unfortunately a source of potential maintenance burden.

At some point since this was raised, we began documenting the cryptographic specifics of the similar acctest.RandSSHKeyPair() and recommending that testing with different or stronger security requirements should use code created outside this codebase. Similar documentation would apply for acctest.RandTLSCert(). Security requirements are constantly evolving and it is untenable for this Go module to maintain all possible permutations required for cryptographic logic needed across the entire provider ecosystem without constant maintenance or inevitably needing to introduce breaking changes to the exported Go APIs. Future major versions of this code would likely remove helpers like these for that reason.

Thanks again though!

bflad avatar Feb 28 '23 20:02 bflad

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Mar 31 '23 02:03 github-actions[bot]