[PR #320] [MERGED] Improvements on the ACLs and bug fixing #1382

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/320
Author: @restanrm
Created: 2/14/2022
Status: Merged
Merged: 2/21/2022
Merged by: @kradalby

Base: mainHead: feat-improve-acls-usage


📝 Commits (10+)

  • 9b7d657 Return all peers instead of peers in same namespace
  • e482dfe feat(machine): add ACLFilter if ACL's are enabled.
  • e9949b4 feat(acls): simplify updating rules
  • fb45138 feat(acls): check acl owners and add bunch of tests
  • 97eac3b feat(acl): update frequently the aclRules
  • de59946 feat(acls): rewrite functions to be testable
  • 7b5ba9f docs(acl): add configuration example to explain acls
  • aceaba6 docs(changelog): bump changelog
  • 9cedbba chore(all): update some files for linter
  • d8c4c31 chore(fmt): apply make fmt command

📊 Changes

12 files changed (+1802 additions, -94 deletions)

View changed files

📝 .golangci.yaml (+1 -0)
📝 CHANGELOG.md (+18 -0)
📝 acls.go (+174 -59)
📝 acls_test.go (+967 -1)
📝 api.go (+20 -2)
📝 dns.go (+17 -3)
📝 docs/README.md (+8 -0)
docs/acls.md (+141 -0)
📝 machine.go (+158 -27)
📝 machine_test.go (+262 -0)
📝 poll.go (+26 -2)
📝 utils.go (+10 -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

This PR is a first implementation of what has been discussed on #311 It should be reviewed commit by commit since last commits are linting modifications and changes quite much some part of the code that I didn't touch.

All subject discussed in PR #311 are not implemented here. I think all those modifications should be splitted in multiple PRs.

If this PR is too big, some commits could be moved outside of this PR it's related but just fixes some bugs on the ACLs parsing behavior.


🔄 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/320 **Author:** [@restanrm](https://github.com/restanrm) **Created:** 2/14/2022 **Status:** ✅ Merged **Merged:** 2/21/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `feat-improve-acls-usage` --- ### 📝 Commits (10+) - [`9b7d657`](https://github.com/juanfont/headscale/commit/9b7d657cbe4ae7f648798a7080819f3863f6b7c8) Return all peers instead of peers in same namespace - [`e482dfe`](https://github.com/juanfont/headscale/commit/e482dfeed4a06e7d9be966a8068dd06b826f686d) feat(machine): add ACLFilter if ACL's are enabled. - [`e9949b4`](https://github.com/juanfont/headscale/commit/e9949b4c70e5a0bc0599e10d854ece73976c06e4) feat(acls): simplify updating rules - [`fb45138`](https://github.com/juanfont/headscale/commit/fb45138fc19fffeb336e46c0a859ee9c711240be) feat(acls): check acl owners and add bunch of tests - [`97eac3b`](https://github.com/juanfont/headscale/commit/97eac3b9389e5eb17dc901f15bdb4882d0e7a167) feat(acl): update frequently the aclRules - [`de59946`](https://github.com/juanfont/headscale/commit/de5994644790b6948d1d39b12a59dfb9931df797) feat(acls): rewrite functions to be testable - [`7b5ba9f`](https://github.com/juanfont/headscale/commit/7b5ba9f78156b7ef1abe3abf9bc0d731396488b5) docs(acl): add configuration example to explain acls - [`aceaba6`](https://github.com/juanfont/headscale/commit/aceaba60f174703eedefa2b9775e8c4026000988) docs(changelog): bump changelog - [`9cedbba`](https://github.com/juanfont/headscale/commit/9cedbbafd46ad3034967a25f1901f8fe04ee4bf7) chore(all): update some files for linter - [`d8c4c31`](https://github.com/juanfont/headscale/commit/d8c4c3163b6fe9bba05fa2dd2566910ebf749c31) chore(fmt): apply make fmt command ### 📊 Changes **12 files changed** (+1802 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `.golangci.yaml` (+1 -0) 📝 `CHANGELOG.md` (+18 -0) 📝 `acls.go` (+174 -59) 📝 `acls_test.go` (+967 -1) 📝 `api.go` (+20 -2) 📝 `dns.go` (+17 -3) 📝 `docs/README.md` (+8 -0) ➕ `docs/acls.md` (+141 -0) 📝 `machine.go` (+158 -27) 📝 `machine_test.go` (+262 -0) 📝 `poll.go` (+26 -2) 📝 `utils.go` (+10 -0) </details> ### 📄 Description <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#user-content-contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [] added integration tests - [x] updated documentation if needed - [x] updated CHANGELOG.md This PR is a first implementation of what has been discussed on #311 It should be reviewed commit by commit since last commits are linting modifications and changes quite much some part of the code that I didn't touch. All subject discussed in PR #311 are not implemented here. I think all those modifications should be splitted in multiple PRs. If this PR is too big, some commits could be moved outside of this PR it's related but just fixes some bugs on the ACLs parsing behavior. --- <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:29:53 +01:00
adam closed this issue 2025-12-29 02:29:53 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1382