Open mocdaniel opened 1 year ago
Patched https://github.com/Al2Klimov/twintowers like this:
--- docker-compose.yml
+++ docker-compose.yml
@@ -45,3 +45,3 @@ x-dbweb: &x-dbweb
MARIADB_USER: icingaweb2
- MARIADB_PASSWORD: icingaweb2
+ MARIADB_PASSWORD: 'icingaweb2!,123'
MARIADB_DATABASE: icingaweb2
@@ -86,3 +86,3 @@ x-web-env: &x-web-env
icingaweb.resources.icingaweb_db.username: icingaweb2
- icingaweb.resources.icingaweb_db.password: icingaweb2
+ icingaweb.resources.icingaweb_db.password: 'icingaweb2!,123'
icingaweb.resources.icingaweb_db.charset: utf8
This is my resources.ini:
[icinga_ido]
username = ido
type = db
host = ido1
dbname = ido
password = ido
db = mysql
[icingadb]
username = icingadb
charset = utf8mb4
dbname = icingadb
host = dbicinga1
db = mysql
type = db
password = icingadb
[icingaweb_db]
host = dbweb1
password = icingaweb2!,123
charset = utf8
username = icingaweb2
db = mysql
dbname = icingaweb2
type = db
Icinga Web login works. My user is stored in the DB which Icinga Web has to access via above resource. The Director daemon is the problem.
We came across a problem regarding escaping of passed environment variables when working on icinga/helm-charts:
Consider a database resource password being passed as follows:
-e icingaweb_resources_icingawebdb_password="testpassword!,123
This gets written into
/etc/icingaweb2/resources.ini
like this:This is problematic, as there are certain characters in the
.ini
spec which seemingly need to be escaped - in our case, the Director daemon crashes when trying to read.ini
files which contain non-escaped strings with!
,,
, etc.Would it be possible to escape config values known to be strings with
"..."
during the startup routine?See also icinga/helm-charts#12