Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Clarify how to provide intermediate certificates with heroku certs:add #31

Open
edmorley opened this issue Mar 6, 2017 · 6 comments
Open

Comments

@edmorley
Copy link
Member

edmorley commented Mar 6, 2017

Currently the UX for adding a certificate plus its intermediates is slightly confusing, since:

It looks like I wasn't the only one who wasn't sure what to do with the intermediate cert:
https://stackoverflow.com/questions/38447944/heroku-ssl-install-intermediate-cert
https://stackoverflow.com/questions/23763411/uploading-ssl-certificate-to-heroku

And a number of guides have popped up to try and document it:
http://www.joshwright.com/tips/setup-a-godaddy-ssl-certificate-on-heroku ("Here's the part that the Heroku docs don't explain...")
http://ryan.mcgeary.org/2011/09/16/how-to-add-a-dnsimple-ssl-certificate-to-heroku/

As such, it would be great to:

  1. update the heroku certs:add help text to clarify that:
  • the reference to CRT can be either a .crt or .pem file, not just a .crt
  • the CRT is actually "certificate concatenated with intermediate certificates"
  1. Update the devcenter docs, so that they don't imply that heroku certs:add takes three arguments, for example by:
  • changing "Add your certificate, any intermediate certificates bundles, and private key..." to "Add your certificate (including any intermediate certificates), and private key..."
  • updating the example heroku certs:add code block to show the cat example.crt intermediates-bundle.crt > server.crt line too.

The current help text for reference:

$ heroku certs:add --help
Usage: heroku certs:add CRT KEY

add an SSL certificate to an app

 -a, --app APP       # app to run command against
 -r, --remote REMOTE # git remote of app to run command against
 --bypass            # bypass the trust chain completion step
 --domains DOMAINS   # domains to create after certificate upload
 --type TYPE         # type to create, either 'sni' or 'endpoint'

Example:

 $ heroku certs:add example.com.crt example.com.key

Many thanks!

@edmorley edmorley changed the title Clarify certificate argument in heroku certs:add help text Clarify how to provide intermediate certificates with heroku certs:add Mar 6, 2017
@ransombriggs
Copy link
Contributor

@edmorley This is a regression and I will start working on a fix

@ransombriggs
Copy link
Contributor

@edmorley thanks for letting us know about this issue, I shipped a fix for add and update today which you can pull down with heroku update. I also updated the docs with a note about pem also being acceptable and an example for intermediate certificates.

@brettgoulder could you update the devcenter docs with an explanation of how to upload intermediate certificates?

Usage: heroku certs:add CRT KEY

add an SSL certificate to an app

 -a, --app APP       # app to run command against
 -r, --remote REMOTE # git remote of app to run command against
 --bypass            # bypass the trust chain completion step
 --domains DOMAINS   # domains to create after certificate upload
 --type TYPE         # type to create, either 'sni' or 'endpoint'

Note: certificates with PEM encoding are also valid

Example:

 $ heroku certs:add example.com.crt example.com.key

Certificate Intermediary Example:

 $ heroku certs:add intermediary.crt example.com.crt example.com.key

@edmorley
Copy link
Member Author

Many thanks for the fix!

It looks like the only thing left is:

@brettgoulder could you update the devcenter docs with an explanation of how to upload intermediate certificates?

@mgan59
Copy link

mgan59 commented Jun 7, 2017

Yup, just ended up here after I was about ready to write some profane messages to Heroku support... So more digging now, but essentially my SSL is a mess for my apps (wildcard ssl) because some are still using legacy ssl configurations and my latest environment I tried to use the GUI and it says my certificate isn't trusted because of intermediates.

So going forward should we just use CLI and don't look at the GUI? Because the GUI for my other apps says I don't have SSL configured even though everything looks fine when I run heroku certs:info -r production

All around the docs need updated because I'm still confused what I need to do exactly at this point.

@mgan59
Copy link

mgan59 commented Jun 8, 2017

So for anyone that stumbled in here.... I ended up using the CLI to drive everything and needed to use the --type 'endpoint' flag to get my wildcards to work for multi-domains. Cert's set to SNI would be untrusted.

@edmorley
Copy link
Member Author

It looks like the only thing left is:

@brettgoulder could you update the devcenter docs with an explanation of how to upload intermediate certificates?

:-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants