Wanted: sequelize plugin #1
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now all certificates are saved to disk.
This doesn't work well for ephemeral systems that shouldn't rely on disk storage - such as AWS.
I'd like someone to help in creating some plugins (i.e.
le-store-sql
) that work with PostgreSQL, SQLite, MongoDB, etc through common node db adapters.le-store-SPEC
le-store-sql
https://github.com/Daplie/le-store-sql/issues/1le-store-mongo
Here's a template for what needs to be implemented:
Note that certificates may have up to 100 domains listed, but renewals happen in a one-off fashion, so it is required to be able to look up any certificate and any account based on any domain it is associated with and to be able to return all domains for which a certificate or account is valid.
Here's the current plugin: https://github.com/Daplie/le-store-certbot
(it's overly complicated because it's taken from the codebase that was used to maintain compatibility with the python certbot, but you can see that the 9 essential methods are implemented)
In v2.0.0, this is how you pass a custom handler:
See https://git.coolaj86.com/coolaj86/greenlock.js
Any user can therefore create their set of handlers and then publish them to npm as
le-store-*
orle-challenge-*
and others can use them.Many people will have very specific requirements with very special tables, but for a great many people having some intuitively named tables will be good enough.
The problem that we're solving for is that on various types of cloud systems the filesystems are ephemeral and the database must go on a separate machine or service.
For those people, the plugins will get them up and running with their preferred cloud service and their preferred database supported by that cloud service.
For people who are not those people, it gives them a good base to start from - code to look at and modify.
@Rush Not that you need to do it my way, but I like the convention of join tables being named after what they join, alphabetically, table names being pluralized, all lowercase with underscores (no unexpected behaviors with case-sensitive filesystems like MySQL 4 had), and ids singular and having a trailing
_id
, and timestamps to have a trailing_at
.For example:
8 check / set methods
They're all listed here:
https://git.coolaj86.com/coolaj86/le-store-SPEC.js
And they're stubbed out here:
https://git.coolaj86.com/coolaj86/le-store-SPEC.js/src/branch/template/index.js
check
vsget
vsset
: There are some abstractions higher up that are calledget
which are reallygetOrCreate
, so I called thesecheck
to disambiguate.callback order
The callback order is in the same as they're listed in the documentation:
They're individually documented in the stub:
https://git.coolaj86.com/coolaj86/le-store-SPEC.js/src/branch/template/index.js
The reason the check/set keypairs are separate is twofold:
ACME Challenge Protocols
The 3 supported protocols are
http-01
,tls-sni-01
(https), anddns-01
. I'd recommend sticking withhttp-01
, which is the default and uses http on port 80 for now.I think
tls-sni-01
requires a valid certificate, which could get you into trouble.There are two implementations for
dns-01
. Ours, of course, requires Daplie Domains / Daplie DNS. Another guy has one for cloudflare I think.And if you npm install from master (I haven't published v2.1.8 yet), you can actually choose which strategy to use by setting
challengeType
in theapproveDomains
callback.When will new certs be used?
If you arbitrarily register and or renew a certificate, it will be used when the one that exists in-memory would have been renewed (because it will always call certificates.check to see if a newer cert already exists before renewing), which is randomly set between 3 and 10 days before expiration on each certificate load.
Help me
Please open a pull request on the docs with the clarifications you'd like to see added:
https://git.coolaj86.com/coolaj86/le-store-SPEC.js