Skip to content

[Bug] Group-based ACL not working for local users #2641

Description

@maprambo

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

In my acl, I have mutliple groups. All of the usernames end in an @, like these:

"group:/Benutzer": ["maprambo@"],
"group:server": ["prod@"],

The first entry and all its rules are respected and they work, the second group is used in the same rules and does not work. There is a difference between these users:
maprambo is from OIDC with the preferred_username="maprambo"
prod is a local user with the username="prod" (both without @)

Both look the same in the users table:

ID Name Username Email Created
3 prod 2023-09-14 21:32:34
11 Full Name maprambo 2025-05-14 18:21:25

The hosts from the user prod accept the rules when they are assigned a tag that is also listed as a source (see below) -- but also only after a logout and login.

Expected Behavior

Both groups and their rules should be working, no matter if the user is from OIDC or local

Steps To Reproduce

  1. Create one local user
  2. Create one OIDC user
  3. Add both users to a group
  4. Use the group in ACL

Environment

- OS: docker image
- Headscale version: 0.26.0
- Tailscale version: 1.84.0

Runtime environment

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

Debug information

ACL:

{
	"groups": {
            "group:/Benutzer": ["maprambo@"],
            "group:server": ["prod@"],
        },
	"tagOwners": {
		"tag:benutzer-router": ["group:/Administrator/Netzwerk"],
	},
	"Hosts": {
		"revproxy.internal": "10.7.2.7/32",
	},
	"acls": [
		{
		  "action": "accept",
		  "src": [
				"group:server",
				"tag:benutzer-router", // <-- with this tag assigned, the nodes from the group server get this rule and its route
				"group:/Benutzer"
			],
		  "dst": [
				"revproxy.internal:80,443,3023",
				"tag:int-revproxy:80,443,3023"
		  ],
		},
	],
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions