In this post, we will install a User Certificate, enable Named Mapping and test FTPS using a tool.
Install User Certificate:
- Open Internet Explorer, and open the website https://server1/certsrv
- Click Request a Certificate
- Click User Certificate
- Click Yes on Web Access Confirmation (if it prompts)
- Click Submit
- Click Install this certificate
- You will get a confirmation that a user Certificate has been installed
Confirm Client Certificate has been installed:
- Open Internet Explorer
- Click Tools -> Internet Options
- Click Content and click Certificates
- You will find a certificate with the User Name in the Personal tab
- You can also confirm the same from Certificate MMC
- Export Client Certificate, by clicking on certificate and click Export…
- Follow Certificate Export Wizard
- Select No, do not export the private key, click Next
- Select Base-64 encoded X.509 (.CER)
- Browse to location where you want to save the certificate, click Save
- Click Next, click Finish
Map user certificate against the user account:
Export user certificate:
- Go to the CA Server (in our case it’s the DC)
- Open Server Manager -> expand Roles -> expand Active Directory Certificate Services -> expand CA (contoso-Issuing-CA01)
- Click on Issued Certificates, on the right hand pane you will see the client certificate issued
- Right click on the certificate -> click Open
- Click Details -> click Copy to File…
- The Certificate Export Wizard appears, click Next
- Select Base-64 encoded X.509 (.CER), click Next
- Select the location for the certificate and name it (bmayer.cer in our case).
- Click Next -> click Finish the Export Wizard.
Map the certificate:
- Go to the DC Server
- Open Server Manager -> expand Roles -> expand Active Directory Domain Services -> expand Active Directory Users and Computers -> expand domain (contoso.com)
- I have a OU for the user accounts “People”
- To view the Advanced Feature, click View -> Advanced Features
- Right click on user name (in our case Barbara Mayer) and click Name Mappings…
- Security Identity Mapping dialog appears
- Under X.509 Certificates, click Add…
- Browse to the location you have saved the user certificate, click Open
- Click OK
- Click OK
We now have a client certificate mapped against the user account.
Access FTPS site:
We will use AlexFTPS-1.0.2 (http://ftps.codeplex.com) client to verify our setup. I have it under C: drive. I have a DNS entry for ftp.contoso.com against the IP of Server2.
The command we will use is:
ftps -h ftp.contoso.com -port 21 -ssl All -sslClientCertPath C:\Users\bmayer\Documents\bmayer.cer –l
Here is the actual connection:
C:\AlexFTPS-1.0.2>ftps -h ftp.contoso.com -port 21 -ssl All -sslClientCertPath C:\Users\bmayer\Documents\bmayer.cer -lAlex FTPS version 1.0.2Copyright (C) Alessandro Pilotti 2008-2009http://www.codeplex.com/ftpsinfo@pilotti.itThis is free software, you may use it under the terms ofthe LGPL licenseWARNING: SSL/TLS remote certificate name mismatchSSL/TLS Server certificate details:[Subject]CN=newftpsite, OU=FTP Unit, O=contoso, L=Bangalore, S=Karnataka, C=IN[Issuer]CN=contoso-Issuing-CA01, DC=contoso, DC=com[Serial Number]619877AD000000000015[Not Before]27-10-2009 08:22:31[Not After]27-10-2011 08:22:31[Thumbprint]FE3ABE6A25AB447972B769A0C084B92D8DE098F2Accept invalid server certificate? (Y/N) YRemote directory: /10-27-09 10:40AM <dir> myFolder10-27-09 10:42AM 1944 sample.txt10-27-09 10:42AM 8748 sample1.txt10-27-09 10:42AM 518454 snap.bmp
Looking good.
We have successfully configured FTPS in IIS 7 & IIS 7.5 using Active Directory enabled One-to-One Client Certificate mapping.
Hope this helps,
Vivek Kumbhar
Quote of the day:
I shot an arrow into the air, and it stuck. - Graffito