1.1.0 • Published 4 years ago

@tylermenezes/vault-pki v1.1.0

Weekly downloads
1
License
Artistic-2.0
Repository
github
Last release
4 years ago

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,
}