Let's Encrypt Target
The Let's Encrypt Target enables the use of Let's Encrypt as a Public Certificate Authority (CA) with an Akeyless PKI Issuer.
With a public CA, Akeyless cannot access the private key that signs certificates. Akeyless validates certificate issuance requests by connecting to Let's Encrypt through the Akeyless Gateway.
The Let's Encrypt integration uses an ACME Client (v2).
To prove domain ownership, Let's Encrypt requires an ACME challenge. Let's Encrypt documents HTTP-01, DNS-01, and TLS-ALPN-01 challenge methods. For the Akeyless Let's Encrypt target, the supported challenge types are:
http(default)dns
To prove domain ownership, the Akeyless integration supports the following validation methods:
-
DNS validation: Ownership is proven by adding a DNS TXT record. This requires the domain to be managed in a supported DNS provider's hosted zone (for example, AWS Route 53, GCP Cloud DNS, or Azure DNS).
-
HTTP validation: Ownership is proven by hosting a challenge file at
http://<YOUR_DOMAIN>/.well-known/acme-challenge/and returning the expected value during validation.
Create a Let's Encrypt Target with the CLI
To create a Let's Encrypt target with the CLI, use one of the following examples based on the challenge method and DNS provider:
akeyless target create lets-encrypt \
--name <Target Name> \
--email <ACME Account Email> \
--acme-challenge dns \
--dns-target-creds <AWS DNS Target Name> \
--hosted-zone <Route53 Hosted Zone ID>akeyless target create lets-encrypt \
--name <Target Name> \
--email <ACME Account Email> \
--acme-challenge dns \
--dns-target-creds <GCP DNS Target Name> \
--gcp-project <GCP Project ID>akeyless target create lets-encrypt \
--name <Target Name> \
--email <ACME Account Email> \
--acme-challenge dns \
--dns-target-creds <Azure DNS Target Name> \
--resource-group <Azure Resource Group Name>akeyless target create lets-encrypt \
--name <Target Name> \
--email <ACME Account Email> \
--acme-challenge httpWhere:
-
name: A unique name for the target. The name can include a path to a virtual folder by using slash/separators. If the folder does not exist, Akeyless creates it with the target. -
email: Email address used for ACME account registration. -
lets-encrypt-url: Use this when you want to select the ACME environment explicitly. Supported values areproduction(default) andstaging. -
acme-challenge: Use this when you need DNS validation or want to set the challenge type explicitly. Supported values arehttp(default) anddns. -
dns-target-creds: Use this when--acme-challenge=dns. This is required for DNS validation. Supported target types are AWS, Azure, and GCP. -
hosted-zone: Use this when--acme-challenge=dnsand--dns-target-credspoints to an AWS target. This identifies the Route 53 hosted zone. -
resource-group: Use this when--acme-challenge=dnsand--dns-target-credspoints to an Azure target. -
gcp-project: Use this when--acme-challenge=dnsand--dns-target-credspoints to a GCP target and the project ID cannot be derived automatically. -
timeout: Use this when challenge validation needs a custom wait time. Default is5m. Supported range is1mto1h. -
key: Use this when you want to encrypt target secret values with a specific protection key instead of the account default key.
View the complete list of parameters for this command.
Create a Let's Encrypt Target in the Console
-
Log in to the Akeyless Console, and go to Targets > New > Certificate Automation (Let's Encrypt).
-
Define the Name of the target, and specify the Location as a path to the virtual folder where you want to create the new target, using slash
/separators. If the folder does not exist, it will be created together with the target. -
Select a Protection key with a Customer Fragment to enable Zero-Knowledge and click Next. Read more about Zero-Knowledge Encryption.
-
Define the remaining parameters as follows:
-
Server URL: Either Production or Staging.
-
Email: Email address used to register the ACME account.
-
Challenge Type: Either HTTP or DNS.
-
DNS Provider: Either AWS, GCP, or Azure (relevant only if Challenge Type is DNS).
-
Target: Select a target that contains the DNS provider credentials (relevant only if Challenge Type is DNS).
-
Hosted Zone: AWS Route 53 hosted zone identifier. (Relevant only if Challenge Type is DNS and DNS Provider is AWS).
-
Resource Group: Azure resource group name. (Relevant only if Challenge Type is DNS and DNS Provider is Azure).
-
GCP Project: GCP Cloud DNS project ID. Optional when DNS Provider is GCP.
-
-
Timeout: Challenge validation timeout in seconds. Default is 300 seconds (5 minutes).
-
-
Click Finish.
Issue Certificates With HTTP Challenge
When the Let's Encrypt target is configured with --acme-challenge=http, certificate issuance is a two-phase flow:
- Request the certificate:
akeyless get-pki-certificate \
--cert-issuer-name <PKI Issuer Name> \
--csr-file-path <path/to/request.csr>-
Deploy the challenge file to the URL path returned in
http_challenge_info.file_pathusing the value inhttp_challenge_info.file_content. -
Finalize validation and issuance:
akeyless validate-certificate-challenge \
--cert-display-id <Certificate Display ID> \
--timeout 120- Retrieve the issued certificate value:
akeyless get-certificate-value \
--cert-issuer-name <PKI Issuer Name> \
--display-id <Certificate Display ID>
Note:
validate-certificate-challengeis required for HTTP challenge flows. DNS challenge flows do not require this additional validation command. For a PKI issuer that uses a Let's Encrypt target, requested TTL values in certificate requests can be between 30 and 90 days. The issued Let's Encrypt certificate validity is fixed at 90 days.
Updated 18 days ago
