From e1d5d5c3377c6ba5ce85f9184ca4473a4c3294d1 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 18 Dec 2024 09:05:13 +0100 Subject: [PATCH] debug log auth/unauth tags in policy man Signed-off-by: Kristoffer Dalby --- hscontrol/policy/pm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hscontrol/policy/pm.go b/hscontrol/policy/pm.go index a9de1aa13a..7b92d7719b 100644 --- a/hscontrol/policy/pm.go +++ b/hscontrol/policy/pm.go @@ -8,6 +8,7 @@ import ( "sync" "github.com/juanfont/headscale/hscontrol/types" + "github.com/rs/zerolog/log" "go4.org/netipx" "tailscale.com/tailcfg" "tailscale.com/util/deephash" @@ -161,7 +162,8 @@ func (pm *PolicyManagerV1) Tags(node *types.Node) []string { return nil } - tags, _ := pm.pol.TagsOfNode(node) + tags, invalid := pm.pol.TagsOfNode(node) + log.Debug().Strs("authorised_tags", tags).Strs("unauthorised_tags", invalid).Uint64("node.id", node.ID.Uint64()).Msg("tags provided by policy") return tags }