Task
Give a server install a working shape where dig-node runs as a system service and dig-app runs as a user Agent. Today that combination cannot connect, because the control token is unreadable by anyone but root.
Parent: https://github.com/DIG-Network/dig_ecosystem/issues/3173
Source ticket: DIG-Network/dig-app#303
Context
Measured on Ubuntu Server 24.04.4 (dig-app#303, run-id dige2e-303-20260827220201), installing dig-node from the released .deb:
/var/lib/dig-node 700 root:root
/var/lib/dig-node/control-token 600 root:root
A dig-app Agent started as an ordinary user cannot read the token, and reports it accurately:
WARN dig_app_core::agent: no DIG node connected
reason=a node is running at http://dig.local but this app has no control token for it —
start the node as this user, or grant read access to its control-token file
The Agent stays up and keeps retrying rather than exiting, which is the correct behaviour. The message is honest and actionable. Neither is the defect.
Why this is worth a ticket
The defect is that this is the default outcome of the documented install on a server, where node-as-system-service plus app-as-user-agent is the natural shape. The e2e only got a connection by running dig-app as root — which is not a shape to recommend for a process that holds a user's identity.
An operator following the obvious path hits this as the third of three consecutive stops. It is the one with no workaround that a reader of the message would consider acceptable.
Scope
The deliverable is a decision plus the packaging change it implies, not a doc note. Candidate shapes, none pre-selected:
- a
dig group owning the token, with 0640 and the installing user added to it;
- a documented
--user systemd unit for dig-node so both run as the same user;
- a per-user token the node issues on request over an already-authenticated channel.
Whichever is chosen, the token must not become world-readable: it is a grant of control over a process that moves $DIG, and widening it to 0644 would trade an inconvenience for a privilege boundary. State the principal the new permission admits and why that principal is acceptable.
Evidence
The current state is measured (above). The fix needs its own: a transcript of an ordinary-user dig-app connecting to a system-service dig-node on a clean host, and the token's resulting mode and ownership.
Task
Give a server install a working shape where dig-node runs as a system service and dig-app runs as a user Agent. Today that combination cannot connect, because the control token is unreadable by anyone but root.
Parent: https://github.com/DIG-Network/dig_ecosystem/issues/3173
Source ticket: DIG-Network/dig-app#303
Context
Measured on Ubuntu Server 24.04.4 (dig-app#303, run-id
dige2e-303-20260827220201), installing dig-node from the released.deb:A dig-app Agent started as an ordinary user cannot read the token, and reports it accurately:
The Agent stays up and keeps retrying rather than exiting, which is the correct behaviour. The message is honest and actionable. Neither is the defect.
Why this is worth a ticket
The defect is that this is the default outcome of the documented install on a server, where node-as-system-service plus app-as-user-agent is the natural shape. The e2e only got a connection by running dig-app as root — which is not a shape to recommend for a process that holds a user's identity.
An operator following the obvious path hits this as the third of three consecutive stops. It is the one with no workaround that a reader of the message would consider acceptable.
Scope
The deliverable is a decision plus the packaging change it implies, not a doc note. Candidate shapes, none pre-selected:
diggroup owning the token, with0640and the installing user added to it;--usersystemd unit for dig-node so both run as the same user;Whichever is chosen, the token must not become world-readable: it is a grant of control over a process that moves $DIG, and widening it to
0644would trade an inconvenience for a privilege boundary. State the principal the new permission admits and why that principal is acceptable.Evidence
The current state is measured (above). The fix needs its own: a transcript of an ordinary-user dig-app connecting to a system-service dig-node on a clean host, and the token's resulting mode and ownership.