All Projects → publishlab → Node Acme Client

publishlab / Node Acme Client

Licence: mit
Simple and unopinionated ACME client

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Acme Client

Mailserver
⚠️ UNMAINTAINED - Simple and full-featured mail server using Docker
Stars: ✭ 1,267 (+930.08%)
Mutual labels:  letsencrypt
Acme Dns Certbot Joohoi
Certbot client hook for acme-dns
Stars: ✭ 99 (-19.51%)
Mutual labels:  letsencrypt
Getssl
obtain free SSL certificates from letsencrypt ACME server Suitable for automating the process on remote servers.
Stars: ✭ 1,687 (+1271.54%)
Mutual labels:  letsencrypt
Rancher Lets Encrypt
Automatically create and manage certificates in Rancher using Let's Encrypt webroot verification via a minimal service
Stars: ✭ 88 (-28.46%)
Mutual labels:  letsencrypt
Chef Acme
Chef cookbook to request SSL certificates at Let's Encrypt
Stars: ✭ 98 (-20.33%)
Mutual labels:  letsencrypt
Rails Letsencrypt
The Let's Encrypt certificate manager for rails
Stars: ✭ 104 (-15.45%)
Mutual labels:  letsencrypt
Acme client
Java ACME Client application
Stars: ✭ 77 (-37.4%)
Mutual labels:  letsencrypt
Edgemax Acme
Let's Encrypt setup instructions for Ubiquiti EdgeRouter using DNS-01
Stars: ✭ 121 (-1.63%)
Mutual labels:  letsencrypt
Certbot Plugin Gandi
Certbot plugin for authentication using Gandi LiveDNS
Stars: ✭ 98 (-20.33%)
Mutual labels:  letsencrypt
Kubernetes Letsencrypt
A Kubernetes controller to retrieve Let's Encrypt certificates based on service annotations (unmaintained)
Stars: ✭ 117 (-4.88%)
Mutual labels:  letsencrypt
Dockerweb
A docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.
Stars: ✭ 89 (-27.64%)
Mutual labels:  letsencrypt
Certs
A Let's Encrypt certificates manager for Kubernetes
Stars: ✭ 96 (-21.95%)
Mutual labels:  letsencrypt
Acmesmith
An effective ACME v2 client: Manage keys on the cloud (e.g. S3)
Stars: ✭ 109 (-11.38%)
Mutual labels:  letsencrypt
Certificaat
General-purpose ACME client
Stars: ✭ 88 (-28.46%)
Mutual labels:  letsencrypt
Gobetween
☁️ Modern & minimalistic load balancer for the Сloud era
Stars: ✭ 1,631 (+1226.02%)
Mutual labels:  letsencrypt
Letscertbot
Let's Certbot is a tool builds automated scripts base on Certbot for obtaining, renewing, deploying SSL certificates.
Stars: ✭ 84 (-31.71%)
Mutual labels:  letsencrypt
Acme
Async ACME library written in PHP based on the Amp concurrency framework.
Stars: ✭ 102 (-17.07%)
Mutual labels:  letsencrypt
Tobab
tobab: the poor mans identity aware proxy, easy to use setup for beyondcorp in your homelab
Stars: ✭ 122 (-0.81%)
Mutual labels:  letsencrypt
Node Acme Lambda
Use AWS Lambda to manage SSL certificates for ACME providers like Let's Encrypt.
Stars: ✭ 120 (-2.44%)
Mutual labels:  letsencrypt
Docker Nginx Gunicorn Flask Letsencrypt
Boilerplate code for setting up Nginx + Gunicorn + Flask + automated LetsEncrypt certificates (https) using docker-compose.
Stars: ✭ 117 (-4.88%)
Mutual labels:  letsencrypt

acme-client CircleCI

A simple and unopinionated ACME client.

This module is written to handle communication with a Boulder/Let's Encrypt-style ACME API.

Compatibility

acme-client API Style Node.js
v4.x ACMEv2 Promise >= v10
v3.x ACMEv2 Promise >= v8
v2.x ACMEv2 Promise >= v4
v1.x ACMEv1 callback >= v4

Table of contents

Installation

$ npm install acme-client

Usage

const acme = require('acme-client');

const accountPrivateKey = '<PEM encoded private key>';

const client = new acme.Client({
    directoryUrl: acme.directory.letsencrypt.staging,
    accountKey: accountPrivateKey
});

Directory URLs

acme.directory.letsencrypt.staging;
acme.directory.letsencrypt.production;

Cryptography

For key pair generation and Certificate Signing Requests, acme-client uses node-forge, a pure JavaScript implementation of the TLS protocol.

These utility methods are exposed through .forge.

API documentation: docs/forge.md

Example

const privateKey = await acme.forge.createPrivateKey();

const [certificateKey, certificateCsr] = await acme.forge.createCsr({
    commonName: '*.example.com',
    altNames: ['example.com']
});

Auto mode

For convenience an auto() method is included in the client that takes a single config object. This method will handle the entire process of getting a certificate for one or multiple domains.

A full example can be found at examples/auto.js.

Documentation: docs/client.md#AcmeClient+auto

Example

const autoOpts = {
    csr: '<PEM encoded CSR>',
    email: '[email protected]',
    termsOfServiceAgreed: true,
    challengeCreateFn: async (authz, challenge, keyAuthorization) => {},
    challengeRemoveFn: async (authz, challenge, keyAuthorization) => {}
};

const certificate = await client.auto(autoOpts);

Challenge priority

When ordering a certificate using auto mode, acme-client uses a priority list when selecting challenges to respond to. Its default value is ['http-01', 'dns-01'] which translates to "use http-01 if any challenges exist, otherwise fall back to dns-01".

While most challenges can be validated using the method of your choosing, please note that wildcard certificates can only be validated through dns-01. More information regarding Let's Encrypt challenge types can be found here.

To modify challenge priority, provide a list of challenge types in challengePriority:

await client.auto({
    ...,
    challengePriority: ['http-01', 'dns-01']
});

Internal challenge verification

When using auto mode, acme-client will first validate that challenges are satisfied internally before completing the challenge at the ACME provider. In some cases (firewalls, etc) this internal challenge verification might not be possible to complete.

If internal challenge validation needs to travel through an HTTP proxy, see HTTP client defaults.

To completely disable acme-clients internal challenge verification, enable skipChallengeVerification:

await client.auto({
    ...,
    skipChallengeVerification: true
});

API

For more fine-grained control you can interact with the ACME API using the methods documented below.

A full example can be found at examples/api.js.

API documentation: docs/client.md

Example

const account = await client.createAccount({
    termsOfServiceAgreed: true,
    contact: ['mailto:[email protected]']
});

const order = await client.createOrder({
    identifiers: [
        { type: 'dns', value: 'example.com' },
        { type: 'dns', value: '*.example.com' }
    ]
});

HTTP client defaults

This module uses axios when communicating with the ACME HTTP API, and exposes the client instance through .axios.

For example, should you need to change the default axios configuration to route requests through an HTTP proxy, this can be achieved as follows:

const acme = require('acme-client');

acme.axios.defaults.proxy = {
    host: '127.0.0.1',
    port: 9000
};

A complete list of axios options and documentation can be found at:

Debugging

acme-client uses debug for debugging which can be enabled by running

DEBUG=acme-client node index.js

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].