|
SSL Client Certificate / SmartCard Authentication
This modification is in the archives.
Description:
This modification allows you to process authentication on your vBulletin based upon supplied Client SSL Authentication Certificates or SmartCard based certificates. All the user have to do is click on the "log in" button on the Username/Password box without entering anything and vBulletin will automatically login with the SmartCard or Client SSL Certificate credentials. This mod is in its inception stages, and improvements and feedback are welcomed. Security checks are also much appreciated. This is at a proof of concept stage, and hopefully I will add the ability to change or detect the fields needed. Features:
Extra Requirements:
NOTE: This modification does not work on installations using Microsoft IIS, yet. The parameter calls and the DN formatting is different from Apache. TO DO:
Installation: 1.) You must have installed Apache with mod_ssl enabled. Please search the Apache.org pages or Google how to enable SSL. 2.) Once mod_ssl is enabled, you must now enable Apache to accept client certificates. You may want to consult this page while following the instructions written on this post: http://httpd.apache.org/docs/2.0/mod/mod_ssl.html 3.) Go to either httpd.conf OR the Virtual Host line (EX:<VirtualHost 1.2.3.4:80> ) where vBulletin is installed and add the following line: Code:
SSLCACertificateFile /filename/and/path/to/trusted/Issuing/Certificate/Authority/certificate.pem WARNING: The setting presented here will NOT check for Certificate Revocation, meaning if a certificate is revoked, Apache will still happily accept the certificate as valid. If you wish to enable revocation checking, please add the SSLCARevocationPath directive after the SSLCACertificateFile directive. 4.) Then at the .htaccess file (or the whole at the Virtual Host if you want the whole site) add the following: Code:
SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +FakeBasicAuth +StrictRequire +StdEnvVars 5.) Create two new user profile fields one named "SmartCard Certificate DN" and another named "Enable SmartCard Authentication?" For the "SmartCard Certificate DN", it is a "single-line text box" field with the following options:
Then for the "Enable SmartCard Authentication?" it is a "Single Selection Radio Buttons" field type, with the following options:
6.) After you have created those two profile fields, make note of "Name" of the field, whether it is "field5" or "field10" or whatever the field name is, you will need to modify the code. 7.) Install the product package. 8.) Go to the "Plugin Manager" and edit the plugin with the "SmartCard Login after Interactive Login Failure" in the title. 9.) Find this line: Code:
$userArray = $vbulletin->db->query_first("SELECT `userid` FROM `" . TABLE_PREFIX . "userfield` WHERE `field5` = '" . $_SERVER["SSL_CLIENT_S_DN"] . "' AND `field6` = 'Yes'");
10.) Save the file and edit the appropriate user's profile with the appropriate Certificate Subject Distinguished Name information and login should work. That's it. I hope this mod is useful and suggestions welcomed. Download
This modification is archived, downloads are still allowed. |
|||||||||
Similar Mods
| PM Security Certificate | vBulletin 3.6 Template Modifications |
| Mini Mods PM security certificate (edited mod) | vBulletin 3.6 Template Modifications |