Skip to content

Commit

Permalink
Implemented DNS-01 Challenge with Cloud Flare DNS Provider (#2)
Browse files Browse the repository at this point in the history
lets-encrypt-acme-client.js

Implementing DNS-01 Challenge
Implementing Cloud Flare Dns Provider

Add Promised Class
Promised().bool(boolFunc, max = 5)
  • Loading branch information
FirstTimeEZ committed Dec 20, 2024
1 parent faac3e9 commit 60e69a8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 18 deletions.
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Lets Encrypt ACME Client
# LetsEncrypt! ACME Client

Automatically Issue and Renew `Let's Encrypt Certificates` (ACMEv2) using `DNS-01` or `HTTP-01`

Utilizes a `Daemon` that operates periodically alongside a `Mixin` to handle challenge completions.
Automatically Create and Renew `LetsEncrypt! SSL Certificates`, including `Wildcard Certificates` for supported `DNS Providers`

### Getting Started

You can view the full [`SSL Server Example`](https://github.com/FirstTimeEZ/server-ssl) to understand the `Daemon` and `Mixin`
This most recent version of this package is implemented in [`SSL Server`](https://github.com/FirstTimeEZ/server-ssl) and you can use that to understand how it works if the `jsdoc` isn't enough information.

### Wild Card Certificates

You can generate `Wild Card Certificates` if you use a supported `DNS-01` provider
You can generate `Wild Card Certificates` if you are using a supported `DNS Provider`

At this present moment that is only `Cloud Flare`
| Supported DNS Providers |
|-------------------------|
| Cloud Flare |

```
let dnsProvider = {
Expand All @@ -22,15 +22,17 @@ let dnsProvider = {
}
```

`DNS Providers` are used to complete `DNS-01` challenges

--------

### Daemon
### LetsEncrypt! Daemon

The `Daemon` runs periodically to Issue or Renew the certificate
The `Daemon` runs periodically to `Create` or `Renew` the `Certificate`

```javascript
/**
* Starts the Let's Encrypt Daemon to Manage the SSL Certificate for the Server
* Starts the LetsEncrypt! Daemon to Manage the SSL Certificate for the Server
*
* @param {Array<string>} fqdns - The fully qualified domain names as a SAN (e.g., ["example.com", "www.example.com"]), You must use a `dnsProvider` if you include a wild card
* @param {string} sslPath - The path where your acme account, keys and generated certificate will be stored or loaded from
Expand All @@ -51,10 +53,12 @@ The `Daemon` runs periodically to Issue or Renew the certificate
export async function startLetsEncryptDaemon(fqdns, sslPath, certificateCallback, optGenerateAnyway = false, optStaging = false, dnsProvider = undefined)
```

### HTTP Mixin
### HTTP Mixin for `HTTP-01`

`HTTP Mixin` that completes the `HTTP-01` Challenges created by the `Daemon`

This is not required if you are using a `DNS Provider`

```javascript
/**
* Node.js Middleware function to check and respond to ACME HTTP-01 challenges inside the HTTP Server.
Expand All @@ -66,4 +70,10 @@ export async function startLetsEncryptDaemon(fqdns, sslPath, certificateCallback
* }).listen(80);
*/
export async function checkChallengesMixin(req, res)
```
```

--------

### Challenges

The `DNS-01` and `HTTP-01` challenges have been implemented
2 changes: 1 addition & 1 deletion lets-encrypt-acme-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ let ariWindow = null;
let remaining = { days: null, hours: null, minutes: null };

/**
* Starts the Let's Encrypt Daemon to Manage the SSL Certificate for the Server
* Starts the LetsEncrypt! Daemon to Manage the SSL Certificate for the Server
*
* @param {Array<string>} fqdns - The fully qualified domain names as a SAN (e.g., ["example.com", "www.example.com"]), You must use a `dnsProvider` if you include a wild card
* @param {string} sslPath - The path where your acme account, keys and generated certificate will be stored or loaded from
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "lets-encrypt-acme-client",
"author": "FirstTimeEZ",
"version": "40.0.1",
"description": "Automatically Issue and Renew Let's Encrypt Certificates by utilizing a Daemon that operates periodically alongside a Mixin to handle challenge completions. (ACMEv2)",
"version": "40.0.2",
"description": "Automatically Create and Renew LetsEncrypt! SSL Certificates, including Wildcard Certificates for supported DNS Providers",
"main": "lets-encrypt-acme-client.js",
"type": "module",
"keywords": [
Expand All @@ -29,7 +29,16 @@
"dns",
"api",
"configuration",
"monitoring"
"monitoring",
"http",
"redirect",
"dns-01",
"wild",
"card",
"wildcard",
"cloud",
"flare",
"cloudflare"
],
"license": "Apache-2.0",
"dependencies": {
Expand Down

0 comments on commit 60e69a8

Please sign in to comment.