Privileged operations agent for Hop3 (kernel-boundary executor)
Project description
hop3-rootd
Privileged-operations agent for Hop3. Runs as root; exposes a narrow control-plane API to hop3-server (running unprivileged as the hop3 user) over a Unix domain socket.
See notes/adrs/041-privileged-operations-agent.md for the design rationale and notes/adrs/040-network-firewall-and-port-exposure.md for the firewall integration that motivated v1's op set.
What this is
hop3-rootd is the kernel-boundary executor for Hop3's runtime privileged actions. The unprivileged hop3-server reaches it via a Unix socket; rootd validates each request structurally, applies the privileged action (nftables mutation, nginx reload, etc.), and returns a typed result.
In v1 the operations are:
firewall.add_rule,firewall.remove_rule,firewall.list_rules— manage rules in a dedicatedinet hop3nftables table.nginx.reload,nginx.validate_config— wrap the privileged nginx commands previously granted tohop3-servervia/etc/sudoers.d/hop3(now retired).daemon.health,daemon.handshake— introspection.
What this is not
- A policy enforcement layer. SO_PEERCRED admits the
hop3user; structural validation rejects malformed requests. There is no per-op authorization, no policy file. Operator-level "did you mean this?" prompts live inhop3 deploy, not in rootd. - A general-purpose privileged-shell daemon. Rootd never accepts shell strings; every operation is a typed intent with a fixed argument schema.
Deployment
hop3-rootd ships as a stdlib-only Python package and is installed by hop3-installer alongside hop3-server. It runs as a hardened systemd unit (full ProtectX suite, CapabilityBoundingSet=CAP_NET_ADMIN, syscall filter, resource limits). The socket is at /run/hop3-rootd/socket, mode 0660, group hop3.
Development
# Run unit tests (no privileges needed)
pytest tests/a_unit/ -v
# Run integration tests (requires root + nftables)
sudo pytest tests/b_integration/ -v
# Lint
ruff check src tests
ruff format src tests
License
Apache-2.0 — Copyright (c) 2026, Abilian SAS
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hop3_rootd-0.6.1.tar.gz.
File metadata
- Download URL: hop3_rootd-0.6.1.tar.gz
- Upload date:
- Size: 78.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc5fb065eee466daeeca2bb2acfcf0733a3862c189088142564d3a6390e65091
|
|
| MD5 |
20dc3ceb6181a20bfe42c12b0ff63d0d
|
|
| BLAKE2b-256 |
357c2e0d47a905c24cd4661c7a193cffde94dd2a81314baef7f43a7346d000f4
|
File details
Details for the file hop3_rootd-0.6.1-py3-none-any.whl.
File metadata
- Download URL: hop3_rootd-0.6.1-py3-none-any.whl
- Upload date:
- Size: 64.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bee4147c1bd7b11a42826adb58e8b6607c19cf587471b0e20e785f77aa0f2f99
|
|
| MD5 |
7fddc6ae1abe429ac1290603f7b7eadc
|
|
| BLAKE2b-256 |
d61214889910b9c46d92fdc358ad1e26f7209b27d8689d55eca63487805fa311
|