[PR #44] [MERGED] Add support for Policy ACLs #1222

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/44
Author: @juanfont
Created: 7/4/2021
Status: Merged
Merged: 7/7/2021
Merged by: @juanfont

Base: mainHead: acls


📝 Commits (10+)

  • b161a92 Initial work on ACLs
  • 5644dad Added dependency on hujson
  • bbd6a67 Added more acl test hujsons
  • 136aab9 Work in progress in rule generation
  • 07e9539 Rule generation kinda working, missing tests
  • d0e970f Added more unit tests
  • bd86975 Added missing go.mod
  • 401e6ae And more tests
  • 202d6b5 Load ACL policy on headscale startup
  • d446e8a More stuff in go.sum

📊 Changes

19 files changed (+880 additions, -3 deletions)

View changed files

acls.go (+263 -0)
acls_test.go (+160 -0)
acls_types.go (+70 -0)
📝 api.go (+1 -1)
📝 app.go (+5 -0)
📝 cmd/headscale/cli/utils.go (+7 -0)
📝 config.json.postgres.example (+2 -1)
📝 config.json.sqlite.example (+2 -1)
📝 go.mod (+1 -0)
📝 go.sum (+2 -0)
tests/acls/acl_policy_1.hujson (+127 -0)
tests/acls/acl_policy_basic_1.hujson (+24 -0)
tests/acls/acl_policy_basic_groups.hujson (+26 -0)
tests/acls/acl_policy_basic_namespace_as_user.hujson (+20 -0)
tests/acls/acl_policy_basic_range.hujson (+20 -0)
tests/acls/acl_policy_basic_wildcards.hujson (+20 -0)
tests/acls/acl_policy_invalid.hujson (+125 -0)
tests/acls/broken.hujson (+1 -0)
tests/acls/invalid.hujson (+4 -0)

📄 Description

This series of commits adds support for Tailscale policy ACLs, as described in https://tailscale.com/kb/1018/acls

I am opening the PR for reviewing purposes, as it is not yet ready to merge. Documentation is still missing too.


🔄 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/44 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 7/4/2021 **Status:** ✅ Merged **Merged:** 7/7/2021 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `acls` --- ### 📝 Commits (10+) - [`b161a92`](https://github.com/juanfont/headscale/commit/b161a92e5806d9ed4e35b585c5985d3ddfdfdfd6) Initial work on ACLs - [`5644dad`](https://github.com/juanfont/headscale/commit/5644dadaf9f5e9eee455e62520afad47bb4ad4be) Added dependency on hujson - [`bbd6a67`](https://github.com/juanfont/headscale/commit/bbd6a67c46c935d83214b4c64424fda2fab375c9) Added more acl test hujsons - [`136aab9`](https://github.com/juanfont/headscale/commit/136aab9dc8f3a1ca9d8a1b4be8fd46f60a927f5a) Work in progress in rule generation - [`07e9539`](https://github.com/juanfont/headscale/commit/07e95393b30c9bd43212fdd4fa57b166f48b8401) Rule generation kinda working, missing tests - [`d0e970f`](https://github.com/juanfont/headscale/commit/d0e970f21dd0935304988764613f928e26e8a4fa) Added more unit tests - [`bd86975`](https://github.com/juanfont/headscale/commit/bd86975d1005be4834965d2d1fa20eb12f60bf74) Added missing go.mod - [`401e6ae`](https://github.com/juanfont/headscale/commit/401e6aec328b840ffb399a683cd55597ed6e9722) And more tests - [`202d6b5`](https://github.com/juanfont/headscale/commit/202d6b506f3bc1700f0d31c2ac069f256fad61ef) Load ACL policy on headscale startup - [`d446e8a`](https://github.com/juanfont/headscale/commit/d446e8a2fb2b1f9939ff39b89872ff264713a440) More stuff in go.sum ### 📊 Changes **19 files changed** (+880 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `acls.go` (+263 -0) ➕ `acls_test.go` (+160 -0) ➕ `acls_types.go` (+70 -0) 📝 `api.go` (+1 -1) 📝 `app.go` (+5 -0) 📝 `cmd/headscale/cli/utils.go` (+7 -0) 📝 `config.json.postgres.example` (+2 -1) 📝 `config.json.sqlite.example` (+2 -1) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+2 -0) ➕ `tests/acls/acl_policy_1.hujson` (+127 -0) ➕ `tests/acls/acl_policy_basic_1.hujson` (+24 -0) ➕ `tests/acls/acl_policy_basic_groups.hujson` (+26 -0) ➕ `tests/acls/acl_policy_basic_namespace_as_user.hujson` (+20 -0) ➕ `tests/acls/acl_policy_basic_range.hujson` (+20 -0) ➕ `tests/acls/acl_policy_basic_wildcards.hujson` (+20 -0) ➕ `tests/acls/acl_policy_invalid.hujson` (+125 -0) ➕ `tests/acls/broken.hujson` (+1 -0) ➕ `tests/acls/invalid.hujson` (+4 -0) </details> ### 📄 Description This series of commits adds support for Tailscale policy ACLs, as described in https://tailscale.com/kb/1018/acls I am opening the PR for reviewing purposes, as it is not yet ready to merge. Documentation is still missing too. --- <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:16 +01:00
adam closed this issue 2025-12-29 02:29:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1222