-
Notifications
You must be signed in to change notification settings - Fork 116
r/private_key: Add support for ed25519 algorithm #59
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
Conversation
jacobwgillespie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm excited about this PR and the potential for generating all necessary host SSH keys with Terraform! 🎉 I'm not a repo committer, but had one comment when reading the diff.
b2663ec to
d59b3ff
Compare
|
Any feedback on this one? |
|
@invidian I'm also not a committer, but I have a suggestion: maybe you can also update the documentation? To be more specific: |
|
Good idea, I'll add it. Though still there is not much activity in this repository it seems... |
d59b3ff to
6b40766
Compare
|
@invidian maybe add a remark about |
6b40766 to
1fcc618
Compare
|
@Andor thanks for suggestion. I also added a mention to |
1fcc618 to
f295a2d
Compare
|
After going trough the whole X.509, PEM, DER topics, I looked into this again and I changed the PR a bit. This provider it focused on generating certificates for TLS communication (so X.509) and OpenSSH support is somehow an addition. In this case I pushed one more commit, which adds This way both use-cases are covered: generating private keys for TLS and for OpenSSH. |
|
Any insights on when this PR might be merged? cc @apparentlymart |
|
@appilon Can you merge this commit and release please? |
|
Now that Terraform 0.13 is here with Terraform Registry, I'm going to fork and push my copy there, stay tuned 😄 |
terraform {
required_providers {
tls = {
source = "invidian/tls"
version = "2.2.1"
}
}
}💥 |
c32ea71 to
f453980
Compare
This commit add support for ED25519 algorithm when generating tls_private_key resource. Refs #26 Signed-off-by: Mateusz Gozdek <[email protected]>
This commit adds private_key_openssh attribute, which always contains private key in format, which is compatible with OpenSSH. This allows to produce ED25519 private key in OpenSSL compatible format in private_key_pem attribute and OpenSSH-compatible format in this new attribute. Other key types are the same in private_key_pem and private_key_openssh, as OpenSSH can read them. In the future, this could be changed to produce all private keys OpenSSH native format. Refs #26 Signed-off-by: Mateusz Gozdek <[email protected]>
f453980 to
5181615
Compare
|
This PR still hasn't been picked up. I have been using invidian's provider for a while, but there is no reason why this PR hasn't been added to the official provider. @kmoe are you the person to look at this? |
|
@invidian Thank you for this PR! Would you be up for rebasing it and releasing an updated version? |
You mean in my fork, right? I've just enabled issues for my fork's repository, maybe you can create an issue there, but I'll try to follow up myself. Any particular reason why a new release would be needed? |
|
Ah, it looks like a rebase really isn't getting anything, sorry -- I thought I remembered more being in 3.1.0. A release would be great :). |
|
Released |
|
Thank you for your time and contribution, we really appreciate it. As part of a bigger effort to add complete support for ED25519 key algorithm, I’m closing this in favor of issue #150. Please refer to the new issue for what will be included and how work will proceed. |
|
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. |
This PR adds support for generating private keys using
ed25519algorithm.NOTE: I wasn't sure what PEM header to use for this certificate. Since my usecase is to generate SSH keys, I used
OPENSSH PRIVATE KEYfor now and also the output of PEM private key is currently in SSH-compatible format. Please guide me how this should be handled, as I think this output is valuable. Maybe we could have new computed propertyprivate_key_opensshwith properly formatted all keys for SSH? BTW this problem does not occur with RSA and ECDSA keys, sincesshdaccepts those keys with output provided by this resource.Also included some basic unit tests, please let me know if more conditions should be added.
Refs #26