Drupal


Antonio
Lead Programmer

Must-have Security Modules for Drupal - Part 1

It's hard to tell how truly secure your website is. We personally consider Drupal to be very secure in comparisson to other Content Management Systems out there, and it can always be improved. I'm gonna go through a handful of modules that I always keep handy and often install. Know beforehand, some module settings or even modules might not be useful to specific projects, be discrete.

CAPTCHA (Module Page)

Most people already know what a captcha is, this is the primary CAPTCHA module for Drupal. It comes with an image challenge, which is the type of captcha you see all the time with swirling letters and such, and a math challenge, it asks you to solve a simple math problem like "2 + 4 = ___".

You can expand the module to use reCaptcha, I particularly think that the concept behind reCaptcha is pretty awesome.

reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. Check out our paper in Science about it (or read more below).

A strong captcha is good to keep your registration pages and/or anonymous comments relatively safe from spam bots. Spam bots are pretty contrived, they register and post everywhere possible on your page. The best approach to spam is to add different hurdles that would be relatively easy for a human to do but hard for an average spam bot to do, as opposed to the single undefeatable captcha that not even a human can read.

More spam prevention modules

  • Spam - numerous tools to auto-detect and deal with spam content
  • Antispam - similar to spam but using third party detection systems like Akismet
  • Mollom - Provides captchas and spam filtering.

Login Security (Module Page)

This concept of this module is pretty straight forward; stopping anyone from trying to guess a password, either manually or via brute force attack. The settings are very flexible, you can choose to block a user or block a host altogether. You can set it to e-mail you after x amount of failed login attempts. This will keep the guessers abay.

Secure Password Hashes (Module Page)

Passwords are stored in the form of an MD5 hash in Drupal and most CMS'. When a hacker gains access to your database through an exploit or mysql injection. 9 out of 10 times, hackers attempt to view the contents of your user table.

In order to stop them from breaking into user accounts, passwords are encrypted using one way encryption (MD5). This means that if your password is "cool" the md5 hash will look like this b1f4f9a523e36fd969f4573e25af4540. Since it's a one way encryption, you can't decrypt the hash. This stopped hackers only for a little bit of time, the reasoning is that if cool always makes the same hash, you can create hashes out of all possible word combinations and then by comparisson figure out what the hash is conceiling.

phpass uses much more secure encryption methods, besides using stronger encryption methods, it has the ability to randomly "salt" passwords during encrpytion to create a more unique value and making the hash much harder to figure out.

 

Are there any modules that you know or would like to know about? Share it in the comments!





Antonio
Lead Programmer

[Know a Module #2] Pathauto

Drupal core comes with the Path module included. Path provides readable URL's for your website, this helps your SEO, your image and how memorable a URL can be. This is an excerpt from Path's project page at Drupal.org:

For example, assume you want to post your resume for potential employers. Without the paths module enabled, the URL to view your resume would be something like yourdomain.com/node/view/26. Using this module, you could create a new URL to your resume such as yourdomain.com/my/resume or yourdomain.com/resume.html.

This module is extremely helpful for SEO, as it can include important keywords in the URL of your website. This is very important in order to place well in the search engine listings.

Let's say that you have a post "10 jquery slideshow plugins" and without path it would read yourdomain.com/node/154, nobody wants that, if you thought it didn't matter, now you know. If you're blogging, you want to include those important words in the URL, added to that, you want to include a reference to the date when your article was posted, for example: yourdomain.com/blog/02162010/10-jquery-slideshow-plugins. It can become very tricky to ensure that this pattern is always followed in sites where a lot of content is pushed in, specially by multiple users. Irregular patterns will produce irregular results, so the solution is simple, Pathauto.

Pathauto's nature is almost self-explanatory. You create URL patterns for each content type to ensure that the path for every post is nice and clean. A pattern uses replacement tokens (kindly provided by the token module). This means that when you are editing the pathauto pattern for your "article" content type, you can do articles/[mm][dd][yy]/[title-raw] and each time a post is created, it will fill in the blanks for you.

 





Antonio
Lead Programmer

[Know a Module #1] - Boost

If you are a blogger that is going for gold and you've gone the path of Drupal, you probably want to know how to deal with a "Digg Spike" which means that when your site hits the frontpage of digg.com, there is a huge traffic surge of about 10k hits in about an hour.

There's a pretty interesting tool to help deal with this problem, this tool is called "Static Caching" and it is pretty simple in concept, it takes the rendered output of a page that is dynamically generated and stores it as an HTML file, next time someone hits that page, Boost will check for a cache file and if it finds it, will serve it up and bypass the database completely.

This is useful, specially in Drupal because it can take at LEAST 90+ queries to generate a page. multiply by the amount of users at any given point and, if you're on a shared host that usually leads to a server meltdown:

Here's a rough example:
Your website requires 100 queries to fully load. If you get 5000 visitors in one hour that is a grand total of 500,000 QUERIES
That might give you an idea as to why sites implode and the server throws up all over the place sometimes, it's too busy serving to serve all the others. On top of all that you have the bootstrapping process for Drupal which is CPU and memory intensive (Running all the PHP scripts - 10mb~ of ram a strap)

You have learned from this experience and you install Boost. This module stores all rendered pages viewed by anonymous users as HTML files and uses a special .htaccess file to check for the cached file and serve it up without ever touching Drupal at ALL. This means 0 queries to the database and 0 php ran. You spend all the memory and CPU power serving up static pages which is DRAMATICALLY lower than bootstrapping Drupal, a serious improvement.

Give the Boost module a try, be nice to your server. Boost Module on Drupal.org




Syndicate content
Home
About
Work
Blog
Support
Client Area
Join The Team
Contact
11151 NW 35th Pl B
Coral Springs, Florida 33065
United States
Twitter
YouTube


Check out our blog with helpful articles on #Drupal and Web Development trends! http://bit.ly/dBBpTU subscribe <3
Copyright © Bsidestudios.com - Fort Lauderdale Website Design
Olark Livehelp