mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
Feature: privilege separation #332
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @intelfx on GitHub (Apr 20, 2018).
The hooks mechanism of dehydrated has a significant usability problem: there is no way to execute hooks with higher privileges than dehydrated itself. For example, I do not want dehydrated to run as root (which I hope is understandable), but I need root privileges to deploy the resulting keys.
Locally, I have worked around this with a sort of "playbook" mechanism: I have a catch-all deployment hook that records all its invocations in a text file and after dehydrated is done, a "real" hook is run that reads the text file and executes recorded actions with elevated privileges.
Can we have something similar in dehydrated? Or at least a kind of internal privilege separation when dehydrated starts as root, forks, then the child process drops privileges, performs network operations and communicates back to the parent when a hook needs to be run.
@leonklingele commented on GitHub (Apr 20, 2018):
setuid / setgid could help here, although unsupported for scripts.
@lukas2511 commented on GitHub (Apr 20, 2018):
Sorry, but real privilege separation in dehydrated is nothing I'm planning to work on.
Most of the tasks would probably work without any root access: