This would require some unfortunate linking or rewriting but it would be kind of excellent to have a single (env/load-from-ejson "config/secrets.ejson" ".env") or something. This would load that ejson file, decrypt it, identify the subtree of environment map, and load it as name/value pairs.
Challenges:
- Would require an additional change detection feature
- A bit more expensive than current evaluation
- New failure modes (key not present, key invalid, ciphertext invalid, JSON invalid, file missing)
- ejson is written in go so we couldn't trivially import it as a lib, and I don't love the idea of shelling out.
- Reimplementing just the decryption side of ejson would be annoying and feels wrong, but maybe not so bad: would be pretty easy and we already have dalek-ed25519 which would be most of the right libraries.
Benefits:
- Disincentivizes writing decrypted secrets to disk
- Appealingly nice integration between our tools.
This would require some unfortunate linking or rewriting but it would be kind of excellent to have a single
(env/load-from-ejson "config/secrets.ejson" ".env")or something. This would load that ejson file, decrypt it, identify the subtree of environment map, and load it as name/value pairs.Challenges:
Benefits: