Configuring SSL for SharePoint
When dealing in any kind of web-based
security, we must rely on the industry standard use of Secure Socket
Layer, which operates via the use of X509 Public/Private key
certificates.
SharePoint 2013 supports use of SSL, and it is
a requirement when integrating federated authentication. To establish a
certificate for SSL, the process typically goes something like this:
- An administrator exports a Certificate Server Request (CSR) from IIS for a given application and domain name.
- The administrator sends the CSR to a trusted authority, such as VeriSign.
- The trusted authority validates the authenticity of the purchaser via a series of security protocols.
- With trust established, the trusted authority generates a new SSL
certificate for the purchaser’s domain name and signs it as trusted.
- The administrator installs the certificate in IIS.
- Users who request secure pages from the organization’s application
can trust returned data because the encryption certificate is trusted
from a well-known source—VeriSign or other root certificate provider.
Note For more information on purchasing an SSL certificate, visit http://verisign.com.
For development purposes and demonstration,
purchasing of an SSL certificate might seem overkill. Fortunately, we
can generate self-signed certificates, via IIS. These self-signed
certificates are untrusted, because a trust source has not signed them,
but they provide a suitable free alternative for demonstration and
development. The following steps detail how to create a self-signed
certificate for SharePoint 2013, via IIS:
- Open Internet Information Service Manager 7.
- Click the server name in the left navigation tree and then
double-click the Server Certificates icon on the right, under IIS
section (Figure 4).
- Click the link to create a self-signed certificate.
- Give the certificate a friendly name, and then click the OK button.
- Double-click the Self-signed certificate to see the details.
- Click the Details tab and then click the button to copy the certificate to a file.
- Click the Next button.
- Select the option to not export the private key, then click the Next button.
- Choose the export format (I chose the default DER format) and then the Next button.
- Give the certificate a file name and browse to a location on disk.
- Click the Next button, then Finish button to export the certificate to the file.
- Open the Microsoft Management Console (MMC.exe).
- Add the certificates snap-in for the computer account and local machine.
- Import the certificate into the Trusted Root Certificate Authorities node.
- Import the certificate into the SharePoint node.
In the preceding steps, we have created a new
certificate and allowed the local server to trust the certificate by
adding it to the Trusted Root Certificate Authorities store. This
avoids annoying messages in Internet Explorer about untrusted
certificates. Even though we trust the certificate, we have to inform
SharePoint it may trust the certificate also, via the steps that follow:
Note Never use self-signed certificates in production or non-development environments.
- Open Central Administration.
- Click the Security header.
- Click the link to manage trust.
- Click the new icon from the ribbon.
- Provide a friendly name and browse for the certificate (CER) file in the dialog shown in Figure 5.
- Click OK.
Now, we need to associate our new self-signed certificate with our web application in IIS, as follows:
- Return to IIS Management.
- Click the SharePoint application in the left navigation, under Sites.
- Click the Bindings link (on the far right).
- Click the Add button.
- Choose HTTPS, and select the certificate to use (Figure 6).
- Click OK to complete the binding configuration.
Lastly, with the new SSL domain binding in
place, we must create a new Alternate Access Mapping for the
application so SharePoint understands requests coming in on the new SSL
URL:
- Open Central Administration.
- Click the Application Management heading.
- Click the link to configure alternate access mappings.
- Click the button to edit public URLs.
- Change the Alternate Access Mapping Collection for the correct web application.
- Choose an empty zone and add the HTTPS URL (this should be the full
domain name that is listed for the self-signed certificate in IIS)—see Figure 7.
- You can now access your web application on the new HTTPS/SSL URL.
Note If
you access your SharePoint Web Application from another machine, the
certificate is untrusted, unless you repeat the preceding steps 12 to
14 for the machine you are using.