@tylermenezes/vault-pki

1.1.0 • Public • Published

vault-pki

A node module for getting certificates from a vault store.

Provides a class which can be initialized with the following config object:

{
  address,
  token,
  mountpoint,
  tls: {
    skipVerify,
    caPath,
    caCert,
  },
}

The resulting instance provides three methods:

  • issue(role, cn, ttl, additionalOptions) - Issues a certificate.
  • issueAndRenew(role, cn, ttl, additionalOptions, onUpdate) - Issues a certificate, and auto-renews when each token is 90% of the way through its lifespan. onUpdate is called after each renewal.
  • list - Lists all certificates in the store.

Returned certificate objects have these properties:

{
  expiresIn,
  type,
  serial,
  certificate,
  privateKey,
  ca,
  chain,
}

Readme

Keywords

none

Package Sidebar

Install

npm i @tylermenezes/vault-pki

Weekly Downloads

1

Version

1.1.0

License

Artistic-2.0

Unpacked Size

8.32 kB

Total Files

7

Last publish

Collaborators

  • tylermenezes