Browse DevX
Sign up for e-mail newsletters from DevX


Build Robust Security into a Rails-Based Wiki System

Learn how to add robust security features to a simple wiki system built on the Rails platform.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

ne of the core advantages of wiki systems is the ability to edit web pages stored on a server through a web browser. However, this function also allows administrators to look at the contents of your wiki pages, particularly if your wiki uses a shared server. If you store confidential information on that server, this is an especially undesirable compromise. A simple solution to this dilemma is to store the web pages in an encrypted form and use authentication to access them in a readable form.

Building on the wiki file-management system created in a previous DevX article ("Build a Wiki System with Rails"), this article demonstrates how to add authentication and encryption security features to the system (see Sidebar 1 for an overview of these security concepts). This simple system, called RailsWiki, offers basic web page management features such as view, edit, print, and so on (Figure 1 presents its basic design).

Click to enlarge

Figure 1. RailsWiki Design

The company I founded recently has been using this very application for a couple of months now to manage a dozen or so encrypted wiki pages. So this system has practical, real world applications.

What You Need
Since this article is a direct continuation of the previous article, primarily pointing out changes to the RailsWiki code, I strongly recommend reading the previous article first.
  • Ruby interpreter
  • RubyGems packaging system
  • The RailsWiki with security features source code
  • Gems:

  • Thanks for your registration, follow us on our social networks to keep up-to-date