Commit cd95457
committed
Change configuration format to TOML
This introduces several improvements to the agent configuration.
- The file format is modified from INI style files to TOML formatted
files.
- The configuration is constructed using an hierarchical organization
following the order:
- The default hardcoded values are loaded
- If a configuration file is found in /usr/etc/keylime-agent.conf, it
is loaded and any option set overrides the default values
- Load configuration snippets from /usr/etc/keylime-agent.conf.d/*,
overriding the previous values
- Load the configuration from /etc/keylime-agent.conf, overriding
previous values
- Load configuration snippets from /etc/keylime-agent.conf.d/*,
overriding previous values
- Finally any configuration option can be overriden via environment
variable, by using the 'KEYLIME_AGENT_' prefix. For example,
KEYLIME_AGENT_PORT=9003 will override the 'port' option from the
'agent' section with the value '9003'.
This was introduced by using an added dependency, the 'config' crate
using the 'toml' feature for the toml file format.
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>1 parent 7d2fe35 commit cd95457
File tree
10 files changed
+1232
-885
lines changed- src
10 files changed
+1232
-885
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
0 commit comments