This is a work in progress. Use at your own risk.
- Copy the configuration example
cp config\defaults.example.json config\defaults.json
- Edit the configuration to best fit your needs
...
"storeDirectory": "./files", // <- This is where your CA and certs will be saved
"subject": {
"email": {
"prompt": "Email address for certificate administrator",
"shortName": "E",
"default": "something@example.com" // <- Email displayed on certificates
},
"organization": {
"prompt": "Organization or Company Name",
"shortName": "O",
"default": "Example Home Lab Industries INC." // <- Organization or Company Name
},
"locality": {
"prompt": "City or Locality",
"shortName": "L",
"default": "New York" // <- City or Locality
},
"state": {
"prompt": "State or Region",
"shortName": "ST",
"default": "New York" // <- State or Province
},
"country": {
"prompt": "Country code (eg. US)",
"shortName": "C",
"default": "US" // <- 2 character Country Code
}
},
"validDomains": [
"example.com" // <- This is used to validate cert request hostnames not alternate names
],
...
- Set a CA passphrase in your environment variables and run setup.
- Note: This passphrase only be set once and will be needed to submit future requests
- Note: This will install only production needed dependencies
SET CAPASS=SecretPassphrase && npm run setup
- Run the server
npm run win
- Submit a post request to the http://localhost:`port`/new endpoint with the following json body
{
"hostname": "certs.example.com",
"altNames": [
"certs.example.com",
"certs.example.info",
"localhost"
],
"passphrase": "SecretPassphrase"
}
- All your web certs will be saved to the directory specified in the config in the
newCerts
directory. Prviate keys are all in theprivate
directory. Your Root CA cert is in thecerts
folder and will need to be applied to all machines as a Trusted Root Certificate
- Allow for creating intermediate CAs
- Allow more customization regarding certificate types and subjects
- Alert administrator when certificate is about to expire
- Enable admins to auto issue new certificates and send to certificate administrator