Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new
CertificateSigner
class,ACMECertificateSigner
, to the M1 client API python module. This class allows the python M1 client app to designate an ACME certificate signing service to use when signing certificates for ContentHostingConfigurations usingdomainNameAlias
entries.This class requires access to the private keys directory (it needs to regenerate the CSR and so needs to sign the new CSR), the default virtual host docroot (for when HTTP to the domainNameAlias is not setup and an ACME challenge is needed) and the domain docroots directory for the AS (to provide the acme challenge authentication for the domain name). These three directories are configured using the keyword parameters to the class instance initialisation.
The class also requires the URL of an ACME directory service.
There are two factory functions,
LetsEncryptCertificateSigner
andTestLetsEncryptCertificateSigner
, which both only take the 3 directories noted above and automatically set the URL of the directory service to point to the Let's Encrypt live service and the Let's Encrypt Staging service respectively.In a simple setup, this means that the M1 client app must run on the same host as both the AF & AS. It would be possible to run the M1 client on a different host as long as there are network shared directories accessible for the three directories given above.
For the
m1-session
andmsaf-configuration
tools the new class (or factory functions) can be configured using:So for the default settings this would be:
Note: This will not use Let's Encrypt for ContentHostingConfiguration
distributionConfigurations
which do not usedomainNameAlias
- a new Lets's Encrypt Certificate Manager script will be needed to handle that configuration.