[PR #1617] [CLOSED] Allow setting ForcedTags using the acls.hujson config file #2214

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1617
Author: @networkException
Created: 11/26/2023
Status: Closed

Base: mainHead: recursive-declarative-forced-tags


📝 Commits (1)

  • 2bec0a3 Allow setting ForcedTags using the acls.hujson config file

📊 Changes

3 files changed (+47 additions, -0 deletions)

View changed files

📝 hscontrol/policy/acls.go (+9 -0)
📝 hscontrol/policy/acls_test.go (+34 -0)
📝 hscontrol/policy/acls_types.go (+4 -0)

📄 Description

This pull request introduces a declarative way to set ForcedTags on nodes by recursively expanding aliases. These declarative forced tags are considered separately from the ones stored in the database.

Continuation of #1490

{
    "hosts": {
        "a": "fd7a:115c:a1e0::1",
        "b": "fd7a:115c:a1e0::2"
    },
    "forcedTags": {
        "tag:some-tag": [
            "a",
            "tag:some-other-tag"
        ],
        "tag:some-other-tag": [
            "b"
        ]
    }
}
  • 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 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/1617 **Author:** [@networkException](https://github.com/networkException) **Created:** 11/26/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `recursive-declarative-forced-tags` --- ### 📝 Commits (1) - [`2bec0a3`](https://github.com/juanfont/headscale/commit/2bec0a3dadae1500f3c3600900aecc2e8e0cb6b6) Allow setting ForcedTags using the acls.hujson config file ### 📊 Changes **3 files changed** (+47 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/policy/acls.go` (+9 -0) 📝 `hscontrol/policy/acls_test.go` (+34 -0) 📝 `hscontrol/policy/acls_types.go` (+4 -0) </details> ### 📄 Description This pull request introduces a declarative way to set `ForcedTags` on nodes by recursively expanding aliases. These declarative forced tags are considered separately from the ones stored in the database. Continuation of #1490 ```json { "hosts": { "a": "fd7a:115c:a1e0::1", "b": "fd7a:115c:a1e0::2" }, "forcedTags": { "tag:some-tag": [ "a", "tag:some-other-tag" ], "tag:some-other-tag": [ "b" ] } } ``` - [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 --- <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:20:15 +01:00
adam closed this issue 2025-12-29 03:20:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2214