opentdf.yaml has case sensitive keys
OpenTDF uses Viper has its configuration library. One limitation is Viper does NOT support case sensitive keys, see https://github.com/spf13/viper?tab=readme-ov-file#does-viper-support-case-sensitive-keys
Expected: all lower-case keys for configuration.
Example of problem, enforcDPoP. Various cases of the key is seen in the logs:
Note Viper doesn't support special characters like - or _ in keys.
@pflynn-virtru Viper should support -, _. Where are you seeing this?
Also the reason you see the case differences is because that log statement is just dumping the struct.
https://github.com/opentdf/platform/blob/859ad2c7f649f7424007b3937c5b1a745220a9cb/service/pkg/server/start.go#L47
Are you seeing issues in the config files?
Since Viper supports ENV vars I would suggest using _ otherwise you'll have env vars like ENFORCEDPOP=true opentdf start. Most *nix envs tend to use vars like ENFORCE_DPOP=true
The env variables will be the full path joined by underscores.
I think we should bump this up in priority as it caused https://github.com/opentdf/platform/issues/890 and I believe it has caused others (though I can't recall issue names/numbers).
in the future, when adding new configuration variables to the opentdf-example.yaml, contributors should use lower snake case. This issue is low priority, to edit the .yaml to comply to this.