简体   繁体   English

Heroku SSL问题

[英]Heroku SSL issue

I am wondering if this is an issue on our end or Heroku's end. 我想知道这是我们还是Heroku的问题。 I installed the SSL add-on ($20/month) and got an SSL cert through my universities IT department (changed the name of some details but you get the idea). 我安装了SSL附加组件(每月20美元),并通过我的大学IT部门获得了SSL证书(更改了一些详细信息的名称,但您明白了)。 I followed the steps listed here: https://devcenter.heroku.com/articles/ssl-endpoint 我遵循此处列出的步骤: https : //devcenter.heroku.com/articles/ssl-endpoint

I am getting an error in chrome that says "Your connection is not private" NET::ERR_CERT_COMMON_NAME_INVALID. 我在chrome中收到一个错误消息,提示“您的连接不是私有的” NET :: ERR_CERT_COMMON_NAME_INVALID。 Then it also says This server could not prove that it is mydomain.edu; 然后,它还说此服务器无法证明它是mydomain.edu; its security certificate is from *.herokuapp.com. 它的安全证书来自* .herokuapp.com。 This may be caused by a misconfiguration or an attacker intercepting your connection. 这可能是由于配置错误或攻击者拦截了您的连接引起的。

I've checked my CSR and it has the mydomain.edu as the CN, I've checked the email that came from my schools IT and the email says mydomain.edu. 我已经检查了我的CSR,并将它的mydomain.edu作为CN,我已经检查了来自学校IT的电子邮件,并且该电子邮件显示为mydomain.edu。

When I check the heroku certs command I get the following: 当我检查heroku certs命令时,得到以下信息:

$ heroku certs
Endpoint                   Common Name(s)              Expires               Trusted
-------------------------  --------------------------  --------------------  -------
tokyo-13550.herokussl.com  mydomain.edu                2019-04-14 23:59 UTC  True

The only issue I can see wrong is the CNAME record. 我唯一看到的问题是CNAME记录。 I believe the endpoint changed when I added SSL: 我相信添加SSL时端点已更改:

$ heroku certs:add cert.cer private.key --app myapp
Resolving trust chain... done
Adding SSL Endpoint to myapp... done
myapp now served by tokyo-13550.herokussl.com
Certificate details:
Common Name(s): mydomain.edu
Expires At:     2019-04-14 23:59 UTC
Issuer:         /C=US/ST=MI/L=Ann Arbor/O=Internet2/OU=InCommon/CN=InCommon RSA Server CA
Starts At:      2016-04-14 00:00 UTC
Subject:        /C=US/postalCode=myzip/ST=mystate/L=mycity/street=myaddress/O=myorginization/OU=Certificate Management/CN=mydomain.edu
SSL certificate is verified by a root authority.

I initially was running the app without SSL and we setup a CNAME record with this endpoint: 我最初是在没有SSL的情况下运行应用程序的,我们使用此端点设置了CNAME记录:

us-east-1-a.route.herokuapp.com 

I believe that if we update the CNAME record from the US to the Tokyo one then the SSL issue will be solved, my IT department believes I installed the cert wrong or it is using the old cert since it says *.herokuapp.com instead of referencing mydomain.edu. 我认为,如果我们将CNAME记录从美国更新到东京,那么SSL问题将得到解决,我的IT部门认为我安装了错误的证书,或者它使用的是旧证书,因为它显示的是* .herokuapp.com而不是引用mydomain.edu。

In case anyone else runs into something similar it was the CNAME that needed to be updated. 如果其他人遇到类似问题,则需要更新CNAME。 The IT person I was working with tried hardcoding the new CNAME in his /etc/hosts file and was getting the correct SSL Cert 我正在使用的IT人员尝试在他的/ etc / hosts文件中对新的CNAME进行硬编码,并获得了正确的SSL证书

Heroku's decisions regarding dynos, scalability, and high-availability have direct impact on how you may configure and operate your service. Heroku关于动态,可伸缩性和高可用性的决定直接影响您如何配置和操作服务。 Those decisions have particular impact when it comes to SSL and HTTPS. 这些决定对SSL和HTTPS尤其重要。

First, if you really did acquire a cert for mydomain.edu without a subdomain, you should read this reference for configuring root domains, and inquire with your University staff if they have support for this. 首先,如果您确实为mydomain.edu获得了一个没有子域的证书,则应阅读此参考资料以配置根域,并向您的大学职员咨询是否支持。 (I would expect they do not.) The rest of this advice will assume that you are attempting to secure a subdomain. (我希望他们不会。)其余建议将假定您正在尝试保护子域。

The error you are getting indicates that the CNAME has not been updated. 您收到的错误表明CNAME尚未更新。 All apps at herokuapp.com use an SSL cert owned, managed, and provisioned by Heroku for their customers use. herokuapp.com所有应用程序herokuapp.com使用由Heroku拥有,管理和配置的SSL证书,供其客户使用。 Inspecting the CNAME record should be sufficient to show that the domain in question is delegating to this "public" tier of SSL provisioning. 检查CNAME记录应足以表明所讨论的域正在委派给SSL设置的“公共”层。

The documentation to which you should specifically refer is here . 您应在此处特别参考的文档。 When you provision the paid SSL endpoint service at Heroku, it alters your applications' runtime environment such that it is no longer serviced by the same network that powers the public tier. 在Heroku中提供付费SSL终结点服务时,它会更改应用程序的运行时环境,从而不再由为公共层提供动力的同一网络提供服务。 As such, you do receive a new domain to CNAME to provide SSL service. 因此,您确实会收到CNAME的新域以提供SSL服务。 You can explain to your IT staff that the process puts your application on a new machine. 您可以向IT员工说明该过程会将您的应用程序放置在新计算机上。

Because you elide the domain name in question, we can't verify ourselves that you have installed the certificate correctly, but you appear to have followed the documentation to me. 由于您遗漏了所涉及的域名,因此我们无法证明自己已正确安装了证书,但是您似乎已经向我遵循了文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM