Page MenuHomeVyOS Platform

Add support for ACME protocol (LetsEncrypt)
Closed, ResolvedPublicFEATURE REQUEST

Description

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 /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

Details

Version
-
Is it a breaking change?
Perfectly compatible

Related Objects

Event Timeline

c-po changed the status of subtask T3264: Allow custom ACME provider for certbot from Open to In progress.
c-po renamed this task from Add support for ACME protocol (LetsEncrpt) to Add support for ACME protocol (LetsEncrypt).Jan 4 2024, 8:17 PM
c-po added a project: VyOS 1.5 Circinus.
c-po edited a custom field.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po changed Issue type from Unspecified (please specify) to improvement.
c-po moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
c-po moved this task from Open to Finished on the VyOS 1.5 Circinus board.