See ContributedFilters

Overview#

This filter automatically encrypts the page content before it is stored by the PageProvider. This filter uses the inbuilt JSPWiki CryptographyFramework to get a CryptoProvider, and uses that provider to encrypt and decrypt page content.

Written by David Vittor
Date 23-Sep-2014
Version 0.1
Wiki Versions 2.10.2+
Demo N/A
Details
Issues https://issues.apache.org/jira/browse/JSPWIKI
Filter Core JSPWiki Filter
Dependencies CryptoProvider as configured in CryptographyFramework

Usage#

This describes how to set up Page Encryption.
One of the best ways to use this plugin is to configure pagename.prefix to "password,secure", and then all information on pages starting with password/secure will be encrypted.
Once you set this up you will no longer be able to read your content from the page provider!
You need to ensure your jspwiki-crypto.properties file configurations do not change or get lost!

Create a file called jspwiki-crypto.properties at a special location, and place in it the following values:

  crypto.salt=<secret random string>
  crypto.key=<secret random string>
  crypto.prefix=<secret random string>
  crypto.suffix=<secret random string>
If on linux, change the permissions for this file to:
  chmod 440 jspwiki-crypto.properties
Configure your jspwiki-custom.properties to add the following values:
  jspwiki.cryptoProvider = org.apache.wiki.crypto.PBECryptoProvider
  jspwiki.cryptoFile = /usr/local/etc/jspwiki-crypto.properties # Change the path to where your file is

Restart your JSPWiki, and every page that you save from now on will now be stored as encrypted content.

Parameters#

Param Description Default

Properties#

Property Description Default
crypto.key The password that will do the encryption and decryption of content. Required
crypto.prefix A string used to validate decryption. Minimum length is 10 characters. A random string
crypto.suffix A string used to signify encryption. Minimum length is 10 characters. A random string
pagename.prefix Only page names starting with this string will be encrypted. Comma separated case-insensitive values A empty string - i.e. all pages
pagename.suffix Only page names ending with this string will be encrypted. Comma separated case-insensitive values A empty string - i.e. all pages

Release History#

v0.1
  • initial Release