Tree @master (Download .tar.gz)
CombinedFS
CombinedFS stands for Completely Over-engineered, Melted Brain-Induced, Not Even Decent Fucking Solution. Well, no, it doesn't, but I like far-fetched acronyms.
CombinedFS is a FUSE FileSystem that exposes a transformed, straightforward, read-only version of Let's Encrypt / Certbot's "live" directory for better integration with software that requires "combined" PEM files.
Features
- Dynamically concatenate and expose adequate PEM files;
- include PEM files from outside the Certbot directory, e.g. Diffie-Hellman parameters;
- hide symlinks, resulting in a single directory to expose to your TLS frontend;
- filter exposed certificates (whitelist / blacklist) using a regular expression;
- expose either a Certbot-like tree (e.g. my.domain.tld/combined.pem), suitable for those who just need filtering or concatenation...
- or a flattened directory (e.g. my.domain.tld_cert.pem), suitable for software that loads all PEM files in a given directory;
- specify Unix permissions: uid, gid, mode, either globally or on a per-file basis (not a per-cert basis though).
Implementation
- Python with fusepy
- YAML/JSON configuration file
How to use it
combinedfs.py [--foreground] /path/to/configuration.yaml /mount/point
fstab syntax:
/path/to/configuration.yaml /mount/point fuse.combinedfs defaults 0 0
Refer to configuration.reference.yaml
to write your own configuration file.
It is possible to reload the configuration file without remounting the filesystem.
cat /mount/point/reload
This will output either "reload ok" or "reload fail".
Why?
Certbot already offers hooks to handle pretty much everything, from mere concatenations to complex deployments to various kinds of clusters. So why write a Fuse FileSystem to cover only a small part of this scope? Well, duh. Because it's fun, here's why.
Commit History @master
- Introduce register_fd(). Xavier G 5 years ago
- Move configuration to a separate object. Xavier G 5 years ago
- README: add fstab syntax. Xavier G 5 years ago
- Add support for dirent->d_type. Xavier G 5 years ago
- Add Makefile. Xavier G 5 years ago
- Add Python requirements file. Xavier G 5 years ago
- Parse arguments for compatibility with mount. Xavier G 5 years ago
- Add README. Xavier G 5 years ago
- Add configuration reference. Xavier G 5 years ago
- Add copyright and license. Xavier G 5 years ago
- Finally choose not to check flags in open(). Xavier G 5 years ago
- Use a lock to manipulate file descriptors. Xavier G 5 years ago
- Remove flush(). Xavier G 5 years ago
- access(): return ENOTSUP, just in case. Xavier G 5 years ago
- Move iterate_paths() in the helpers section. Xavier G 5 years ago
- Change the way CombinedFS declares itself read-only. Xavier G 5 years ago
- Introduce fallback paths. Xavier G 5 years ago
- Introduce iterate_paths(). Xavier G 5 years ago
- Add expand_path(). Xavier G 5 years ago
- Offer more flexibility regarding permissions. Xavier G 5 years ago
- Reorder helpers. Xavier G 5 years ago
- Adjust comment. Xavier G 5 years ago
- Rewrite readdir() using analyse_path(). Xavier G 5 years ago
- Move the readlink method. Xavier G 5 years ago
- Get rid of access(). Xavier G 5 years ago
- Add first lump of code. Xavier G 5 years ago
- Initial commit. Xavier G 5 years ago