One of the things which I found missing in the IIS 7.0 user interface was the UI which lets you configure the Client certificate mappings for IIS. In the present world, if you want to configure the client certificate mappings for a web site, you will have to use the configuration editor and specify the certificate blob and configure the client certificate as per this blog. At times, getting the certificate blog in a single line itself can get tricky and it might help to just have a UI which IIS 6.0 for this configuration.
Though the client certificate mapping UI feature was not present in IIS 7.0, the IIS 7.0 UI extensibility is so powerful that it is easy to write something like that. I went through some of the blogs that had samples for UI Extensibility and was able to create a sample UI module that adds this functionality in the UI.
Once you install the MSI (for right CPU), you will be able to see this UI module in the IIS manager. This is how it shows up in the UI.
I tried ensuring that the UI for client certificate configuration looks exactly the same as configuration interface in IIS 6.0 so if you are already familiar with configuring the client certificate mappings in IIS 6.0, you should be able to directly use this and configure the client certificate mappings quickly.
Find the zip file attached below to this blog and run the right version (x86 or x64) on your server to install this module.
What does the installer do?
- The installer copies a file ClientCertificateMapping.dll to inetsrv\ClientcertificateMapping folder on your IIS server.
- It registers the ClientCertificateMapping.dll in the GAC on the server.
- It modifies the application host.config and adds the two statements in there.
Under the <moduleProviders> section
<add name="ClientCertificateMapping" type="ClientCertificateMapping.ClientCertificateMappingModuleProvider, ClientCertificateMapping, Version=220.127.116.11, Culture=neutral, PublicKeyToken=44f73143bf16e268" />
And under the <modules>section
<add name="ClientCertificateMapping" />
Note: This tool will just let you configure the client certificate mappings. To make sure that the client certificate mappings works as expected, you might have to review the other settings that are are mentioned in the following links.
Some of the limitations of this UI module (as I see today)
- I just managed to write the functionality for one-one client certificate mapping. To be very frank, I have never seen many people using the one-to-many mapping feature anyways. But based on the user-feedback, I may spend some time writing up the UI for many-to-one mapping as well.
- I wasn't able to do too much testing around this functionality. If you come across any issues, do let me know via this blog entry
- There is no BROWSE button when you click the Add Mapping button. I researched a little bit and came to know that generating a object browser dialog box and using the IDsObjectPicker interface in .net requires too much of code. I found some very good sample at codeplex but realized that it is too much of code and it requires a lot of Interop and Pinvoke code. For the time being, I have not used this functionality and let the user explicitly type in the user name but if this turns out to be a requirement, I can easily add it later.
- Any other issues you facing using this, please let me know 🙂
In the end, I just wanted to share some of the great resources that I came across while writing this module (and creating an installer for the same)
These links are specifically for creating the installer for this UI module