Certificates
Certificates live in their own list, apart from sites. The gateway picks one for each HTTPS connection by its name, so one wildcard certificate can serve every site under a domain. Certificates for single domains can also be issued for you by Let's Encrypt.
Add a certificate
- Open Certs and click Add, then Edit on the new row.
- Set Name to the domain the certificate is for. This is what the gateway matches; see below.
- Paste the PEM certificate, with its intermediate certificates after it, into Certificate, and the PEM private key into Private key.
- Set Crypto algorithm to
RSAorECCto match the key, and leave Type atSSL. - Save. Expire time is read from the certificate.
The new certificate is used for new connections within a few seconds; nothing needs to restart.
How names are matched
For a connection to shop.app.example.com, CasWAF looks for a certificate named:
shop.app.example.com, exactly, and thenexample.com, the registered domain.
So name a certificate for a single domain after that domain, and a wildcard certificate (*.example.com plus example.com) after the bare domain. A wildcard only covers one level, so shop.app.example.com is not covered by *.example.com even though the name matches: give it a certificate of its own.
Certificates of every owner are searched. The site edit page shows which certificate its domain picked under SSL cert.
Expiry
The list shows when each certificate expires. Domain expire shows when the domain's registration expires: click Refresh on a row, or Refresh all, to look it up. CasWAF asks Alibaba Cloud's domain API when the certificate has Provider Aliyun with an access key, and RDAP and WHOIS otherwise.
Provider and keys
Provider (Aliyun or GoDaddy), Account, Access key and Access secret hold DNS credentials for the domain. CasWAF uses the Alibaba Cloud key to read the domain's expiry. The access secret is never sent back to the browser and shows as ***; saving the certificate with *** keeps the stored secret.
Copying and downloading
The edit page has buttons to copy or download the certificate and the private key, for use on other servers.