A greenlock keypair and certificate storage strategy with wildcard support for MySQL, Postgres, SQLite3, and Microsoft SQL Server
Go to file
Ryan Burnette 1e6c35151f initial build
- passes https://git.coolaj86.com/coolaj86/greenlock-store-test.js
- lacks working approveDomains example
- not 100% sure wildcards are fully supported
- not tested in production
2019-04-08 13:01:22 +00:00
db initial build 2019-04-08 13:01:22 +00:00
.gitignore initial build 2019-04-08 13:01:22 +00:00
LICENSE initial build 2019-04-08 13:01:22 +00:00
README.md initial build 2019-04-08 13:01:22 +00:00
convert-wildcard.js initial build 2019-04-08 13:01:22 +00:00
le-store-sequelize.js initial build 2019-04-08 13:01:22 +00:00
make-safe-sha-str.js initial build 2019-04-08 13:01:22 +00:00
merge-options.js initial build 2019-04-08 13:01:22 +00:00
package-lock.json initial build 2019-04-08 13:01:22 +00:00
package.json initial build 2019-04-08 13:01:22 +00:00
sync.js initial build 2019-04-08 13:01:22 +00:00

README.md

le-store-sequelize

A database-driven Greenlock storage plugin with wildcard support.

Usage

To use, provide this Greenlock storage plugin as the store attribute when you invoke create.

var store = require('le-store-sequelize');

var gl = greenlock.create({
  store,
  approveDomains,
  ...
});

Wildcards & AltNames

Working with wildcards and multiple altnames requires Greenlock >= v2.7.

To do so you must set opts.subject and opts.domains within the approvedomains() callback.

subject refers to "the subject of the ssl certificate" as opposed to domain which indicates "the domain servername used in the current request". For single-domain certificates they're always the same, but for multiple-domain certificates subject must be the name no matter what domain is receiving a request. subject is used as part of the name of the file storage path where the certificate will be saved (or retrieved).

domains should be the list of "altnames" on the certificate, which should include the subject.

Example

function approveDomains() {
}

Out of the box... it just works

// TODO

Set Options

You can send in options that set which database connector to use, as well as a table prefix.

Provide Your Own Database Object

You can provide your own database object if you wish. It might not even need to be Sequelize as long as it supports the same methods and argument objects as are used.