Refactore/improve secrets code
This is an improvement/refactor of secrets management:
- modularization of encryption, storage and bootstrap/access of secrets.
- make it more explicit how we use secrets. Previous code made use of indexes to access parts of a larger blob and that was horrible to read. I did not change how secrets are used, so this might still be a bit ugly, but at least it is now explicit what we do, and easier to change.
- change the representation in
secrets.json
file. Instead of having one larger blob, i now use a dictionary so there's never a need to slice.