-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Background:
services.frp sometimes require a secret token to be set in services.frp.settings."auth.token". Auth.token can either be a string, which is insecure, or a file, by using frps include directive which will read an external file.
Problem with using the frps include directive is; to read the file the frps'user needs permissions, which is difficult to provide because its a systemd dynamicuser.
Potential solution 1: use systemd loadcredentials, believes it provides the secret file to the dynamicUser
https://discourse.nixos.org/t/better-way-to-get-secrets-into-systemd-units/34173/9
potential solution 2: set the User in systemd service, then I assume we can create a matching user and therefore know which user to set as owner to the secret file
Relevant to: @zaldnoay