Register: add --token-file flag #362

Open
Ninjatrappeur wants to merge 4 commits from Ninjatrappeur/nin/token-file into main
pull from: Ninjatrappeur/nin/token-file
4 Commits
Author SHA1 Message Date
techknowlogick ec452cab09 Merge branch 'main' into nin/token-file 2024-09-12 03:24:18 +00:00
techknowlogick ac5c25b19e Merge branch 'main' into nin/token-file 2023-10-15 23:23:44 +00:00
techknowlogick d7f0a906cb Merge branch 'main' into nin/token-file 2023-10-15 23:20:03 +00:00
Félix Baylac Jacqué c7f39de3a8 Register: add --token-file flag
At the moment, the only way to pass the secret Gitea token to the
runner CLI is directly through a CLI parameter. That's an issue on a
multi-user system where the CLI parameters are world-readable through
/proc/PID/cmdline. On a Linux system, there's sadly no way to hide the
cmdline parameters.

We usually go around this limitation by storing the secrets in a file
and protect it through tight ACL rules. Adding a way to inject the
secret token via a file during the register command.

As a nice side-effect, this improves the systemd integration by
allowing us to directly use the LoadCredential mechanism.
2023-09-25 13:23:50 +02:00