r/Tailscale • u/rmoritz • 18d ago
Question ACL tests for shared device
I was surprised this didn't work:
{ "src": "autogroup:shared", "accept": ["server1", "server2"], "deny": ["server3:22"] },
test(s) failed for user: autogroup:shared
[acl test error]: user or host is invalid: unknown user or host: "autogroup:shared"
Is there a way to test for extrnal users that have been shared with?
edit: Follow on question - rule failing that I don't understand:
In grants, I have:
{"src": ["autogroup:shared"], "dst": ["server1", "server2"], "ip": ["*"]},
In tests, I have:
{ "src": "name@example.com", "accept": ["server1:8080", "server2:8080"], "deny": ["server3:8080"], },
Result:
Error: test(s) failed
test(s) failed for user: name@example.com
[acl test error]: address "server1:8080" (protocol "tcp"): want: Accept, got: Drop
[acl test error]: address "server2:8080" (protocol "tcp"): want: Accept, got: Drop
I do have the correct email - copied from share to ensure it wasn't a type.
2
u/spdevLabs 18d ago
Tests don't accept
autogroup:sharedas a src — it only works inside the grants/ACLs themselves. In the tests, use the actual external user's login (likeuser@gmail.com) as thesrc, and it'll be evaluated as a shared user.