DefGuard / DefGuard/defguard

systemd: running service as ephemeral user requires special handling of sensitive files

Open
#1,814 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
2.8k
Forks
115
Avg merge
1d 4h
Merged PRs (30d)
51

Description

Currently, Defguard service runs as an ephemeral user `defguard`. In that configuration, it is not possible to secure sensitive files, like RSA keys, because systemd picks up a random user ID.

Consider one of these fixes:

1. Create a dedicated user (e.g. `defguard`) during package installation.

2. Use `StateDirectory=` in service configuration. Reference: https://0pointer.net/blog/dynamic-users-with-systemd.html

Note: running the service as non-root prohibits binding to ports < 1024.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.