[PR #1381] [MERGED] ACL refactor #2075

Closed
opened 2025-12-29 03:19:40 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1381
Author: @kradalby
Created: 4/26/2023
Status: Merged
Merged: 5/3/2023
Merged by: @juanfont

Base: mainHead: acl-refactor


📝 Commits (10+)

  • c5303c4 simplify expandAlias function, move seperate logic out
  • 9241d7c clear up the acl function naming
  • 3891f5b make generateFilterRule a pol struct func
  • 9fffd63 outline tests for full filter generate
  • 0e55c7a testing without that horrible filtercode
  • 122049b update flake hash
  • 4d6c864 remove terrible filter code
  • 7af8fde lint and nolint tailscale borrowed func
  • 230ea7b add a filter case with really large destination set #1372
  • 922de90 use netipx.IPSet for matcher

📊 Changes

14 files changed (+1059 additions, -592 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 acls.go (+264 -228)
📝 acls_test.go (+294 -209)
📝 acls_types.go (+2 -2)
📝 app.go (+3 -5)
📝 flake.nix (+2 -1)
📝 go.mod (+3 -3)
📝 go.sum (+2 -3)
📝 integration/acl_test.go (+61 -4)
📝 integration/ssh_test.go (+1 -1)
📝 machine.go (+36 -130)
📝 machine_test.go (+129 -6)
matcher.go (+142 -0)
matcher_test.go (+119 -0)

📄 Description

General QoL improvements to the ACL code, naming, splitting up larger functions, some more tests at different layers.

Rewrite of the filtering of peers served as part of MapResponses, fixing #1372, undoing #1239, #1377, redoing #320.

Small contribution to laying the groundwork for improving SSH support.


🔄 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/1381 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 4/26/2023 **Status:** ✅ Merged **Merged:** 5/3/2023 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `acl-refactor` --- ### 📝 Commits (10+) - [`c5303c4`](https://github.com/juanfont/headscale/commit/c5303c4fc1093bc2554bd8bbd561b7b0681da343) simplify expandAlias function, move seperate logic out - [`9241d7c`](https://github.com/juanfont/headscale/commit/9241d7c1d48c3c287822a733ca80a374ed73697e) clear up the acl function naming - [`3891f5b`](https://github.com/juanfont/headscale/commit/3891f5b1d2f9d8bff6181b80d06f569fc1e145bd) make generateFilterRule a pol struct func - [`9fffd63`](https://github.com/juanfont/headscale/commit/9fffd63267165958979de5ac743b53ef2a258ae7) outline tests for full filter generate - [`0e55c7a`](https://github.com/juanfont/headscale/commit/0e55c7a344d5f080e1f8a4a7705c1b5da858506d) testing without that horrible filtercode - [`122049b`](https://github.com/juanfont/headscale/commit/122049b26a0cafdcb29b84487dd0336fcdb50317) update flake hash - [`4d6c864`](https://github.com/juanfont/headscale/commit/4d6c864dbe3b4394b9b612a488d1778ab2de4a25) remove terrible filter code - [`7af8fde`](https://github.com/juanfont/headscale/commit/7af8fde980db107f4078fc47866d85709b2093f7) lint and nolint tailscale borrowed func - [`230ea7b`](https://github.com/juanfont/headscale/commit/230ea7bd094ccf2ce3bd1a3ceb1403a44c81f86b) add a filter case with really large destination set #1372 - [`922de90`](https://github.com/juanfont/headscale/commit/922de90b52b342d5564802bd516074d46b41c720) use netipx.IPSet for matcher ### 📊 Changes **14 files changed** (+1059 additions, -592 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `acls.go` (+264 -228) 📝 `acls_test.go` (+294 -209) 📝 `acls_types.go` (+2 -2) 📝 `app.go` (+3 -5) 📝 `flake.nix` (+2 -1) 📝 `go.mod` (+3 -3) 📝 `go.sum` (+2 -3) 📝 `integration/acl_test.go` (+61 -4) 📝 `integration/ssh_test.go` (+1 -1) 📝 `machine.go` (+36 -130) 📝 `machine_test.go` (+129 -6) ➕ `matcher.go` (+142 -0) ➕ `matcher_test.go` (+119 -0) </details> ### 📄 Description General QoL improvements to the ACL code, naming, splitting up larger functions, some more tests at different layers. Rewrite of the filtering of peers served as part of MapResponses, fixing #1372, undoing #1239, #1377, redoing #320. Small contribution to laying the groundwork for improving SSH support. --- <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 03:19:40 +01:00
adam closed this issue 2025-12-29 03:19:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2075