Is this a support request?
Is there an existing issue for this?
Current Behavior
Hi, I think there may be a bug in how grant policies are parsed. Thank you for your time!
The configuration below correctly allows user admin to see all nodes, but also incorrectly (based on my understanding) allows all nodes to see admin nodes even though it has not been granted.
Expected Behavior
The admin nodes see all nodes, but each user only sees own nodes.
Steps To Reproduce
- Create users named admin, user1, user2.
- Add one or two nodes for each user.
- notice
tailscale status on user1 and user2 nodes lists admin nodes and the corresponding nodes to that user, but the admin nodes list all nodes for all users.
- optionally start an http server on user1-node1 and admin-node1
python3 -m http.server 8080.
- note that this command succeeds when ran from an admin node
curl user1-node1:8080 as expected.
- note that this command succeeds when ran from a user node
curl admin-node1:8080 unexpectedly.
Environment
- OS: linux (podman containers for headscale and tailscale nodes)
- Headscale version: v0.29.3
- Tailscale version: 1.98.10
Runtime environment
Debug information
policy file configuration:
{
"randomizeClientPort": true,
"grants": [
{
"src": ["autogroup:member"],
"dst": ["autogroup:self"],
"ip": ["*"],
},
{
"src": ["admin@"],
"dst": ["autogroup:member"],
"ip": ["*"],
},
],
}
Is this a support request?
Is there an existing issue for this?
Current Behavior
Hi, I think there may be a bug in how grant policies are parsed. Thank you for your time!
The configuration below correctly allows user admin to see all nodes, but also incorrectly (based on my understanding) allows all nodes to see admin nodes even though it has not been granted.
Expected Behavior
The admin nodes see all nodes, but each user only sees own nodes.
Steps To Reproduce
tailscale statuson user1 and user2 nodes lists admin nodes and the corresponding nodes to that user, but the admin nodes list all nodes for all users.python3 -m http.server 8080.curl user1-node1:8080as expected.curl admin-node1:8080unexpectedly.Environment
Runtime environment
Debug information
policy file configuration:
{ "randomizeClientPort": true, "grants": [ { "src": ["autogroup:member"], "dst": ["autogroup:self"], "ip": ["*"], }, { "src": ["admin@"], "dst": ["autogroup:member"], "ip": ["*"], }, ], }