TIP EncryptPlugin is not installed on Foswiki.org.

Empty Plugin

Encrypt Plugin stores passwords in topics "for your eyes only"

Encrypts text in a macro, while being saved. The Text will automatically be decrypted and displayed, if the page is opened by a user or a member of a group, that is declared as permitted to view.

Sometimes, you want to put passwords, keyphrases or other secrets into your topic, that only a limited group of persons may see.
That's a little uncomfortable with pure FosWiki tools, so i decided to build this plugin, to make that easier.

To place a secret in a Topic, do this:

My Password: %ENCRYPTSECRET{
        allowview="SomeUser SomeGroup AnotherUser AnotherGroup"
        allowchange="SomeUser SomeGroup AnotherUser AnotherGroup"
        secret="put your password here"
        }%
  • this may be stored in a single line
  • strictly use double-quotes

Users, that have no permission to change a secret will not see the "secret" property in an editor. Instead, they will see two other properties "terces" and "hash". Tampering with any of the four properties will be detected and cause denial of saving a topic.

Installation

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

After Installation

For safer encryption and to avoid, that an encrypted secret will be hacked on a different FosWiki Installation, a site-specific "Salt" should be used.
This Site-Salt is stored in <FosWiki-Home>/working/work_areas/EncryptPlugin/SiteSalt.txt You should only create that file once. Because changing that file at some later time will destroy all secrets, that are already stored in the topics! You may, of course, edit that file, as long, as there are no secrets stored yet. If you migrate your FosWiki Installation, make sure, this file will be copied to the new server too, to keep the stored secrets decryptable.

You may, if you have admin access to the server, create that file manually.

If not, you can create it, by editing System.WebHome and place one Macro there, looking like this:
%ENCRYPTSECRET{storesalt="put your salt here"}%
Save that topic and the Secret will be stored in the mentioned file. You can do that only once! Every other attempt of storing a new Site-Salt will be denied. The file has to be deleted manually, if you really want to store a new Site-Salt.
After the Salt is stored, you may remove that Macro again - it's no longer needed.

If you want to create that file manually, go to <Home of FosWiki Installation>/working/work_area/EncryptPlugin and create a file named "SiteSalt.txt" there.
Put one line there, that looks like this:
        Salt = "put your salt here"
Remember, this is used to make a stronger encryption, so use a long, good and strong password.

Also, store your chosen Salt in a safe place, because if you loose that Salt, all the secrets in any of your topics are definintely lost!

Here are some examples for a reasonable Site-Salt (they are created from a random generator, every time, you reload this page): %ENCRYPTSECRET{createsalt="64x16"}%

Dependencies

NameVersionDescription
MIME::Base64>=3.11Required Encoding and decoding of base64 strings
Digest::MD5>=2.55Required Perl interface to the MD5 Algorithm
Time::HiRes>0Required High resolution gettimeofday

Change History

   

PackageForm edit

Author %$CREATED_AUTHOR%
Version 1.00
Release 10 Jul 2019
Description Encrypt Plugin stores passwords in topics "for your eyes only"
Copyright © 2019 Michael Buchholz, Foswiki Contributors
License GPL (GNU General Public License)
Home https://foswiki.org/Extensions/EncryptPlugin
Support https://foswiki.org/Support/EncryptPlugin
Repository https://github.com/foswiki/distro
ExtensionType PluginPackage
DemoUrl http://
SupportUrl EncryptPlugin
I Attachment Action Size Date Who Comment
EncryptPlugin.md5md5 EncryptPlugin.md5 manage 162 bytes 11 Jul 2019 - 14:14 MichaelBuchholz  
EncryptPlugin.sha1sha1 EncryptPlugin.sha1 manage 186 bytes 11 Jul 2019 - 14:15 MichaelBuchholz  
EncryptPlugin.tgztgz EncryptPlugin.tgz manage 19 K 11 Jul 2019 - 14:14 MichaelBuchholz  
EncryptPlugin.zipzip EncryptPlugin.zip manage 22 K 11 Jul 2019 - 14:13 MichaelBuchholz  
EncryptPlugin_installerEXT EncryptPlugin_installer manage 4 K 11 Jul 2019 - 14:14 MichaelBuchholz  
Topic revision: r1 - 11 Jul 2019, MichaelBuchholz
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy