Support ACL Tests #657

Open
opened 2025-12-29 02:21:41 +01:00 by adam · 4 comments
Owner

Originally created by @EtaoinWu on GitHub (Mar 1, 2024).

Why

ACL tests is a tailscale feature that allows ACL creators to do a sanity check on an ACL. It is a quality of life feature for access management.

// in ACL.hujson
{
  // ... other config
  "tests": [
    {
      "src": "alice-pc",
      "proto": "tcp",
      "accept": [ "jump-server:22", "tag:printer:80" ],
      "deny": [ "bob-laptop:443" ],
    },
  ],
}

Headscale currently parses but ignores ACL tests in an ACL config hujson or yaml file.

Description

Implement ACL testing as described in tailscale's KB. Note that the struct ACLTest misses some fields as defined by tailscale.

Originally created by @EtaoinWu on GitHub (Mar 1, 2024). ## Why ACL `tests` is a tailscale feature that allows ACL creators to do a sanity check on an ACL. It is a quality of life feature for access management. ```javascript // in ACL.hujson { // ... other config "tests": [ { "src": "alice-pc", "proto": "tcp", "accept": [ "jump-server:22", "tag:printer:80" ], "deny": [ "bob-laptop:443" ], }, ], } ``` Headscale currently parses but [ignores](https://github.com/juanfont/headscale/blob/7a920ee701f6c1cc5152075bfcd7dae6f6d604c6/hscontrol/policy/acls_types.go#L40) ACL tests in an ACL config hujson or yaml file. ## Description Implement ACL testing as described in tailscale's [KB](https://tailscale.com/kb/1337/acl-syntax#tests). Note that the struct `ACLTest` misses some fields as defined by tailscale.
adam added the enhancementno-stale-botpolicy 📝 labels 2025-12-29 02:21:41 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 7, 2024):

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Aug 7, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 14, 2024):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Aug 14, 2024): This issue was closed because it has been inactive for 14 days since being marked as stale.
Author
Owner

@wrbbz commented on GitHub (Jul 22, 2025):

@kradalby , sorry for tagging you directly
Why is this issue closed as "not planned"? Is it somehow out of scope? Or just due to the inactivity?

It would be a nice to have feature. As it could help to create and maintain an ACLs

@wrbbz commented on GitHub (Jul 22, 2025): @kradalby , sorry for tagging you directly Why is this issue closed as "not planned"? Is it somehow out of scope? Or just due to the inactivity? It would be a nice to have feature. As it could help to create and maintain an ACLs
Author
Owner

@kradalby commented on GitHub (Jul 23, 2025):

I opened it again, yes inactivity. But will like to point out that there is no space for this feature in the roadmap for a while. If someone wants to take a stab at it, this is a pretty good standalone part of the code base.

@kradalby commented on GitHub (Jul 23, 2025): I opened it again, yes inactivity. But will like to point out that there is no space for this feature in the roadmap for a while. If someone wants to take a stab at it, this is a pretty good standalone part of the code base.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#657