Repository navigation
Conversation
|
Please have a look! |
lippserd
left a comment
There was a problem hiding this comment.
Existing manual INI-quoting workarounds change meaning with this serializer. An environment value containing the literal bytes "secret" previously produced secret when read, but now retains the outer quote characters. The same applies to LDAP DNs such as "dc=example,dc=com".
Since this change will reach existing users without a separate release, add ICINGAWEB_SERIALIZER_COMPAT to preserve existing quoting workarounds during the transition. Default it to 1 before Icinga Web 2.15.0. In compatibility mode, strip exactly one matching pair of outer double quotes from environment-derived configuration values without trimming other characters. Allow 0 to preserve values literally, including intentional surrounding quotes. Starting with 2.15.0, default it to 0 while temporarily retaining explicit opt-in.
Warn whenever compatibility mode transforms a value. Identify the setting but never log its value, since it may contain credentials. Explain that users should remove the embedded INI quotes and disable compatibility before the default changes. Verify quoted values containing escaped quotes and backslashes too, since stripping outer quotes alone may not reproduce their previous interpretation.
Please also document the compatibility flag and transition in README.md's environment-variable section and migration guidance. Distinguish embedded INI quote characters from shell/YAML quoting, which users should retain where needed. Update the generated INI example to show the quoted output. In the same section, document the known limitation that Icinga Web's renderer strips leading and trailing whitespace from values, including passwords.
As another nonblocking follow-up, put the literal entrypoint/ directory in backticks in commit 05c135f's subject.
d8f4f37 to
fbcf15e
Compare
|
I did it my way. :-) Let me know what you think about it! Test |
TestWith and without |
It knows best what they have to look like to be interpreted correctly. Especially the proper quoting of special characters is important.
…ring Render the config both via Icinga Web and the old way via go-ini and install the latter if ICINGAWEB_SERIALIZER_COMPAT=1. Unless set, it defaults to 0 as of Icinga Web v2.15.0 and to 1 for older versions. This way, rebuilds of older releases don't change their behavior.
If ICINGAWEB_SERIALIZER_COMPAT is effectively 1, let Icinga Web parse both the old and the new rendering of each config file and warn about every option which has a different value in the new one.
Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
It knows best what they have to look like to be interpreted correctly. Especially the proper quoting of special characters is important.
closes #119
closes lippserd/docker-compose-icinga#39
Before
After