Coder Social home page Coder Social logo

node-acme's Introduction

Automated Certificate Management Environment (ACME)

This module provides a proof of concept implementation of the ACME protocol for certificate management. Its main functions are:

  • Validation of domain possession
  • Certificate issuance
  • Certificate revocation

The module provides both client and server implementations. For full details of the protocol, see the ACME protocol specification.

Quickstart

> npm install node-acme
> node node-acme/demo.js

Client Side

An ACME client represents a certificate subject, such as a web server. For example, you might use ACME to acquire a certificate when a new web server instance starts up. This module provides both a fine-grained client interface and a simple one-line call to get a certificate.

// The easy way
var certificateInfo;
acme.getMeACertificate(serverURL, domain, function(result) {
  // Result has authorizedKeyPair, subjectKeyPair,
  //            recoveryKey, certificate
});

// The hard way
var client = acme.createClient(serverURL);
var authorizedKeyPair = client.generateKey(keySize);
var subjectKeyPair = client.generateKey(keySize);
client.authorizeKeyPair(authorizedKeyPair, domain, function(result) {
  // Result has a recovery key
  
  client.issueCertificate(authorizedKeyPair, subjectKeyPair,
                          domain, function(result) {
    // Result has certificate
  });
});

Server side

An ACME server represents a CA in the management process. Right now, the server interface is fairly basic. When started with no parameters it will generate a new CA. The state of the server can can be retrieved using the getState method, and used to restart the server in the same state later.

var server = acme.createServer();
server.listen(8888);
// ... handle some client transactions ...
server.close();

TODO

  • Enable HTTPS on client and server
  • Implement additional domain validation mechansims
  • Provide better server interface for managing the CA / server
  • Support SANs and requests for certificates for multiple names
  • Test that issued certs work in browsers (with the TA installed)

node-acme's People

Contributors

bifurcation avatar jdkasten avatar jsha avatar mapmeld avatar chilts avatar silverwind avatar

Watchers

James Cloos avatar Rafferty McDonald avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.