Merge pull request #384 from restanrm/fix-issue-with-empty-namespace-and-acl-evaluation

This commit is contained in:
Kristoffer Dalby 2022-03-03 08:43:37 +00:00 committed by GitHub
commit f2ea6fb30f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,6 +230,10 @@ func expandAlias(
return []string{"*"}, nil return []string{"*"}, nil
} }
log.Debug().
Str("alias", alias).
Msg("Expanding")
if strings.HasPrefix(alias, "group:") { if strings.HasPrefix(alias, "group:") {
namespaces, err := expandGroup(aclPolicy, alias, stripEmailDomain) namespaces, err := expandGroup(aclPolicy, alias, stripEmailDomain)
if err != nil { if err != nil {
@ -293,7 +297,9 @@ func expandAlias(
return []string{cidr.String()}, nil return []string{cidr.String()}, nil
} }
return ips, errInvalidUserSection log.Warn().Msgf("No IPs found with the alias %v", alias)
return ips, nil
} }
// excludeCorrectlyTaggedNodes will remove from the list of input nodes the ones // excludeCorrectlyTaggedNodes will remove from the list of input nodes the ones