Blog: Principles of Web Security
Principles of Web Security
September 25, 2013
We’ve been doing a lot of work recently building a best practice guide on security and wanted to be able to send our clients a simple list of principles that are written in plain language.
- There is Safety in the Herd: Leverage large, well maintained open source libraries (packages) with a critical mass of users and developers. Use compiled packages and check data integrity of downloaded code. Start with OpenBSD, Debian/Ubuntu or RedHat/CentOS WITHOUT cPanel.
- Order Matters: Don’t open up services to the Internet before your server is properly secured.
- Limit Exposure: Only install and maintain what is necessary. Reduce the amount of code installed. Review server configuration regularly to see if it can be streamlined.
- Deny Access by Default: Only allow access where it is needed, and make all access policies deny by default.
- Use Well Known Security Tools: There are several well supported libraries that limit exposure, and check for intrusion. Use them on your webserver.
- Avoid Writing Custom Code: Even large government departments don’t invest properly in regular, ongoing code reviews. Minimize the use of any custom code.
- Contribute Back: No software is ever perfect. There is always room for improvement. Make the code you use better and then give your changes back to the community. An added bonus is that if you do it properly you will get free peer review and maintenance support.
- Limit Access: There need to be clear, documented roles of who has access to what. Only use root access when required. Isolate distinct roles where possible. Everyone with access needs their own account, shared accounts are insecure.
- Make Your Application Happy: When running smoothly your server should not be generating errors. Monitor your server then investigate and resolve errors.
- Document Everything: Make sure you have an overview of any customizations which may have been done or any additional software that may have been added.
- Limit Use of Passwords: Have sane organizational policies on password requirements and use passwordless approaches which are less susceptible to brute force attacks.
- Don’t Trust Your Backup: Define, review procedures and do test that you can restore your site regularly.
- Obscurity isn’t Security: With Drupal we recommend actually leaving the CHANGELOG.txt file visible so that it’s obvious that you are up-to-date. For any software you use, know how to watch for security updates so you can apply them in a timely manner.
- Security is Big: It is a mistake to assume that one person can do it well in isolation. Having access to a team (even outside of the organization) will help.
- Remember, You’re Still Not Safe: Have an audit trail. If your site is compromised, take the time to find out how. Use proper version control for all code and configuration.
- Not Just for Techs: Upper management needs to take the time to understand these general principles of IT security as they have profound implications to the work of the whole organization.
About The Author
Mike Gifford is the founder of OpenConcept Consulting Inc, which he started in 1999. Since then, he has been particularly active in developing and extending open source content management systems to allow people to get closer to their content. Before starting OpenConcept, Mike had worked for a number of national NGOs including Oxfam Canada and Friends of the Earth.