From 09b9a73637651a045b258a359fc678d243780e67 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Mon, 10 Apr 2023 13:16:23 +0500 Subject: [PATCH] fix Bug 61960 - Add authentication for supervisord (#598) --- config/supervisor/supervisord.conf | 4 ++++ run-document-server.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/config/supervisor/supervisord.conf b/config/supervisor/supervisord.conf index 27ef634..7a6f00b 100644 --- a/config/supervisor/supervisord.conf +++ b/config/supervisor/supervisord.conf @@ -2,6 +2,8 @@ [inet_http_server] port = 127.0.0.1:9001 +username = ds +password = supervisorpassword [supervisord] logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) @@ -16,6 +18,8 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl = http://localhost:9001 ; use a unix:// URL for a unix socket +username = ds +password = supervisorpassword ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or diff --git a/run-document-server.sh b/run-document-server.sh index 964e850..c075f2d 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -496,6 +496,7 @@ update_supervisor_settings(){ cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/ # Copy modified supervisor config cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisord.conf /etc/supervisor/supervisord.conf + sed "s_\(password =\).*_\1 $(pwgen -s 20)_" -i /etc/supervisor/supervisord.conf sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf cp ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf /etc/supervisor/conf.d/ }