Securing Drupal for authenticated users
The default installation of Drupal transmits username/passsword in cleartext. I would like to secure my Drupal installation with the following goals in mind:
- Anonymous users should be able to access the entire web-site over http (non-secure)
- Authenticated users should be provided access only over secure https
I have read several posts on this topic but non of those provide a complete solution all on one page. So, I have come up with 4 step approach to acheive this. I am relatively new to drupal so please correct me if I have missed anything in this setup. Step 1 Set the following parameter in your apache configuration (.htaccess file or httpd.conf) file:# Allow cookie session over secure channel onlyThis will instruct php to handle session cookies over secure (https) channel only. When users connect via the regular http URL, they will always be "anonymous," even if they have a valid session on the https site [1]. Step 2 Specify https protocol in your drupal/sites/default/settings.php file:
php_value session.cookie_secure 1# All absolute URLs emitted by drupal will contain httpsYour web-site will be accessible over both http and https as long as the apache configuration files are setup to map both the protocols to the same drupal installation. Most of the pages generated by drupal do not contain absolute URLs. The URLs generated for the various nodes within the web-site are of the form /node/123. As a result, a regular user visiting http://example.com will be able to navigate through the entire web-site even though the base_url points to https. Or users can directly access https://example.com for secure access.read more
$base_url = 'https://example.com'; // NO trailing slash!
- autentifică-te sau înregistrează-te pentru a adăuga comentarii






very interested
hello, I'm really surprised that drupal does not include built-in ssl support
it seems that the version 7 will do that (according the "state of drupal august 2008")
so I appreciate very much this post (and this site, because cares about important topics)
however, this post refers to drupal 4.7, could someone tell me whether it is still considered a secure/good solution for drupal 6?
does anyone know other links/posts about this topic?
I will be very happy for any help about that, and most of all I will be happy if we could start a discussion about security management in drupal 6
thank you very much,
ganymede