Files
Jonathan Nobels 176e145311 safesocket,cmd/tailscale: publish a read-only token on macsys
On macsys tailscaled runs as root inside a system extension and serves
every local user over a loopback TCP port, so the only thing deciding
what a caller may do is which token they can read. The one token we
published, sameuserproof-$port, is root:admin 0640, which leaves a user
outside the admin group with no access at all: not even the handlers
that only read the state of the node.

Publish a second token beside it in sameuserproof-ro-$port at 0644 and
fall back to it when the sameuserproof file cannot be read.

The extension recognizes the token through safesocket.ReadOnlyToken and
serves such a client a LocalAPI without PermitWrite.

The advice attached to an access-denied error was wrong for these
users. "Use sudo" is no help when it is membership in the same admin
group that grants sudo, so when our credentials are the read-only ones,
say that write access requires being in the admin group instead.

Updates tailscale/corp#48949

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2026-12-04 15:59:57 -05:00
..
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00