Comment 4 for bug 1868645

Revision history for this message
Vern Hart (vern) wrote :

From what I can discern, this could be resolved in a couple of different ways. We include secrets within the bundle for a few different charms.

1. Some charms will use .strip() to eliminate any errant newlines. (Like canonical-livepatch.)
2. Other charms don't quote the strings when rendering the templates. (Like keystone-ldap.) This causes an extra newline after the config value but blank lines are usually okay in most config files.

The latter might work fine in most situations (even when there are special characters in the secret) but it seems safer to have quotes.

Therefore, I propose stripping the string.