-
Notifications
You must be signed in to change notification settings - Fork 352
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
pki: T5886: add support for ACME protocol (LetsEncrypt) #2758
Conversation
The "idea" of this PR is to add new CLI nodes under the pki subsystem to activate ACME for any given certificate. vyos@vyos# set pki certificate NAME acme Possible completions: + domain-name Domain Name email Email address to associate with certificate listen-address Local IPv4 addresses to listen on rsa-key-size Size of the RSA key (default: 2048) url Remote URL (default: https://acme-v02.api.letsencrypt.org/directory) Users choose if the CLI based custom certificates are used set pki certificate EXAMPLE acme certificate <base64> or if it should be generated via ACME. The ACME server URL defaults to LetsEncrypt but can be changed to their staging API for testing to not get blacklisted. set pki certificate EXAMPLE acme url https://acme-staging-v02.api.letsencrypt.org/directory Certificate retrieval has a certbot --dry-run stage in verify() to see if it can be generated. After successful generation, the certificate is stored in under /config/auth/letsencrypt. Once a certificate is referenced in the CLI (e.g. set interfaces ethernet eth0 eapol certificate EXAMPLE) we call vyos.config.get_config_dict() which will (if with_pki=True is set) blend in the base64 encoded certificate into the JSON data structure normally used when using a certificate set by the CLI. Using this "design" does not need any change to any other code referencing the PKI system, as the base64 encoded certificate is already there. certbot renewal will call the PKI python script to trigger dependency updates.
* show log certbot * monitor log certbot * renew certbot
#include <include/listen-address-ipv4-single.xml.i> | ||
<leafNode name="rsa-key-size"> | ||
<properties> | ||
<help>Size of the RSA key</help> |
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.
At least Let's Encrypt has already supported issuing ECDSA certs for a while (certbot --key-type=ecdsa
), I think we should add support for it as well.
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.
Definately, but in a separate PR please, as rhe consuming services need to be made aware of it, too
@Mergifyio backport sagitta |
✅ Backports have been created
|
Change Summary
pki: T5886: add support for ACME protocol (LetsEncrypt)
The "idea" of this PR is to add new CLI nodes under the pki subsystem to activate ACME for any given certificate.
Users choose if the CLI based custom certificates are used
set pki certificate EXAMPLE acme certificate <base64>
or if it should be generated via ACME.The ACME server URL defaults to LetsEncrypt but can be changed to their staging API for testing to not get blacklisted.
set pki certificate EXAMPLE acme url https://acme-staging-v02.api.letsencrypt.org/directory
Certificate retrieval has a
certbot --dry-run
stage inverify()
to see if it can be generated.After successful generation, the certificate is stored in under
/config/auth/letsencrypt
. Once a certificate is referenced in the CLI (e.g.set interfaces ethernet eth0 eapol certificate EXAMPLE
) we callvyos.config.get_config_dict()
which will (ifwith_pki=True
is set) blend in the base64 encoded certificate into the JSON data structure normally used when using a certificate set by the CLI.Using this "design" does not need any change to any other code referencing the PKI system, as the base64 encoded certificate is already there.
certbot renewal will call the PKI python script to trigger dependency updates.
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
pki, cerbot, https
Proposed changes
How to test
Smoketest result
Checklist: