[PR #618] [MERGED] Update ACL syntax and add support for protocol filtering #1527

Closed
opened 2025-12-29 02:30:26 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/618
Author: @juanfont
Created: 6/8/2022
Status: Merged
Merged: 6/11/2022
Merged by: @kradalby

Base: mainHead: acl-syntax-fixes


📝 Commits (10+)

  • 3e35300 Migrate ACLs syntax to new Tailscale format
  • ab1aac9 Improve ACLs by adding protocol parsing support
  • 8287ba2 Do not lint the protocol magic numbers
  • 39f03b8 Added ACL test file
  • c47354b Update internal docs to the new syntax
  • 818d26b Updated changelog
  • 5bc1189 Update internal docs with protocol usage
  • 19b9688 Added missing file
  • 80ad1db Merge branch 'main' into acl-syntax-fixes
  • 735a6aa Use const for IANA protcol numbers

📊 Changes

15 files changed (+332 additions, -159 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 acls.go (+94 -13)
📝 acls_test.go (+54 -25)
📝 acls_types.go (+12 -11)
📝 docs/acls.md (+38 -22)
📝 machine_test.go (+2 -2)
📝 tests/acls/acl_policy_1.hujson (+28 -28)
📝 tests/acls/acl_policy_basic_1.hujson (+5 -5)
📝 tests/acls/acl_policy_basic_groups.hujson (+6 -6)
📝 tests/acls/acl_policy_basic_namespace_as_user.hujson (+5 -5)
tests/acls/acl_policy_basic_protocols.hujson (+41 -0)
📝 tests/acls/acl_policy_basic_range.hujson (+5 -5)
📝 tests/acls/acl_policy_basic_wildcards.hujson (+4 -4)
📝 tests/acls/acl_policy_basic_wildcards.yaml (+5 -5)
📝 tests/acls/acl_policy_invalid.hujson (+28 -28)

📄 Description

Implements #617.

Tailscale has changed the format of their ACLs to use a more firewall-y terms ("users" & "ports" -> "src" & "dst"). They have also started using all-lowercase tags.

Also, protocol filtering support :)

This PR implements these changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/618 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 6/8/2022 **Status:** ✅ Merged **Merged:** 6/11/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `acl-syntax-fixes` --- ### 📝 Commits (10+) - [`3e35300`](https://github.com/juanfont/headscale/commit/3e353004b842c30e9823860036d85be8cf3adf80) Migrate ACLs syntax to new Tailscale format - [`ab1aac9`](https://github.com/juanfont/headscale/commit/ab1aac9f3e5e507d7579e8c0f3d1b7438e7012b1) Improve ACLs by adding protocol parsing support - [`8287ba2`](https://github.com/juanfont/headscale/commit/8287ba24b9c43998161394b87773e8ac7def5a3c) Do not lint the protocol magic numbers - [`39f03b8`](https://github.com/juanfont/headscale/commit/39f03b86c808972dd42a3cce9785d0fe7a0cae33) Added ACL test file - [`c47354b`](https://github.com/juanfont/headscale/commit/c47354bdc3d4d6b82a69cdc41fec135a50e3b117) Update internal docs to the new syntax - [`818d26b`](https://github.com/juanfont/headscale/commit/818d26b5f95f647a29a5517e5266efd680dc21d9) Updated changelog - [`5bc1189`](https://github.com/juanfont/headscale/commit/5bc11891f514f70ee64e971b64b2ce33f8bccf95) Update internal docs with protocol usage - [`19b9688`](https://github.com/juanfont/headscale/commit/19b968849fadea2a4d88f9e76893fe7e714e58d6) Added missing file - [`80ad1db`](https://github.com/juanfont/headscale/commit/80ad1db228566e94c00e3d80eee11814cd3a943f) Merge branch 'main' into acl-syntax-fixes - [`735a6aa`](https://github.com/juanfont/headscale/commit/735a6aaa399cefe40381c99283c77550211a20fa) Use const for IANA protcol numbers ### 📊 Changes **15 files changed** (+332 additions, -159 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `acls.go` (+94 -13) 📝 `acls_test.go` (+54 -25) 📝 `acls_types.go` (+12 -11) 📝 `docs/acls.md` (+38 -22) 📝 `machine_test.go` (+2 -2) 📝 `tests/acls/acl_policy_1.hujson` (+28 -28) 📝 `tests/acls/acl_policy_basic_1.hujson` (+5 -5) 📝 `tests/acls/acl_policy_basic_groups.hujson` (+6 -6) 📝 `tests/acls/acl_policy_basic_namespace_as_user.hujson` (+5 -5) ➕ `tests/acls/acl_policy_basic_protocols.hujson` (+41 -0) 📝 `tests/acls/acl_policy_basic_range.hujson` (+5 -5) 📝 `tests/acls/acl_policy_basic_wildcards.hujson` (+4 -4) 📝 `tests/acls/acl_policy_basic_wildcards.yaml` (+5 -5) 📝 `tests/acls/acl_policy_invalid.hujson` (+28 -28) </details> ### 📄 Description Implements #617. Tailscale has changed the format of their ACLs to use a more firewall-y terms ("users" & "ports" -> "src" & "dst"). They have also started using all-lowercase tags. Also, protocol filtering support :) This PR implements these changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:30:26 +01:00
adam closed this issue 2025-12-29 02:30:26 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1527