add acl filter logs (#17143)

This commit is contained in:
Eric Haberkorn 2023-04-26 10:57:35 -04:00 committed by GitHub
parent 61ad5aa4a9
commit f2a96a8bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -258,7 +258,10 @@ func (f *Filter) filterServiceNodes(nodes *structs.ServiceNodes) bool {
continue
}
removed = true
f.logger.Debug("dropping node from result due to ACLs", "node", structs.NodeNameString(node.Node, &node.EnterpriseMeta))
node.CompoundServiceID()
f.logger.Debug("dropping service node from result due to ACLs",
"node", structs.NodeNameString(node.Node, &node.EnterpriseMeta),
"service", node.CompoundServiceID())
sn = append(sn[:i], sn[i+1:]...)
i--
}
@ -340,7 +343,9 @@ func (f *Filter) filterCheckServiceNodes(nodes *structs.CheckServiceNodes) bool
if node.CanRead(f.authorizer) == acl.Allow {
continue
}
f.logger.Debug("dropping node from result due to ACLs", "node", structs.NodeNameString(node.Node.Node, node.Node.GetEnterpriseMeta()))
f.logger.Debug("dropping check service node from result due to ACLs",
"node", structs.NodeNameString(node.Node.Node, node.Node.GetEnterpriseMeta()),
"service", node.Service.CompoundServiceID())
removed = true
csn = append(csn[:i], csn[i+1:]...)
i--