We are deciding whether "localhost" (and similarly address like "127.0.0.1") should be added as one of the subject alternative names in the certificate. One benefit might be to facilitate local testing. But will there be any drawback?
相关问题
- Mechanize getting “Errno::ECONNRESET: Connection r
- Can ServiceStack JsonServiceClient send a get requ
- .NET Core gives unknown error while processing HTT
- ssl not available
- Change curl SSL Version
相关文章
- Ruby using wrong version of openssl
- How to use Jetty with Let's Encrypt certificat
- How to make priv key in certificate not exportable
- Openssl telling certificate has expired when it ha
- OpenSSL error - unable to get local issuer certifi
- CertificateException - OpenSSLX509CertificateFacto
- Add ssl certificate to selenium-webdriver
- Azure Key Vault Certificates does not have the Pri
It depends on the standards you follow and your security posture.
First things first (for the discussion below). A Fully Qualified Domain Name (FQDN) must be defined. That definition is taken from W. Richard Steven's TCP/IP Illustrated Volume I: The Protocols (p. 189):
That means we can change
localhost
into a fully qualified domain name by appending a period:Here's a little experiment:
Next is standards. One of the most popular is the guides published by the CAs ad Browsers. The CAs ad Browsers publish their operations guides at the CA/B Forums. They two guides of interest are:
There's another popular one, but it generally defers CA/B guides in hosts listed in the certificates. That standard is RFC 5280 from the IETF:
RFC 5280 will call out other items, like how to validate a certificate chain and how to list email addresses in the subjectAltName.
Baseline Guide
The Baseline guide has this to say about names:
And
Finally,
So
localhost
is fine as long as its a fully qualified domain name. In fact,localhost
not even mentioned in the guide.Extended Validation
So
localhost
is fine as long as its a fully qualified domain name. In fact,localhost
not even mentioned in the guide.Microsoft encourages the practice in KB315588, HOW TO: Secure an ASP.NET Application Using Client-Side Certificates:
littleblackbox is a database of private SSL/TLS and SSH keys for embedded devices. It comes with a SQlite3 database in
bin/
.The certificates are in PEM format (i.e.,
-----BEGIN CERTIFICATE-----
and friends). You can dump all the certificates with:Next, remove the
certificate =
from the file:Now use
nawk
andopenssl
to decode each certificate:If we know about them, the bad guys surely know about them.
Finally, its security posture. With all of that said above, here's why its a bad idea. This is where the security posture comes in. From Peter Gutmann's Engineering Security (p. 45):
The problem here is, "is it my localhost, or is it your localhost". So its not so much a question of issuing certficate for and trusting your
localhost
- its more a problem of inadvertently trusting a foreignlocalhost
.Once your software (such as a browser) trusts the certificate issued to
localhost
, its game over.