Design config file for log servers
The current config file /etc/sigsum/config.toml was defined by wrapping the command line options into some structs, which are then parsed using the toml package. There are a few things to improve.
- Syntax is inconsistent with other config files, e.g, rate-limiter config, which uses a custom parser, as well as the policy file which I'm currently sketching. We should decide which style we want.
- It's not clear to me how to do multiple values in toml. E.g., the "witnesses" setting is now a string containing a comma separated list of file names, which is poor structure, and gets more painful when we need both pubkey and url for each witness. It would be much neater with something like
witness PUBKEY URL
(zero or more lines), alternatively something like
[witness]
pubkey = ...
url = ...
[witness]
pubkey = ...
url = ...
(possibly moving it from the main config file to the policy file). It might be a natural way to do multiple values while staying with toml, I don't know. But using the equals operator with multiple values looks awkward to me.
- The tree-id config is a bit of a hassle. It would be better to store it in some file (perhaps best near the sth file), and even better usability if the server can create the tree automatically at first startup.