[PR #763] [MERGED] Add support for autoApprovers ACL #1629

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/763
Author: @tsujamin
Created: 8/24/2022
Status: Merged
Merged: 9/23/2022
Merged by: @kradalby

Base: mainHead: autoapprovers


📝 Commits (10+)

  • 004ebca initial implementation of autoApprovers support
  • 7653ad4 Split GetRouteApprovers from EnableAutoApprovedRoutes
  • 60cc9dd Add test for autoApprovers feature
  • 9810d84 Merge branch 'main' into autoapprovers
  • 842c28a replace netaddr usage with netip
  • 548551c Merge branch 'main' into autoapprovers
  • 688cba7 fix linting mistakes
  • a9da953 Merge branch 'main' into autoapprovers
  • adb352e Merge branch 'main' into autoapprovers
  • 5b12ab9 Merge branch 'main' into autoapprovers

📊 Changes

6 files changed (+166 additions, -5 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 acls_types.go (+38 -5)
📝 machine.go (+58 -0)
📝 machine_test.go (+41 -0)
📝 protocol_common_poll.go (+4 -0)
tests/acls/acl_policy_autoapprovers.hujson (+24 -0)

📄 Description

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

I've patched in support for AutoApprovers for exit nodes and subnets per https://tailscale.com/blog/auto-approvers/

The behaviour of the code is (currently)

  • Support auto-approving nodes that advertise subnets or exit status by tag, group or namespace
  • Advertised routes can be auto-approved by a overarching autoApproved route (e.g. advertised route 10.10.0.0/16 would be enabled if the node matched autoApproved route 10.0.0.0/8)
  • EnableAutoApprovedRoutes is called in protocol_common_poll.go!handlePollCommon, although I'm not 100% sure if this is the appropriate place within headscale

Let me know what you think, happy to tweak as far as my limited go skills allow


🔄 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/763 **Author:** [@tsujamin](https://github.com/tsujamin) **Created:** 8/24/2022 **Status:** ✅ Merged **Merged:** 9/23/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `autoapprovers` --- ### 📝 Commits (10+) - [`004ebca`](https://github.com/juanfont/headscale/commit/004ebcaba1dea344d3407ac77713322512ab0471) initial implementation of autoApprovers support - [`7653ad4`](https://github.com/juanfont/headscale/commit/7653ad40d6900f06ec6817440c05132912f92ae7) Split GetRouteApprovers from EnableAutoApprovedRoutes - [`60cc9dd`](https://github.com/juanfont/headscale/commit/60cc9ddb3b7951290d74e91dad365c8609227b1a) Add test for autoApprovers feature - [`9810d84`](https://github.com/juanfont/headscale/commit/9810d84e2de5307479d343e2996a3e9942abb963) Merge branch 'main' into autoapprovers - [`842c28a`](https://github.com/juanfont/headscale/commit/842c28adff914d6b6e6ba6cc4461df99b8f88175) replace netaddr usage with netip - [`548551c`](https://github.com/juanfont/headscale/commit/548551c6ae5928bcc9c4acdf9a90669230c3c8d2) Merge branch 'main' into autoapprovers - [`688cba7`](https://github.com/juanfont/headscale/commit/688cba7292219b5e311a62938c909b3319515b1d) fix linting mistakes - [`a9da953`](https://github.com/juanfont/headscale/commit/a9da953b55bb0e52c44ff7a366dd084f3a2da535) Merge branch 'main' into autoapprovers - [`adb352e`](https://github.com/juanfont/headscale/commit/adb352e66300073a964e13215f69b6cbcd233e33) Merge branch 'main' into autoapprovers - [`5b12ab9`](https://github.com/juanfont/headscale/commit/5b12ab9894604319ab308f4592f0198e878c8582) Merge branch 'main' into autoapprovers ### 📊 Changes **6 files changed** (+166 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `acls_types.go` (+38 -5) 📝 `machine.go` (+58 -0) 📝 `machine_test.go` (+41 -0) 📝 `protocol_common_poll.go` (+4 -0) ➕ `tests/acls/acl_policy_autoapprovers.hujson` (+24 -0) </details> ### 📄 Description - [X] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [X] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md I've patched in support for AutoApprovers for exit nodes and subnets per https://tailscale.com/blog/auto-approvers/ The behaviour of the code is (currently) * Support auto-approving nodes that advertise subnets or exit status by tag, group or namespace * Advertised routes can be auto-approved by a overarching autoApproved route (e.g. advertised route 10.10.0.0/16 would be enabled if the node matched autoApproved route 10.0.0.0/8) * EnableAutoApprovedRoutes is called in protocol_common_poll.go!handlePollCommon, although I'm not 100% sure if this is the appropriate place within headscale Let me know what you think, happy to tweak as far as my limited go skills allow --- <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:59 +01:00
adam closed this issue 2025-12-29 02:30:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1629