headscale icon indicating copy to clipboard operation
headscale copied to clipboard

bug in function excludeCorrectlyTaggedNodes()

Open awsong opened this issue 2 years ago • 2 comments

In function excludeCorrectlyTaggedNodes() when matching tags with tagOwners: https://github.com/juanfont/headscale/blob/e80954b6c8f97f19ca881ab1c3bf5d7d2428d74c/acls.go#L314 The above line missing the condition when tagOwners are groups. Adding two lines here could fix this problem owners, _ := expandTagOwners(aclPolicy, namespace, true) ns = append(owners, namespace) But the third parameter (true/false) needs to be filled correctly, which I'm not sure how could be elegantly done.

awsong avatar Apr 28 '22 06:04 awsong

We will be grateful for a PR to solve this issue :)

@restanrm, does this look right to you? Maybe this is already fixed?

kradalby avatar Jun 12 '22 12:06 kradalby

I'll check this as soon as I found some time to do it.

restanrm avatar Jun 15 '22 08:06 restanrm