Skip to content

Feat: support providing a secret file to frp service #391108

@henningphan

Description

@henningphan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions