mkdocs-encryptcontent-plugin
This plugin allows you to have password protected articles and pages in MKdocs.
The content is encrypted with AES-256 in Python using PyCryptodome and decrypted in the browser with Crypto-JS or Webcrypto.
It has been tested in Python Python 3.8+
Usecase
New features (compared to version 2.5.x)
- Stronger cryptography (PBKDF2 for key derivation)
- Faster cryptography (Webcrypto as alternative to crypto-js)
- Allow password inventory or levels in mkdocs.yml or external file for credential handling
- Allow user name + password as credentials
- If credential is reused in different levels it also decrypts all of their content
- Optional adding of credentials to URLs for sharing
- Optional tamper check by signing generated files with Ed25519
- New Documentation and Test bench
Upgrading from version 2.5.x
The use_secret
functionality was discontinued in the plugin configuration and as a meta tag.
In order to use environment variables in user names or passwords, use the
special yaml tag !ENV
.
Todos for 3.1.x
- outsource some functionality to separate plugins, like:
- Filename obfuscation
- Signing of generated files
- find a better way for search decryption
- add better alternative to PBKDF2
- optional server side keystore (allows throtteling)
- still no waterproof solution...
- ...to be defined