This project automates the generation and deployment of Let's Encrypt SSL/TLS certificates in Oracle Cloud Infrastructure (OCI) using DNS-01 or HTTP-01 challenges. It supports automatic renewal and integration with OCI Certificates, Vault, and Secrets.
For detailed install instructions see https://redthunder.blog/2022/10/14/managing-multiple-lets-encrypt-certificates-with-oracle-cloud-infrastructure/
- π‘οΈ Automatic SSL certificate generation with Let's Encrypt
- β Supports DNS-01 challenge via OCI DNS
- π NEW: Supports HTTP-01 challenge using OCI WAF (Web Application Firewall)
- π Integration with OCI Certificates, Vault, and Secrets
- π Auto-renewal support
- πͺ Optional auto-deploy functionality
β¨ Contributed by Cristhian Won
This new feature enables HTTP-01 certificate validation using a WAF policy, which is ideal when the DNS of the domain is managed by an external provider and you cannot request frequent updates, as required by DNS-01. In this scenario, the external party can point the domain to your OCI Load Balancer public IP, and with a WAF policy attached, the challenge response can be handled dynamically without further DNS changes.
- A domain (e.g.,
example.com) pointing to an OCI Load Balancer IP. - A WAF policy attached to that Load Balancer.
- Your
config.json(stored in object storage bucket) must be updated with the WAF info.
{
"certificates": [
{
"cn_name": "example.com",
"alt_names": [],
"waf_ocid": "ocid1.webappfirewallpolicy.oc1...",
"waf_region": "sa-santiago-1",
"certificate_region": "sa-santiago-1",
"cert_compartment_ocid": "ocid1.compartment.oc1...",
"auto_deploy": true,
"vault_region": "sa-santiago-1",
"vault_ocid": "ocid1.vault.oc1...",
"vault_master_key_ocid": "ocid1.key.oc1...",
"renew_days_before_expiry": 30
}
]
}Make sure the dynamic group (e.g., acme-certbot-dg) has the following permissions:
Allow dynamic-group acme-certbot-dg to inspect functions-family in compartment example-compartment
Allow dynamic-group acme-certbot-dg to use log-content in compartment example-compartment
Allow dynamic-group acme-certbot-dg to manage leaf-certificate-family in compartment example-compartment
Allow dynamic-group acme-certbot-dg to manage secret-family in compartment example-compartment
Allow dynamic-group acme-certbot-dg to manage key-family in compartment example-compartment
Allow dynamic-group acme-certbot-dg to use vaults in compartment example-compartment
Allow dynamic-group acme-certbot-dg to use objects in compartment example-compartment
Allow dynamic-group acme-certbot-dg to use fn-invocation in compartment example-compartment
Allow dynamic-group acme-certbot-dg to manage waf-policy in compartment example-compartment
Allow dynamic-group acme-certbot-dg to use dns in tenancy
Allow service faas to {KEY_READ} in compartment example-compartment where request.operation = 'GetKeyVersion'
Allow service faas to {KEY_VERIFY} in compartment example-compartment where request.operation = 'Verify'
The tool runs as a function or scheduled job that:
- Loads the certificate config from a JSON file in Object Storage
- Resolves whether to use DNS or HTTP challenge
- Issues the challenge via Let's Encrypt
- For HTTP-01:
- It configures a temporary URL on the WAF policy
- Let's Encrypt calls this URL to verify ownership
- Stores the certificate into Certificate Manager
Originally developed by @scotti-fletcher π
HTTP-01 WAF support added by @cristhianwon π