Certificate Authentication
If you want to bring users into a network over the Internet, but you are concerned that sending usernames and passwords in that public way might compromise them, then you can replace them with a digital certificate. A digital certificate (or just "certificate") is issued by a certification authority (CA), who digitally signs it and says that the bearer is who he or she claims to be, or that an object and sender are as represented. There are both private and public CAs. An organization can be its own private CA and issue certificates to its employees, vendors, and/or customers, so that those people can be authenticated when they try to enter the organization's network. Also, a well-trusted public CA, such as VeriSign (http://www.verisign.com/), can issue a certificate to a person, object, organization, or web site. A person or organization receiving the certificate, if they trust the CA, can be reasonably certain that the presenter is as represented. Besides a certificate, most CAs provide the bearer with an encryption key in the certificate, so that secure data transmissions can occur.
To set up certificate authentication, these steps must take place:
- The user must obtain a certificate.
- A user account must be established for the user.
- The certification authority must be listed in the Certificate Trust List.
- The certificate must be mapped to the user account.
Set Up Active Directory Certificate Services The user can obtain a certificate in several ways, one of which is through a Windows Server 2008 domain controller with Active Directory Certificate Services (AD CS) installed. AD CS is a role that must be installed in Server Manager. Here are the steps to do that:
- Click Start | Server Manager and click Roles in the left pane. Click Add Roles to open the Add Roles Wizard dialog box. Click Next.
- Click Active Directory Certificate Services if it isn't already checked (if it is, AD CS is already installed on this computer and you can jump to the next section). Click Next.
- Read the notes and any of the Help articles you wish. Note that if you install AD CS, you will not be able to rename the computer, and then click Next.
- Select the role services you want to use with AD CS:
- Certification Authority: to issue and manage certificates and is required in all instances
- Certification Authority Web Enrollment: to provide a web interface to request and renew certificates
- Online Responder: to provide certificate information available in complex networks
- Network Device Enrollment: Service to issue and manage certificates to routers and other devices without network accounts
- Click Next and select the type of certificate authority (CA) to be installed from the following choices:
- Enterprise: If this server is part of a domain, it can use Directory Service to issue and manage certificates.
- Standalone If this server cannot use Directory Service to issue and manage certificates, it can still be part of a domain.
- Click Next and select the level of CA for this server:
- Root CA: if this is the first or only CA and will issue its own certificates
- Subordinate CA: if this CA will get its certificates from a higher CA
- Click Next and select whether you want to create a new private key or use an existing one.
- Click Next and select the Cryptographic Service Provider (CSP) that you want to use to generate the private key, the hash algorithm and the key length. Under most circumstances, except if you are using smart cards, you want to leave the defaults. If you are using smart cards, you may need to select a CSP that is used by the smart card.
- Click Next, accept the default or enter a name and a suffix for the CA, and click Next again. Select the validity period for certificates generated by this CA.
- Click Next. You are shown where the certificate database and log will be stored. Once more click Next. If IIS is running, click Yes to temporarily stop Internet Information Services (IIS). If the IIS role is not installed, you can choose which role services you want installed.
- Review the selections you have made. If you want to make changes, click Previous. When you are ready, click Install. The role(s) and role services will be installed.
- Click Close when you are told that you have successfully completed installation. Close Server Manager. Restart the computer (even if you are not prompted).
Once you have installed the certification authority, you can review it with these steps:
- Click Start | Administrative Tools | Certification Authority. In the left pane, open the new CA you just created and click Issued Certificates. You should see one or more certificates, like this (if you don't see any certificates and you restarted the computer, click Refresh in the Action menu).
- Double-click one of the certificates to open it, click the Details tab, and click the various fields to see the details within the open certificate. Click OK when you are done looking at the certificate.
- Back in the Certification Authority window, click Certificate Templates in the left pane. On the right, you can see the types of certificates that are available and their intended purpose.
- Double-click one of the templates to open its Properties dialog box. When you are finished looking at the properties, close the dialog box and the Certification Authority window.
Request a Certificate: With AD CS installed, users, computers, and other services can request certificates to identify themselves. Normally, certificates are automatically given to computers and users who are known and trusted entities on the network. The certificate that was automatically created when AD CS was installed was issued to the server on which AD CS resides. It is also possible to explicitly request a certificate over either an intranet or the Internet, or on the server with AD CS.
Request a Certificate over a Web Connection: Over the Internet or an intranet is the most common way that users request a certificate for their use. In doing this, the user accesses a web page that is created and maintained by AD CS. Use these steps to request a certificate over an intranet or the Internet:
- Open your browser and enter the URL or address of the server with AD CS. The address should look something like http://servername/certsrv/. The page should appear.
- Click Request A Certificate and click User Certificate. If you want the user to have a smart card, click More Options, where you can select a Cryptographic Service Provider (CSP) and the request format.
- Click Submit. You are told that the web site is requesting a new certificate for you and asking if you want to go ahead. Click Yes. If the user and/or computer are already known to the server, a certificate will be issued. Otherwise, you will be told that the request is pending.
- When you see Certificate Issued, click Install This Certificate. You are told that the web site is adding a certificate to the computer and asked if you are sure you want to do that. Click Yes, given that is what you want to do. You are told that the certificate is installed and you can close your browser.
Directly Request a Certificate Directly requesting a certificate from AD CS is most commonly done for documents or other objects, or for services. It requires the Certificate console in the Microsoft Management Console (MMC). Here is how to set up the Certificate console (assuming that it hasn't been done before) and to request a certificate from it:
- Click Start | Run, type mmc, and click OK. The MMC shell opens.
- Click the File menu and click Add/Remove Snap-in. In the Add Or Remove
Snap-ins dialog box, click Certificates, click Add, click My User Account for
where you want to manage certificates, and click Finish.
NOTE: If you choose to manage certificates for My User Account, the snap-in you create will create certificates only for you. If you choose to manage certificates for Service Account or Computer Account, you must pick a service or computer to manage, such as the web server or the local computer, and you will be able to issue certificates for the service or computer. - Click OK to complete the Add/Remove Snap-in process. In the console on the left, open Certificates - Current User | Personal | Certificates.
- Click the Action menu and click All Tasks | Request New Certificate With New Key. The Certificate Enrollment wizard opens.
- Click Next, choose a certificate type to support the purpose of the certificate you want to issue (select Administrator for at least one certificate), and click Enroll again.
- When you are told the certificate has been enrolled, click Finish. A new certificate will be issued.
- Close the Certificates console, click Yes to save the settings for this new console in a file named Certificates.msc, click Save, and finally close the MMC.
List Certificate Authorities To accept certificates that are presented to the network, the CA must be known to the network. This is accomplished by being listed as a trusted CA in the Certificate Trust List (CTL), which is maintained as part of the group policy.
The following steps show you how to open the group policy, create a CTL, and make an entry into it (these steps assume that you want to work with the CTL at the domain level, but you could also do it at the local computer level and at the OU level):
- Click Start | Server Manager and open Features | Group Policy Management | Forest | Domains | domain name | Group Policy Objects.
- Right-click Default Domain Policy and click Edit. The Group Policy Management Editor window opens.
- In the left pane, open Computer Configuration | Windows Settings | Security Settings | Public Key Policies, and click Enterprise Trust. Click the Action menu and click New | Certificate Trust List. The Certificate Trust List Wizard opens.
- Click Next. If you so choose, enter an identifying prefix for the CTL, enter the months and/or days that it is valid, select the purposes of the CTL, and click Next.
- In the Certificates In The CTL dialog box, click Add From Store. The Select Certificate dialog box opens, in which you can select those certificates whose issuers you want to include in the CTL. Early in the list, you will find the certificates that your new CA issued as you followed the steps earlier in this tutorial.
- Double-click one of the certificates you created. When it opens, you may find that it is not trusted, even though it was created on the same computer. You are told that it must be added to the CTL to be trusted.
- Select the certificates whose issuers you want on the CTL, holding down ctrl while selecting more than one certificate. Click OK. The new list of certificates will appear in the Certificate Trust List Wizard.
- Click Next. You must attach a certificate, probably your own, for the purpose of
a digital signature for the CTL, and the encryption key used with the signature
certificate will be used with the file that contains the CTL.
NOTE: The certificate that you select for the purpose of adding the digital signature to the CTL must be created for the current user with the Administrator template, similar to the Signature certificate you created previously in "Request a Certificate." - Click Select From Store, select the certificate you want to use, click OK, and then click Next. If you wish, you can add a timestamp; then click Next again.
- Enter a name that is easy to remember and a description for this CTL and click Next. Review the settings you have chosen and click Back if you need to correct something; when ready, click Finish. You will be told whether the CTL was successfully created.
- Click OK. The new CTL appears on the right of the Group Policy Management Editor window. Double-click it. The CTL opens, and in the Trust List tab, you see a list of the certificate authorities that you have added to your CTL.
- Click a CA. You can see some of the details behind a certificate and if you click View Certificate, you can see the entire certificate. Close the CTL and the Group Policy Management Editor.
Map Certificates to User Accounts: The core of Windows Server 2008's user-oriented security are user accounts with a username and password to log on, which are the basis for the permission system that controls access to computer and network resources. Someone who comes into Windows Server 2008 with a certificate but without a username and password for a user account and the permissions that go with it cannot log on. The solution is to map or relate a certificate to a user account, so that someone who presents an acceptable certificate will be attached to a user account and given the permissions he or she would acquire by logging on with a username and password. Windows Server 2008 does certificate mapping in two ways: through Active Directory Domain Services and through Internet Information Services (IIS). Also, mapping can be done from one certificate to one user account (one-to-one mapping) or from several certificates to one account (many-to-one mapping).
Certificate mapping through Active Directory Domain Services can be done with the following steps:
- Click Start | Administrative Tools | Active Directory Users And Computers.
- Click the View menu and click Advanced Features (if it is not already checked).
- In the left pane, open the domain with the user account to which you want to map, and then click Users.
- In the list of users on the right, select the user account to which a certificate will be mapped.
- Click the Action menu, click Name Mappings (if you don't see it, redo Step 2) to open the Security Identity Mapping dialog box, click the X.509 Certificates tab, and click Add to open the Add Certificate dialog box.
- Search for and identify, or type, the path and name of the certificate that you want to use, and then click Open. Often the certificates, which have the extension .cer, are in the C:\Windows\System32\Certsrv folder.
- If you don't find a CER file, you may need to export one from the MMC Certificates console. To do so, click Start | Run, type mmc, and press enter. Then click the File menu, click Open, select the Certificates.msc file, click Open, open Console Root | Certificates - Current User | Personal | Certificates, and select the certificate to use.
- Click the Action menu; click All Tasks | Export; click Next; click No, Do Not Export The Private Key; click Next; accept the default DER Encoded Binary format; click Next; enter a useful filename; browse to where you want it stored; click Next; click Finish; and click OK when told that the export was successful. Close the Certificates console.
- Double-click the certificate you will use, and it is displayed in a second Add Certificate dialog box.
- If you want one-to-one mapping, both Use Issuer For Alternate Security Identity and Use Subject For Alternate Security Identity should be checked (Use Issuer For Alternate Security Identity is always checked by default and is grayed in most instances, so you can't change it). If you want many-to-one mapping only, Use Issuer For Alternate Security Identity should be checked.
- Click OK. The certificate is displayed again in the Security Identity Mapping dialog box; click OK again. Close the Active Directory Users And Computers window.
Now, when a user presents this certificate, she or he will be mapped to the related user account and given the permissions that are associated with it.
In this tutorial:
- Windows Server 2008 Security
- Authenticate the User
- Network User Authentication
- Replacements for Passwords
- Certificate Authentication
- Control Access
- Groups
- Permissions
- Add New Permissions
- Share Permission
- Secure Stored Data
- Use File and Folder Encryption
- Drive Encryption with BitLocker
- Use a Computer with BitLocker
- Understand Private/Public Key Encryption
- Secure Data Transmission
- Implement Secure LAN Transmission