These steps require MindTouch Deki Wiki 8.05.1 or later and adminstrator access to your wiki.
Deki Wik can be can be configured to digitally sign outgoing requests to extensions. The signature encompasses the body of the request, the implicit environment headers, and the date. The recipient of the request can then verify the signature and guarantee that none of the data was modified in transit. Also, by signing the date, the recipient can ensure that the request is recent.
Enabling Deki Wiki to digitally sign requests only takes a few steps: first, you must generate the keys to digitally sign the requests; second, you must configure Deki Wiki with the private key. That's it!
Deki Wiki ships with a tool called mindtouch.deki.keygen to generate signing keys. The tools is located in the tools folder of your installation.
Open a command prompt in the tools folder and execute mindtouch.deki.keygen:
mindtouch.deki.keygen
The tool will generate a fresh pair of keys with each invocation, like this:
MindTouch Deki Wiki KeyGen, Copyright (c) 2008 MindTouch, Inc. Digital Signature Keys ---------------------- Private: BwIAAAAiAABEU1MyAAQAAL2tVq6st4vDcVydr6TwOwwJPvaIHxhmaHQAs1RcjEhswo4klHtQ9eUhTeup58jd6HV/jS8nj2AM7NAmhZEpuBcnnxHkoaq9AkJgko4/5ef8+uiMVA080sNiokR0UyB9C3yZZmVqcNYAsQucqlhJE6QxjK6ukR4N/Ab9FHcAcfqZ2wBZCRefYHig+ZOvwUA3eyfPn6FzGOL43oNo/F9mGxWSfab9R5/7jzOYGZXm7TBBVcn1qGdZ1tq2Rnt86Z+2sRGNrzgFRXVngKJcZlsvTZKv7AW1JlgJyY0giT9xi7kLPkp0FrXfvdfPt3aRmCxhLWTjmdYBxUY25q+RuzX+k9mDHPHIO7w5mniYoXB4bxd0OrhSR7iWCoojE3mzHuoXBe/XczDqwU2CCwAAADzbDb70xdthG2BplBqax1fUcMtz Public : BgIAAAAiAABEU1MxAAQAAL2tVq6st4vDcVydr6TwOwwJPvaIHxhmaHQAs1RcjEhswo4klHtQ9eUhTeup58jd6HV/jS8nj2AM7NAmhZEpuBcnnxHkoaq9AkJgko4/5ef8+uiMVA080sNiokR0UyB9C3yZZmVqcNYAsQucqlhJE6QxjK6ukR4N/Ab9FHcAcfqZ2wBZCRefYHig+ZOvwUA3eyfPn6FzGOL43oNo/F9mGxWSfab9R5/7jzOYGZXm7TBBVcn1qGdZ1tq2Rnt86Z+2sRGNrzgFRXVngKJcZlsvTZKv7AW1JlgJyY0giT9xi7kLPkp0FrXfvdfPt3aRmCxhLWTjmdYBxUY25q+RuzX+k9mDHPHIO7w5mniYoXB4bxd0OrhSR2YOlYKRR1DrCvOTHGu4BFtjuC/3YL0nvZu6OjYkCEYCoivMr3heW3ab+CPR99MWlxNV5RooLJAyAHKOC29YlwUzZtazLzE3Mumk2UfHPIYIW+Kse3nFK9/o7e5YDbTBSkZ4ReLpgvDx6syvnhxuQyRaV4GsW7J9xtMdeBdrGI4LCwAAADzbDb70xdthG2BplBqax1fUcMt
Keep a copy of both keys in a secure location. These keys are unique and can never be generated again!
You may share the public key, but do NOT share the private key. If the private key is compromised, rerun the keygen tool to create a new set of keys.
Copy the private key (first line) from the keyken tool.
Log into Deki Wiki with your Administrator's password. Go to the Control Panel and click on Configuration.
Under Add or modify key enter the following text for config key and value (note: value is truncated for readability; you must copy the entire private key!).
| security/digital-signature | BwIAAAAiAABEU1MyAAQAAL....zbDb70xdthG2BplBqax1fUcMtz |
Deki Wiki is now configured to digitally sign outgoing request to extensions. Note that this will create additional overhead for the application.
(Note: the steps described here apply to XML and .Net extensions; extensions written in PHP or other language may require different steps or not support signature validation altogether)
Now that Deki Wiki is configured to digitally sign requests to extensions, we need to setup our extension to validate the signature. To do so, copy the public key and add it to your extension's configuration file (note: value is truncated for readability; you must copy the entire public key!).
| dekiwiki-signature | BgIAAAAiAABEU1MxAAQAAL....AADzbDb70xdthG2BplBqax1fUcMt |
Once an extension is configured with the public key, it will require all requests to have a valid signature. If the signature is not valid, missing, or the date of the requests is not within a +/-1 minute margin, the extension will reject the request.
Deki Wiki follows these steps when digitally signing a request: