Pull request proposal: automatic certificate renewal

@Paul-Reed if you read the last couple of posts you'll see this hasn't been resolved yet.

Here's my proposal for how to support the cert renewal. Note this is primarily about the externals of the design - how it would get used. I'm less concern at this stage about individual lines of code in the internal implementation - we can save that for discussion in the PR.

  1. https can be the object it is today and everything works as it does today.
  2. Alternatively, https can be a Function that when called, returns the object (or a Promise.. see below) with the appropriate values.
  3. httpsRefreshInterval is a new property to determine how often it will refresh the https configuration.

Furthermore...

  1. if https is a static object and httpsRefreshInterval is set, we should log a warning that is an invalid configuration, but it should not be fatal.
  2. if httpsRefreshInterval is set and we are running in a version of Node that doesn't support changing the secure context, we should log a warning.
  3. if https is a function, it should be able to return either the Object itself, or a Promise that resolves to the object. This will allow the function to perform asynchronous actions, such as re-reading files etc.

Any changes need to go into the dev branch for the 1.1.0 release.

1 Like