| CREATOR | Mark Raynsford |
| DATE | 2022-07-01T12:36:21+00:00 |
| DESCRIPTION | Documentation for the Certusine ACME client. |
| IDENTIFIER | 26192579-ab8b-4f62-b825-c98d0bb81d6b |
| LANGUAGE | en |
| RIGHTS | Public Domain |
| TITLE | Certusine User Manual |
$ gpg --verify com.io7m.certusine.cmdline-0.0.10-distribution.zip.asc gpg: assuming signed data in 'com.io7m.certusine.cmdline-0.0.10-distribution.zip.asc' gpg: Signature made Tue 28 Jun 2022 15:01:56 GMT gpg: using RSA key 3CCE59428B30462D10459909C5607DA146E128B8 gpg: issuer "contact@io7m.com" gpg: using pgp trust model gpg: Good signature from "io7m.com (2022 maven-rsa-key) <contact@io7m.com>" [unknown]
$ unzip com.io7m.certusine.cmdline-0.0.10-distribution.zip $ export CERTUSINE_HOME=$(realpath certusine) $ ./certusine/bin/certusine info: Usage: certusine [options] [command] [command options] ...
<Options DNSWaitTime="PT5M"
CertificateStore="store.db"
CertificateExpirationThreshold="PT72H"/>
| URI | Description |
|---|---|
| https://acme-staging-v02.api.letsencrypt.org/directory | Let's Encrypt staging server |
| https://acme-v02.api.letsencrypt.org/directory | Let's Encrypt production server |
<Accounts>
<Account Name="main"
PublicKeyPath="example.pub"
PrivateKeyPath="example.pri"
AcmeURI="https://acme-staging-v02.api.letsencrypt.org/directory"/>
</Accounts>
<Outputs>
<Output Type="directory"
Name="main-output">
<Parameters>
<Parameter Name="path" Value="/tmp"/>
</Parameters>
</Output>
</Outputs>
<DNSConfigurators>
<DNSConfigurator Type="vultr" Name="vultr-dns">
<Parameters>
<Parameter Name="api-key" Value="25DDk6MT+2JI5KBABMysYLPFEOge+MZE3/GiBgrR+CU="/>
<Parameter Name="domain" Value="example.com"/>
</Parameters>
</DNSConfigurator>
</DNSConfigurators>
<Domain Name="example.com"
Account="main"
DNSConfigurator="vultr-dns">
<Certificates>
<Certificate Name="www"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri">
<Hosts>
<Host Name="www0"/>
<Host Name="www1"/>
<Host Name="www2"/>
</Hosts>
</Certificate>
<Certificate Name="mail"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri">
<Hosts>
<Host Name="mail0"/>
<Host Name="mail1"/>
</Hosts>
</Certificate>
<Certificate Name="wildcard"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri">
<Hosts>
<Host Name="*"/>
</Hosts>
</Certificate>
</Certificates>
<OutputReferences>
<OutputReference Name="main-output"/>
</OutputReferences>
</Domain>
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration xmlns="urn:com.io7m.certusine:configuration:1">
<Options CertificateStore="store.db"
DNSWaitTime="PT5M"
CertificateExpirationThreshold="PT72H"/>
<Accounts>
<Account Name="main"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri"
AcmeURI="https://acme-staging-v02.api.letsencrypt.org/directory"/>
</Accounts>
<Outputs>
<Output Type="directory"
Name="main-output">
<Parameters>
<Parameter Name="path"
Value="/tmp"/>
</Parameters>
</Output>
</Outputs>
<DNSConfigurators>
<DNSConfigurator Type="vultr"
Name="vultr-dns">
<Parameters>
<Parameter Name="api-key"
Value="NOTANAPIKEY"/>
<Parameter Name="domain"
Value="example.com"/>
</Parameters>
</DNSConfigurator>
</DNSConfigurators>
<Domains>
<Domain Name="example.com"
Account="main"
DNSConfigurator="vultr-dns">
<Certificates>
<Certificate Name="www"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri">
<Hosts>
<Host Name="www0"/>
<Host Name="www1"/>
<Host Name="www2"/>
</Hosts>
</Certificate>
<Certificate Name="mail"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri">
<Hosts>
<Host Name="mail0"/>
<Host Name="mail1"/>
</Hosts>
</Certificate>
<Certificate Name="wildcard"
PublicKeyPath="fake.pub"
PrivateKeyPath="fake.pri">
<Hosts>
<Host Name="*"/>
</Hosts>
</Certificate>
</Certificates>
<OutputReferences>
<OutputReference Name="main-output"/>
</OutputReferences>
</Domain>
</Domains>
</Configuration>
<?xml version="1.0" encoding="UTF-8" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:c="urn:com.io7m.certusine:configuration:1"
targetNamespace="urn:com.io7m.certusine:configuration:1">
<element name="Options">
<complexType>
<attribute name="DNSWaitTime"
type="duration"
use="optional">
<annotation>
<documentation>
Specifies the amount of time that the client will wait between creating DNS records, and then notifying the
ACME servers that the records have been created. This wait time is necessary because DNS records sometimes
take time to propagate, and if the client instructs the ACME server to check the records before they have
had time to propagate, then the certificate authorization check will fail.
</documentation>
</annotation>
</attribute>
<attribute name="CertificateStore"
type="string"
use="required">
<annotation>
<documentation>
Specifies the file that the client will use for its internal database of certificates. Relative paths are
resolved relative to the configuration file.
</documentation>
</annotation>
</attribute>
<attribute name="CertificateExpirationThreshold"
type="duration"
use="optional">
<annotation>
<documentation>
specifies the maximum amount of time before expiration that the client will allow before it attempts to
renew a certificate. For example, a value of PT72H means that the client will start attempting to renew a
certificate when the certificate becomes due to expire in less than 72 hours.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="Account">
<complexType>
<attribute name="Name"
type="string"
use="required">
<annotation>
<documentation>
Specifies the name of that account. Names can be anything, but must be unique with respect to other
accounts. The names are purely used for organizational purposes internally.
</documentation>
</annotation>
</attribute>
<attribute name="PublicKeyPath"
type="string"
use="required">
<annotation>
<documentation>
Specifies the location of the account's public key. Relative paths are resolved relative to the
configuration file.
</documentation>
</annotation>
</attribute>
<attribute name="PrivateKeyPath"
type="string"
use="required">
<annotation>
<documentation>
Specifies the location of the account's private key. Relative paths are resolved relative to the
configuration file.
</documentation>
</annotation>
</attribute>
<attribute name="AcmeURI"
type="anyURI"
use="required">
<annotation>
<documentation>
Specifies the base URI that will be used for ACME operations.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="Accounts">
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:Account"/>
</sequence>
</complexType>
<key name="AccountKey">
<selector xpath="c:Account"/>
<field xpath="@Name"/>
</key>
</element>
<element name="Parameter">
<complexType>
<attribute name="Name"
use="required"
type="string"/>
<attribute name="Value"
use="required"
type="string"/>
</complexType>
</element>
<element name="Parameters">
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:Parameter"/>
</sequence>
</complexType>
<key name="ParameterKey">
<selector xpath="c:Parameter"/>
<field xpath="@Name"/>
</key>
</element>
<element name="Output">
<annotation>
<documentation>
An output destination for signed certificates.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="1"
maxOccurs="1">
<element ref="c:Parameters"/>
</sequence>
<attribute name="Type"
type="string"
use="required">
<annotation>
<documentation>
The type of the output. Must be one of the supported output types.
</documentation>
</annotation>
</attribute>
<attribute name="Name"
type="string"
use="required">
<annotation>
<documentation>
The (unique) name of the output.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="Outputs">
<annotation>
<documentation>
A set of output destinations for signed certificates.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:Output"/>
</sequence>
</complexType>
<key name="OutputKey">
<selector xpath="c:Output"/>
<field xpath="@Name"/>
</key>
</element>
<element name="DNSConfigurator">
<annotation>
<documentation>
A DNS configurator used to create and delete DNS records in response to ACME challenges.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="1"
maxOccurs="1">
<element ref="c:Parameters"/>
</sequence>
<attribute name="Type"
type="string"
use="required"/>
<attribute name="Name"
type="string"
use="required"/>
</complexType>
</element>
<element name="DNSConfigurators">
<annotation>
<documentation>
A set of DNS configurators.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:DNSConfigurator"/>
</sequence>
</complexType>
<key name="DNSConfiguratorKey">
<selector xpath="c:DNSConfigurator"/>
<field xpath="@Name"/>
</key>
</element>
<element name="Host">
<annotation>
<documentation>
A hostname. Note that this is not a fully-qualified domain name.
</documentation>
</annotation>
<complexType>
<attribute name="Name"
use="required"
type="string"/>
</complexType>
</element>
<element name="Hosts">
<annotation>
<documentation>
A set of hostnames.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:Host"/>
</sequence>
</complexType>
<unique name="HostsUnique">
<selector xpath="c:Host"/>
<field xpath="@Name"/>
</unique>
</element>
<element name="Certificate">
<annotation>
<documentation>
A set of definitions that describe a certificate that will be created and signed.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="c:Hosts"/>
</sequence>
<attribute name="Name"
use="required"
type="string">
<annotation>
<documentation>
The certificate name.
</documentation>
</annotation>
</attribute>
<attribute name="PublicKeyPath"
type="string"
use="required">
<annotation>
<documentation>
Specifies the location of the certificate's public key. Relative paths are resolved relative to the
configuration file.
</documentation>
</annotation>
</attribute>
<attribute name="PrivateKeyPath"
type="string"
use="required">
<annotation>
<documentation>
Specifies the location of the certificate's private key. Relative paths are resolved relative to the
configuration file.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="Certificates">
<annotation>
<documentation>
A set of certificate definitions.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:Certificate"/>
</sequence>
</complexType>
<key name="CertificateKey">
<selector xpath="c:Certificate"/>
<field xpath="@Name"/>
</key>
</element>
<element name="OutputReference">
<annotation>
<documentation>
A reference to an output definition.
</documentation>
</annotation>
<complexType>
<attribute name="Name"
use="required"
type="string"/>
</complexType>
</element>
<element name="OutputReferences">
<annotation>
<documentation>
A set of references to output definitions.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="1"
maxOccurs="unbounded">
<element ref="c:OutputReference"/>
</sequence>
</complexType>
<unique name="OutputReferencesUnique">
<selector xpath="c:OutputReference"/>
<field xpath="@Name"/>
</unique>
</element>
<element name="Domain">
<annotation>
<documentation>
A set of definitions that define a domain.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="c:Certificates"/>
<element ref="c:OutputReferences"/>
</sequence>
<attribute name="Name"
use="required"
type="string">
<annotation>
<documentation>
The fully qualified domain name.
</documentation>
</annotation>
</attribute>
<attribute name="Account"
use="required"
type="string">
<annotation>
<documentation>
The account to which this domain belongs.
</documentation>
</annotation>
</attribute>
<attribute name="DNSConfigurator"
use="required"
type="string">
<annotation>
<documentation>
The DNS configurator that will be used for this domain.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="Domains">
<annotation>
<documentation>
A set of domain definitions.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0"
maxOccurs="unbounded">
<element ref="c:Domain"/>
</sequence>
</complexType>
<key name="DomainKey">
<selector xpath="c:Domain"/>
<field xpath="@Name"/>
</key>
</element>
<element name="Configuration">
<annotation>
<documentation>
The configuration information for the certusine client.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="c:Options"/>
<element ref="c:Accounts"/>
<element ref="c:Outputs"/>
<element ref="c:DNSConfigurators"/>
<element ref="c:Domains"/>
</sequence>
</complexType>
<keyref name="DomainAccountsExist"
refer="c:AccountKey">
<selector xpath="c:Domains/c:Domain"/>
<field xpath="@Account"/>
</keyref>
<keyref name="DomainDNSConfiguratorsExist"
refer="c:DNSConfiguratorKey">
<selector xpath="c:Domains/c:Domain"/>
<field xpath="@DNSConfigurator"/>
</keyref>
</element>
</schema>
| Key Name | Description |
|---|---|
| /path/d/c/public_key | The certificate public key. |
| /path/d/c/private_key | The certificate private key. |
| /path/d/c/certificate | The PEM-encoded certificate. |
| /path/d/c/certificate_full_chain | The PEM-encoded full certificate chain. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| path | Path | true | The path to the output directory. |
<Output Type="directory" Name="an-example-output">
<Parameters>
<Parameter Name="path" Value="/tmp"/>
</Parameters>
</Output>
| Key Name | Description |
|---|---|
| /certificates/d/c/public_key | The certificate public key. |
| /certificates/d/c/private_key | The certificate private key. |
| /certificates/d/c/certificate | The PEM-encoded certificate. |
| /certificates/d/c/certificate_full_chain | The PEM-encoded full certificate chain. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| password | Password | false | The password used to authenticate with the etcd server, if required. |
| username | User name | false | The username used to authenticate with the etcd server, if required. |
| endpoint | URI | true | The base address/URI of the etcd server. |
<Output Type="etcd" Name="an-example-etcd-output">
<Parameters>
<Parameter Name="endpoint" Value="http://etcd.example.com:2379/"/>
<Parameter Name="username" Value="grouch"/>
<Parameter Name="password" Value="12345678"/>
</Parameters>
</Output>
| Key Name | Description |
|---|---|
| /certificates/d/c/public_key | The certificate public key. |
| /certificates/d/c/private_key | The certificate private key. |
| /certificates/d/c/certificate | The PEM-encoded certificate. |
| /certificates/d/c/certificate_full_chain | The PEM-encoded full certificate chain. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| password | Password | false | The password used to authenticate with the looseleaf server. |
| username | User name | false | The username used to authenticate with the looseleaf server. |
| endpoint | URI | true | The base address/URI of the looseleaf server. |
<Output Type="looseleaf" Name="an-example-looseleaf-output">
<Parameters>
<Parameter Name="endpoint" Value="http://looseleaf.example.com:20000/"/>
<Parameter Name="username" Value="grouch"/>
<Parameter Name="password" Value="12345678"/>
</Parameters>
</Output>
| Parameter | Type | Required | Description |
|---|---|---|---|
| domain | Domain name | true | The domain name. |
| api-key | API Key | true | The Gandi API key. |
| api-base | URI | false | The Gandi API base address. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| domain | Domain name | true | The domain name. |
| api-key | API Key | true | The Vultr API key. |
| api-base | URI | false | The Vultr API base address. |
info: Usage: certusine [options] [command] [command options]
Options:
--verbose
Set the minimum logging verbosity level.
Default: info
Possible Values: [trace, debug, info, warn, error]
Use the "help" command to examine specific commands:
$ certusine help help.
Command-line arguments can be placed one per line into a file, and the file
can be referenced using the @ symbol:
$ echo help > file.txt
$ echo help >> file.txt
$ certusine @file.txt
Commands:
check-configuration Check configuration file.
generate-keypair Generate keypairs.
help Show detailed help messages for commands.
renew Renew certificates.
show-certificate-outputs Show supported certificate outputs.
show-dns-configurators Show supported DNS configurators.
version Show the package version.
Documentation:
https://www.io7m.com/software/certusine/documentation/
$ certusine check-configuration --file config.json $ (cat <<EOF check-configuration --file config.json EOF ) > args.txt $ certusine @args.txt
| Parameter | Type | Required | Description |
|---|---|---|---|
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
| --file | Path | true | The configuration file |
$ certusine check-configuration --file main.json error: main.json:0:0: Multiple DNS configurators defined with the name "vultr-dns"
| Parameter | Type | Required | Description |
|---|---|---|---|
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
| --public-key | Path | true | The public key |
| --private-key | Path | true | The private key |
| --overwrite | boolean | false | Overwrite keys if already present. |
$ certusine generate-keypair --private-key key.pri --public-key key.pub $ certusine generate-keypair --private-key key.pri --public-key key.pub error: java.nio.file.FileAlreadyExistsException: key.pub $ certusine generate-keypair --private-key key.pri --public-key key.pub --overwrite true
| Parameter | Type | Required | Description |
|---|---|---|---|
| --file | Path | true | The configuration file |
| --only-once | boolean | false | Renew certificates once and then exit. |
| --schedule | Duration | false | Renew certificates repeatedly, waiting this duration between attempts. |
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
$ certusine renew --file config.json --schedule PT1M info: [example.com] (attempt 1/10) checking if domain is authorized info: [example.com] (attempt 1/10) domain is already authorized info: [example.com] (attempt 1/10) checking if certificates require reissuing info: [example.com] (attempt 1/10) certificates do not require reissuing info: [example.com] (attempt 1/10) saving certificates to outputs info: [example.com] (attempt 1/10) saving certificate to output directory:main-output info: waiting until 2022-07-01T13:45:34Z for the next renewal attempt (PT1M)
| Parameter | Type | Required | Description |
|---|---|---|---|
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
$ certusine show-certificate-outputs looseleaf : Write certificates to a looseleaf server. directory : Write certificates to a local directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
$ certusine show-dns-configurators vultr : Configure DNS records using the Vultr DNS API.
| Parameter | Type | Required | Description |
|---|---|---|---|
| --endpoint | String | true | The target looseleaf endpoint base. |
| --output-directory | Path | true | The output directory. |
| --domain | String | true | The domain name. |
| --username | String | true | The user name. |
| --password | String | true | The password. |
| --certificate-name | List<String> | true | The certificate name(s). May be specified multiple times. |
| --only-once | boolean | false | Download certificates once and then exit. |
| --schedule | Duration | false | Download certificates repeatedly, waiting this duration between attempts. |
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
$ certusine looseleaf-download \ --endpoint http://looseleaf4.example.com/ \ --output-directory /certificates \ --domain example.com \ --certificate-name www \ --certificate-name mail \ --username somebody \ --password 12345678 \ --schedule PT1H
| Parameter | Type | Required | Description |
|---|---|---|---|
| --verbose | CLPLogLevel | false | Set the minimum logging verbosity level. |
$ certusine version 1.0.0