Skip to content

[Bug] Error out on unknown symbol for policy v2 #2479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 4 tasks
nblock opened this issue Mar 16, 2025 · 0 comments · May be fixed by #2490
Open
2 of 4 tasks

[Bug] Error out on unknown symbol for policy v2 #2479

nblock opened this issue Mar 16, 2025 · 0 comments · May be fixed by #2490
Labels
bug Something isn't working policy 📝
Milestone

Comments

@nblock
Copy link
Collaborator

nblock commented Mar 16, 2025

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

This policy loads fine with Headscale 0.25 (user1 has to exist as user):

{
  "acls": [
    {
      "action": "accept",
      "src": [
        "user1"
      ],
      "dst": [
        "user1:*"
      ]
    },
    {
      "action": "accept",
      "src": [
        "user1"
      ],
      "dst": [
        "autogroup:internet:*"
      ]
    }
  ]
}

When loading the same policy with 586a20f and HEADSCALE_EXPERIMENTAL_POLICY_V2=1 it also loads without error/warning. The policy is no longer valid as user1 does no longer exist (and policy was not updated to user1@).

Expected Behavior

Error out on loading the policy as user1 can no longer be used to refer to a user and no entry in the hosts section exists that could match otherwise.

Steps To Reproduce

Load the above policy with policy v2 enabled (HEADSCALE_EXPERIMENTAL_POLICY_V2=1 )

Environment

- OS: Debian 12
- Headscale version: 586a20fbff4e97519d68a7fdd0d75e1c7decec30
- Tailscale version: -

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

@nblock nblock added the bug Something isn't working label Mar 16, 2025
@kradalby kradalby added this to the v0.26.0 milestone Mar 16, 2025
@kradalby kradalby linked a pull request Mar 19, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working policy 📝
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants