Skip to content

Commit

Permalink
automation_helper: fix unix sock file permission
Browse files Browse the repository at this point in the history
Set the file permission of the socket generated by gunicorn to
umask=0077. This gives all permissions to the user and no permissions to
group or other. This is the same permission set for the dcd.sock.

In addition, we need to register the automation-helper as a new init
script so that the integration tests pass.

Change-Id: I9df96487a265be80ab104072efecb3ad39d59fff
  • Loading branch information
logan-connolly committed Nov 22, 2024
1 parent a33400d commit e40f56d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmk/base/automation_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self, app: FastAPI, cfg: ApplicationServerConfig) -> None:
self._app = app
self._options = {
"daemon": cfg.daemon,
"umask": 0o077,
"bind": APPLICATION_SOCKET,
"workers": APPLICATION_WORKER_COUNT,
"worker_class": APPLICATION_WORKER_CLASS,
Expand Down
1 change: 1 addition & 0 deletions tests/integration/omd/test_init_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def test_init_scripts(site: Site) -> None:
scripts = {
"agent-receiver",
"apache",
"automation-helper",
"cmk-ui-jobs",
"core",
"crontab",
Expand Down

0 comments on commit e40f56d

Please sign in to comment.