3

After reading Heroku articles, Stack Overflow questions, and the Stripe payments integration guides, the general advice is that I should should purchase an SSL certificate for my custom domain that points to my Heroku app.

Can anyone offer an explanation or other resource to help me understand why I need an SSL certificate?

I understand that SSL encrypts transmitted data, but if Heroku provides SSL, then where am I lacking encryption?

Would a simple explanation be that http://example.com forwards all transmitted data to https://myapp.herokuapp.com, therefore someone could intercept that data on that "leg" of the DNS routing chain?

8

You pay a certificate authority (CA) to sign a certificate that certifies that a particular public key corresponds to a particular host name that you control.

You don't need a signed certificate to achieve confidentiality between you and some destination server. You only need the public key of your intended communication partner.

The fundamentally hard problem that a signed certificate solves is not confidentiality but identity. Suppose a customer tries to talk to example.com. The customer connects to some server, and that server supplies a public key for confidential communication. If the key isn't signed by a trusted authority, though, how do you know that the server you're talking to is really example.com?

In order to get a signed certificate, you go to a certificate authority and supply a public key, a host name, and sufficient evidence that you are the operator of the host name. If the CA is satisfied with your evidence, they issue a signed certificate linking your public key to your host name, which anyone can verify. Based on that certificate, the user learns that the CA (whom the user already trusts) asserts a pairing between the received public key and the host name they are trying to talk to.

There's no way for a user's system to know that example.com and myapp.herokuapp.com are the same service. (Comparing IP addresses isn't useful, because multiple sites may be hosted from the same IP, varying content by the Host request header.) The host names are different, so you need separate certification for each name.

It is possible for you to act as you own CA and produce a self-signed certificate. However, anyone can produce a self-signed certificate, so it doesn't provide any identity proof. Your operating system has a list of trusted CAs, whom we generally trust to be discerning when signing certificates. When a user sees a certificate signed by a trusted CA, the user can be reasonably sure that the CA has done due diligence in verifying that the public key is the correct one for that domain.

  • Is it possible to create your own trusted CA and add it to your own browsers or company browsers for instance? Will the main browsers allow it? – vfclists Jan 17 '15 at 7:38
  • 1
    @vfclists: Yes, it is possible to add additional CA certificates to your browser. It is usually hidden somewhere deep in the advanced settings. – Bart van Ingen Schenau Jan 17 '15 at 9:59
  • 1
    @vfclists As mentioned in the comment above, yes, it's possible to add new trusted CAs, but you'll need to do it for every user who visits your site. (So, feasible to do for all your company computers, since your IT department controls them, but not feasible to ask of every visitor to a site intended for the general public.) – apsillers Jan 17 '15 at 15:07
4

This state of affairs (when you have to cough up for a cert) will not persist for long. There's a very promising initiative Let's Encrypt which will provide free certificates in an automatic mode. It is bound to launch in mid-2015. It is sponsored by Mozilla, EFF, Akamai, and Cisco. Thus, you'll have the best of two worlds: a non-self-signed, identity-verified certificate that will at the very least work in Firefox, and a gratis, hassle-free one at that.

Identity verification will be based on the ACME protocol.

3

You can generate your own certificate, and it will work perfectly fine. The reason you buy one instead of making one is that certificates from well-known CA's will not generate an error in the client browser indicating that the signing certificate authority is unknown and not trusted.

  • 2
    True, but I think the main benefit he gets with an SSL certificate is identity verification, which he doesn't get if he makes his own certificate. – AJ Richardson Jan 17 '15 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.