Socket
Socket
Sign inDemoInstall

@heroku-cli/plugin-certs-v5

Package Overview
Dependencies
104
Maintainers
30
Versions
97
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.39.2 to 7.39.4

lib/features.js

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [7.39.4](https://github.com/heroku/cli/compare/v7.39.3...v7.39.4) (2020-04-22)
### Bug Fixes
* **certs-v5:** handle private spaces sni migrated apps ([#1456](https://github.com/heroku/cli/issues/1456)) ([039fcf4](https://github.com/heroku/cli/commit/039fcf4e5479ff6231bfe329b482d23f38bd4634))
## [7.39.2](https://github.com/heroku/cli/compare/v7.39.1...v7.39.2) (2020-03-30)

@@ -8,0 +19,0 @@

10

commands/certs/add.js

@@ -17,3 +17,3 @@ 'use strict'

let matchDomains = require('../../lib/match_domains.js')
let checkMultiSniFeature = require('../../lib/features.js')
let { waitForDomains, printDomains } = require('../../lib/domains')

@@ -49,3 +49,3 @@

if (hasSpace) {
if (hasSpace && !context.canMultiSni) {
return endpoints.meta(context.app, 'ssl')

@@ -235,7 +235,9 @@ } else if (!hasAddon) {

function * run (context, heroku) {
let features = yield heroku.get(`/apps/${context.app}/features`)
let canMultiSni = checkMultiSniFeature(features)
context.canMultiSni = canMultiSni
let meta = yield getMeta(context, heroku)
let files = yield getCertAndKey(context)
let features = yield heroku.get(`/apps/${context.app}/features`)
let canMultiSni = features.find(feature => feature.name === 'allow-multiple-sni-endpoints' && feature.enabled === true)

@@ -242,0 +244,0 @@ let cert = yield cli.action(`Adding SSL certificate to ${cli.color.app(context.app)}`, {}, heroku.request({

8

commands/certs/index.js

@@ -7,12 +7,12 @@ 'use strict'

let endpoints = require('../../lib/endpoints.js').certsAndDomains
let endpoints = require('../../lib/endpoints.js').all
let displayTable = require('../../lib/display_table.js')
function * run (context, heroku) {
let certsAndDomains = yield endpoints(context.app, heroku)
let certs = yield endpoints(context.app, heroku)
if (certsAndDomains.certs.length === 0) {
if (certs.length === 0) {
cli.log(`${cli.color.app(context.app)} has no SSL certificates.\nUse ${cli.color.cmd('heroku certs:add CRT KEY')} to add one.`)
} else {
displayTable(_.sortBy(certsAndDomains.certs, 'name'))
displayTable(_.sortBy(certs, 'name'))
}

@@ -19,0 +19,0 @@ }

'use strict'
let checkMultiSniFeature = require('./features.js')
function sslCertsPromise (app, heroku) {

@@ -58,17 +60,21 @@ return heroku.request({

function * all (app, heroku) {
let allCerts = yield {
ssl_certs: sslCertsPromise(app, heroku),
sni_certs: sniCertsPromise(app, heroku)
}
const featureList = yield heroku.get(`/apps/${app}/features`)
const multipleSniEndpointFeature = checkMultiSniFeature(featureList)
return tagAndSort(app, allCerts)
}
let allCerts;
function * certsAndDomains (app, heroku) {
let requests = yield {
ssl_certs: sslCertsPromise(app, heroku),
sni_certs: sniCertsPromise(app, heroku)
if (multipleSniEndpointFeature && multipleSniEndpointFeature.enabled) {
// use SNI endpoints only
allCerts = yield {
ssl_certs: [],
sni_certs: sniCertsPromise(app, heroku),
}
} else {
allCerts = yield {
ssl_certs: sslCertsPromise(app, heroku),
sni_certs: sniCertsPromise(app, heroku)
}
}
return {certs: tagAndSort(app, requests), domains: requests.domains}
return tagAndSort(app, allCerts)
}

@@ -102,4 +108,3 @@

meta,
all,
certsAndDomains
all
}

@@ -1,1 +0,1 @@

{"version":"7.39.2","commands":{"certs:add":{"id":"certs:add","description":"add an SSL certificate to an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:add example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:add intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"type":{"name":"type","type":"option","description":"type to create, either 'sni' or 'endpoint'","required":false},"domains":{"name":"domains","type":"option","description":"domains to create after certificate upload","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:chain":{"id":"certs:chain","description":"print an ordered & complete chain for a certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:generate":{"id":"certs:generate","description":"generate a key and a CSR or self-signed certificate\nGenerate a key and certificate signing request (or self-signed certificate)\nfor an app. Prompts for information to put in the certificate unless --now\nis used, or at least one of the --subject, --owner, --country, --area, or\n--city options is specified.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:generate example.com","flags":{"selfsigned":{"name":"selfsigned","type":"boolean","description":"generate a self-signed certificate instead of a CSR","required":false,"allowNo":false},"keysize":{"name":"keysize","type":"option","description":"RSA key size in bits (default: 2048)","required":false},"owner":{"name":"owner","type":"option","description":"name of organization certificate belongs to","required":false},"country":{"name":"country","type":"option","description":"country of owner, as a two-letter ISO country code","required":false},"area":{"name":"area","type":"option","description":"sub-country area (state, province, etc.) of owner","required":false},"city":{"name":"city","type":"option","description":"city of owner","required":false},"subject":{"name":"subject","type":"option","description":"specify entire certificate subject","required":false},"now":{"name":"now","type":"boolean","description":"do not prompt for any owner information","required":false,"allowNo":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"domain","required":true}]},"certs":{"id":"certs","description":"list SSL certificates for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:info":{"id":"certs:info","description":"show certificate information for an SSL certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"name":{"name":"name","type":"option","description":"name to check info on","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to check info on","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:key":{"id":"certs:key","description":"print the correct key for the given certificate\nYou must pass one single certificate, and one or more keys.\nThe first key that signs the certificate will be printed back.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:key example.com.crt example.com.key","flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:remove":{"id":"certs:remove","description":"remove an SSL certificate from an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to remove","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to remove","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:update":{"id":"certs:update","description":"update an SSL certificate on an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:update example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:update intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to update","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to update","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:auto:disable":{"id":"certs:auto:disable","description":"disable ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:enable":{"id":"certs:auto:enable","description":"enable ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto":{"id":"certs:auto","description":"show ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:refresh":{"id":"certs:auto:refresh","description":"refresh ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]}}}
{"version":"7.39.4","commands":{"certs:add":{"id":"certs:add","description":"add an SSL certificate to an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:add example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:add intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"type":{"name":"type","type":"option","description":"type to create, either 'sni' or 'endpoint'","required":false},"domains":{"name":"domains","type":"option","description":"domains to create after certificate upload","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:chain":{"id":"certs:chain","description":"print an ordered & complete chain for a certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:generate":{"id":"certs:generate","description":"generate a key and a CSR or self-signed certificate\nGenerate a key and certificate signing request (or self-signed certificate)\nfor an app. Prompts for information to put in the certificate unless --now\nis used, or at least one of the --subject, --owner, --country, --area, or\n--city options is specified.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:generate example.com","flags":{"selfsigned":{"name":"selfsigned","type":"boolean","description":"generate a self-signed certificate instead of a CSR","required":false,"allowNo":false},"keysize":{"name":"keysize","type":"option","description":"RSA key size in bits (default: 2048)","required":false},"owner":{"name":"owner","type":"option","description":"name of organization certificate belongs to","required":false},"country":{"name":"country","type":"option","description":"country of owner, as a two-letter ISO country code","required":false},"area":{"name":"area","type":"option","description":"sub-country area (state, province, etc.) of owner","required":false},"city":{"name":"city","type":"option","description":"city of owner","required":false},"subject":{"name":"subject","type":"option","description":"specify entire certificate subject","required":false},"now":{"name":"now","type":"boolean","description":"do not prompt for any owner information","required":false,"allowNo":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"domain","required":true}]},"certs":{"id":"certs","description":"list SSL certificates for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:info":{"id":"certs:info","description":"show certificate information for an SSL certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"name":{"name":"name","type":"option","description":"name to check info on","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to check info on","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:key":{"id":"certs:key","description":"print the correct key for the given certificate\nYou must pass one single certificate, and one or more keys.\nThe first key that signs the certificate will be printed back.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:key example.com.crt example.com.key","flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:remove":{"id":"certs:remove","description":"remove an SSL certificate from an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to remove","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to remove","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:update":{"id":"certs:update","description":"update an SSL certificate on an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:update example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:update intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to update","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to update","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:auto:disable":{"id":"certs:auto:disable","description":"disable ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:enable":{"id":"certs:auto:enable","description":"enable ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto":{"id":"certs:auto","description":"show ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:refresh":{"id":"certs:auto:refresh","description":"refresh ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]}}}
{
"name": "@heroku-cli/plugin-certs-v5",
"description": "heroku ssl plugin",
"version": "7.39.2",
"version": "7.39.4",
"author": "Ransom Briggs rbriggs@heroku.com",

@@ -57,3 +57,3 @@ "bugs": "https://github.com/heroku/cli/issues",

},
"gitHead": "ae094f9c48d41d4c241a7626c1a2dc1c8bce9edf"
"gitHead": "fe88dfc85e314dd2badc7df6d402692e5ebd82be"
}

@@ -36,3 +36,3 @@ heroku-certs

_See code: [commands/certs/index.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/index.js)_
_See code: [commands/certs/index.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/index.js)_

@@ -64,3 +64,3 @@ ## `heroku certs:add CRT KEY`

_See code: [commands/certs/add.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/add.js)_
_See code: [commands/certs/add.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/add.js)_

@@ -80,3 +80,3 @@ ## `heroku certs:auto`

_See code: [commands/certs/auto/index.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/auto/index.js)_
_See code: [commands/certs/auto/index.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/auto/index.js)_

@@ -96,3 +96,3 @@ ## `heroku certs:auto:disable`

_See code: [commands/certs/auto/disable.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/auto/disable.js)_
_See code: [commands/certs/auto/disable.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/auto/disable.js)_

@@ -112,3 +112,3 @@ ## `heroku certs:auto:enable`

_See code: [commands/certs/auto/enable.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/auto/enable.js)_
_See code: [commands/certs/auto/enable.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/auto/enable.js)_

@@ -128,3 +128,3 @@ ## `heroku certs:auto:refresh`

_See code: [commands/certs/auto/refresh.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/auto/refresh.js)_
_See code: [commands/certs/auto/refresh.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/auto/refresh.js)_

@@ -144,3 +144,3 @@ ## `heroku certs:chain`

_See code: [commands/certs/chain.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/chain.js)_
_See code: [commands/certs/chain.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/chain.js)_

@@ -177,3 +177,3 @@ ## `heroku certs:generate DOMAIN`

_See code: [commands/certs/generate.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/generate.js)_
_See code: [commands/certs/generate.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/generate.js)_

@@ -195,3 +195,3 @@ ## `heroku certs:info`

_See code: [commands/certs/info.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/info.js)_
_See code: [commands/certs/info.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/info.js)_

@@ -218,3 +218,3 @@ ## `heroku certs:key`

_See code: [commands/certs/key.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/key.js)_
_See code: [commands/certs/key.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/key.js)_

@@ -236,3 +236,3 @@ ## `heroku certs:remove`

_See code: [commands/certs/remove.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/remove.js)_
_See code: [commands/certs/remove.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/remove.js)_

@@ -264,3 +264,3 @@ ## `heroku certs:update CRT KEY`

_See code: [commands/certs/update.js](https://github.com/heroku/cli/blob/v7.39.2/packages/certs-v5/commands/certs/update.js)_
_See code: [commands/certs/update.js](https://github.com/heroku/cli/blob/v7.39.4/packages/certs-v5/commands/certs/update.js)_
<!-- commandsstop -->
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc