radicle-heartwood-lfs/crates
Lorenz Leutgeb ac572e64e5 node: Support systemd credential for passphrase
While it is possible to pass the passphrase via the environment, e.g.
`EnvironmentFile=<path to file that contains "RAD_PASSPHRASE=…">`
this is less secure than passing it via a file, because the environment
is inherited down the process tree.

Thus, allow using a systemd credential. The ID of the credential must be

    xyz.radicle.node.passphrase

and is not user-configurable.

Passing the passphrase via file is now possible with
`LoadCredential=xyz.radicle.node.passphrase:<path to file that contains passphrase>`

This requires just a bit of plumbing in `radicle-node`.

Because this mechanism is more secure than using the environment
variable `RAD_PASSPHRASE`, it takes priority. That is, if both the
systemd credential is available, *and* the environment variable
`RAD_PASSPHRASE` is set, the former is preferred.

Heads-up:
 1. The contents of the file must be valid UTF-8 (see documentation of
    `std::fs::read_to_string`). Assuming that the passphrase is at some
    point chosen by the user and typed on a keyboard, this does not
    seem like a severe restriction.
 2. The contents of the file are not processed otherwise, i.e. line
    breaks (notably at the end of the file) are not stripped.

The related `issue/8bd040e9de05e7fc27e373ebc1649ff4ad930e7a` asked for a
very similar feature: Passing the passphrase via a file named by the
value of the of the environment variable `RAD_PASSPHRASE_FILE`.
It was also briefly discussed at
<https://radicle.zulipchat.com/#narrow/channel/369277-heartwood/topic/.60RAD_PASSPHRASE_FILE.60/with/529104447>.
2025-10-09 10:03:21 +01:00
..
radicle node: Report sync status for given namespaces 2025-10-09 07:55:11 +02:00
radicle-cli cli/publish: Use clap 2025-10-09 10:52:21 +02:00
radicle-cli-test radicle-cli-test: Prepare testing with `jj` 2025-09-26 12:03:01 +01:00
radicle-cob crates: bump for release 2025-10-06 16:36:30 +01:00
radicle-crypto crypto: mark errors as `non_exhaustive` 2025-10-06 18:57:30 +02:00
radicle-dag repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00
radicle-fetch crates: bump for release 2025-10-06 16:36:30 +01:00
radicle-node node: Support systemd credential for passphrase 2025-10-09 10:03:21 +01:00
radicle-protocol node: Report sync status for given namespaces 2025-10-09 07:55:11 +02:00
radicle-remote-helper crates: bump for release 2025-10-06 16:36:30 +01:00
radicle-schemars crates: bump for release 2025-10-06 16:36:30 +01:00
radicle-signals signals: Guard most of the crate for Unix 2025-08-22 15:19:31 +01:00
radicle-ssh release: prepare crates 2025-08-12 12:13:49 +02:00
radicle-systemd systemd: Support Credentials 2025-10-09 10:03:21 +01:00
radicle-term crates: bump for release 2025-10-06 16:36:30 +01:00