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

Add support for ED25519 key algorithm #150

Closed
5 tasks done
detro opened this issue Feb 17, 2022 · 9 comments
Closed
5 tasks done

Add support for ED25519 key algorithm #150

detro opened this issue Feb 17, 2022 · 9 comments
Assignees
Milestone

Comments

@detro
Copy link
Contributor

detro commented Feb 17, 2022

Background

Support for the ED25519 key algorithm has been a community-requested feature for this provider for a while. The first issue we could track down was filed in May 2018 (#26). Since then, multiple contributors attempted to bridge this gap (#32 in Nov 2018, #59 in Oct 2019, #85 in Oct 2020).

We want to take this opportunity to thank all the contributors (@jbboehr, @kaidence, @invidian, @nikolay) for the PR they submitted, and also to apologize for the long delay in getting this set of functionalities added to this provider. HashiCorp has a policy to prioritize stability and bug-fixes over any new feature for our “utility providers”; but given the demand for this feature, we decided to look into this and see how we could fit ED25519 inside the feature set.

Proposal

To serve the community at our best, we want to provide a well-rounded implementation that adds support for ED25519. Specifically, we want it to match the same functionality coverage as per the currently-supported RSA and ECDSA.

The implementation will include changes to the following entities, so that they accept ED25519 as input in their algorithm / key_algorithm configuration fields:

Resources:

Data sources:

As work proceeds, PRs will be linked back to this issue for full context.

References

Addresses: #26
Supersedes: #32
Supersedes: #59
Supersedes: #85

@tazjin
Copy link

tazjin commented Feb 19, 2022

On prioritisation, note that this is starting to become a serious problem with the ongoing deprecations of RSA keys.

For example, right now a complete deployment flow of NixOS machines on AWS does not work as RSA keys being disabled by default in SSH servers have led to a situation of subtle incompatibilites:

  1. The SSH server will refuse connections with ssh-rsa keys by default, unless re-enabled in the configuration.
  2. Terraform can only generate RSA and ECDSA keys.
  3. AWS only supports RSA and ed25519 keys.
  4. In order to update the config for 1. after bootstrapping a machine, a working SSH key is needed.

This means current workarounds are that custom AMIs with RSA enabled need to be created, or keys need to be imported by other means than generation inside of Terraform. These kinds of problems will likely only increase in number from here on.

@detro
Copy link
Contributor Author

detro commented Feb 19, 2022

@tazjin thank you - yes, no worries, this is happening :)

@nikolay
Copy link

nikolay commented Feb 20, 2022

Thank you, @detro. We hope it's happening soon as we now generate those outside of Terraform.

@detro
Copy link
Contributor Author

detro commented Feb 21, 2022

👍 @nikolay - I'm still finding my pace as the newest member of the HashiCorp team that maintain these, but yours and other PRs definitely helped to get this moving faster.

@jseiser
Copy link

jseiser commented Mar 16, 2022

It would be great if we could please get a release with the tls_private_key enabled.

tls_private_key

We are getting hardened RHEL 8 images from the security team, and we build custom AMI's with packer. Each ENV we create has a custom SSH key on the bastion host that is generated via terraform. As of this moment, terraform can no longer create working keys ( packer/golang ssh implementation breaks), so we have to either disable fips ( cant ) or have packer spin up public instances with temp keys.

If we could just create the proper keys in terraform this entire problem goes away.

Thank you.

@detro
Copy link
Contributor Author

detro commented Mar 18, 2022

Hello @jseiser - thanks for your comment.

We are working full blast on this issue, and we are aware of the demand for ED25519.
As you can see in the description above, the objective can't just be to cover 1 resource: the provider, to preserve a high level of quality, needs to maintain a consistency and a "roundness" of it.

Example, the *_cert resources don't support ED25519 right now: that is part of this work.

As HashiCorp we see it as our mission to provide a high quality provider, and that means covering all the bases.

I hope this clarifies things and our approach to major feature requests like ED25519 support.

@jseiser
Copy link

jseiser commented Mar 18, 2022

@detro I appreciate the response, and ill honestly leave it alone after this.

the objective can't just be to cover 1 resource

I mean, it could.

As HashiCorp we see it as our mission to provide a high quality provider, and that means covering all the bases.

The current provider is deprecated/broken in certain situations. There is a fix in the code base for parts of it, that would increase the quality of the provider. So instead of getting some fixes, we get nothing fixed, for the promise of future fixes.

Again, I appreciate the effort and the response. I disagree with the process, but its your process and Ill leave it at that.

Thank you.

@detro
Copy link
Contributor Author

detro commented Mar 30, 2022

This feature is now fully implemented and we are gearing up for releasing v3.2.0.

The full feature set can be seen in #176 where we are refining the changelog.

@detro detro closed this as completed Mar 30, 2022
Copy link

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants