Working with software developers, I’ve probably seen SelfSSL used more often than in most lines of work, and also misuse of it. The purpose of this article is to draw some boxes around the different areas that come in to play when a site is self-certified.
Most obviously, the user requests the page through the browser, but the browser also warns of Certificate/DNS name mismatches. Unless the certificate was issued to the address through which the site is being browsed, the browser will produce certification warnings. This behaviour is expected and desirable as part of browser security.
The browser also verifies that the certificate is trusted. One of the most frequent problems with SelfSSL is that the certificate does not get installed properly. There are a few ways that this can be approached, but the easiest way (given that SelfSSL should only be used for testing) is to install the certificate in to the automatically selected location, or in the Trusted Root Certificate Authorities store if that should fail (obviously this isn’t something you’d normally recommend, but since you issued the certificate yourself, there isn’t much risk). This can be installed manually through the Certificates MMC in Administrative Tools or in response to errors in the browser on the first visit to the newly-certified site. If installing through the browser, the certificate errors will not go away until after all instances of the browser have been closed and re-opened.
Last but not least, the browser decrypts communication using the private key stored in the trusted certificate.
If a test environment requires multiple self-certified sites, these sites will need to have new certificates issued to unique port/IP address pairs (this is fundamental to how SSL works). By default, one would use <IPAddress>:443. A second could be issued on <IPAddress>:444, etc, but it is often more desirable to issue additional certificates on port 443 as well.
I’m always amazed at how many people don’t know that a single NIC can have multiple IP addresses, in the same or different ranges. When planning self-certified sites, always keep in mind the number of addresses that will be needed, don’t forget to add them to the NIC, and make sure that the HOSTS file or DNS is updated accordingly.
The Application Server uses the certificate assigned through the site security settings (or via the SelfSSL command) to assign a public key for encryption and a private key for decryption. Put more simply, IIS establishes the relationship between site and certificate.
As mentioned earlier, IIS binds SSL traffic to a single port-per-IP-address. If use of the default SSL port (443) is desirable for multiple sites, each site must be assigned a specific IP address in IIS and the DNS or HOSTS file settings must resolve the host name to that IP address. It’s worth repeating that the browser will warn of any mismatches between the certificate’s address and the URL through which the site is browsed.
SelfSSL is a free command-line tool in the Windows Server 2003 IIS ResKit. SelfSSL is like a local CA for issuing a single certificate per-IIS instance. However, it does not take the place of a proper domain or Trusted Root CA, as the certificate needs to be manually installed on the end user’s machine (see Browser comments above), and it can only issue a single certificate.
In order to get around this limitation, we can issue a wildcard certificate (*.domainname.com) that can be exported from the first site it is created on and imported to other sites with the same domain name. See the notes above about running multiple sites on SSL in the NIC/DNS and IIS sections.
NOT FOR PRODUCTION
I would like to think that I needn’t issue any further reminders about using SelfSSL in production, but I’ll say it anyway. If all of this wasn’t persuasive, then please remember that every user of the site will need to manually install the certificate. Try and talk someone through this over the phone, multiply the time it takes by ten and then go buy yourself that immeasurably cheaper certificate.
On TwitterMy Tweets
- JohnLong on Adding Drivers to Windows Deployment Services Boot Images
- Boog on How to enable Lync audio within a Remote Desktop session
- Tristan Watkins on How to enable Lync audio within a Remote Desktop session
- Perl on How to enable Lync audio within a Remote Desktop session
- ShamrockSoft on No Lossless Audio With Zune
- Administrivia (1)
- Authentication (10)
- Business Continuity (2)
- Client applications (17)
- Consultancy and Design (17)
- Hardware (9)
- IT Management (12)
- Miscellaneous (5)
- Mobile (3)
- Networking (18)
- Office 365 Grid (3)
- Performance (26)
- Power (2)
- Security (20)
- SharePoint (76)
- Unified Communications (3)
- Virtualisation (30)
- Windows (53)
TagsActive Directory administration Amazon Web Services ASUS binding BLOB Caching certificates Claims Cloud DCOM Dell development DNS EC2 FIM 2010 Graphics Hyper-V IaaS ICS IIS Information Rights Management Intel IPv6 IRM Lync MAC Microsoft NUMA PowerShell RMS Search Service Application SharePoint 2007 SharePoint 2010 SLAT User Information User Profile Virtual Machine VMWare w3wp Windows 7 Windows Deployment Services Windows Server 2008 R2 Workgroup
Archives by Month