slackhq/nebula · error
config `%s.interfaces` has invalid value (type %T): %v
Error message
config `%s.interfaces` has invalid value (type %T): %v
What it means
Validation error from getAllowListInterfaces: a value inside the `<key>.interfaces` map (the per-interface allow/deny rule) could not be coerced to a boolean by config.AsBool. The offending entry is rawAllow, whose dynamic Go type is shown in the message — e.g. a list or nested map where true/false (or a string form of them) was expected.
Source
Thrown at allow_list.go:184
}
return &AllowList{cidrTree: tree}, nil
}
func getAllowListInterfaces(k string, v any) ([]AllowListNameRule, error) {
var nameRules []AllowListNameRule
rawRules, ok := v.(map[string]any)
if !ok {
return nil, fmt.Errorf("config `%s.interfaces` is invalid (type %T): %v", k, v, v)
}
firstEntry := true
var allValues bool
for name, rawAllow := range rawRules {
allow, ok := config.AsBool(rawAllow)
if !ok {
return nil, fmt.Errorf("config `%s.interfaces` has invalid value (type %T): %v", k, rawAllow, rawAllow)
}
nameRE, err := regexp.Compile("^" + name + "$")
if err != nil {
return nil, fmt.Errorf("config `%s.interfaces` has invalid key: %s: %v", k, name, err)
}
nameRules = append(nameRules, AllowListNameRule{
Name: nameRE,
Allow: allow,
})
if firstEntry {
allValues = allow
firstEntry = false
} else {
if allow != allValues {
return nil, fmt.Errorf("config `%s.interfaces` values must all be the same true/false value", k)View on GitHub (pinned to dd8f660c0a)
Solutions
- Change every interface value to literal true or false
- Unquote values so YAML/JSON parses them as booleans
- Check the type %T in the message to see what the value parsed as
Example fix
// before interfaces: eth0: "yes" // after interfaces: eth0: true
Defensive patterns
Strategy: validation
Validate before calling
func interfaceValuesAreBool(m map[string]any) bool {
for _, v := range m {
if _, ok := v.(bool); !ok {
return false
}
}
return true
} Type guard
func isBool(v any) bool { _, ok := v.(bool); return ok } Prevention
- Use JSON/YAML booleans only for interface entries
- Validate the whole config with a schema linter
When it happens
Trigger: getAllowListInterfaces encountering an entry like eth0: "yes", eth0: 1, or a nested map under an interface name.
Common situations: Unquoted yes/no strings, numeric flags, or pasting rules from other tools that use accept/deny semantics.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- config `%s.interfaces` is invalid (type %T): %v
- config `%s.interfaces` values must all be the same true/fals
- config `%s` has invalid value (type %T): %v
- config `%s.interfaces` has invalid key: %s: %v
- Empty configuration
AI-assisted analysis of slackhq/nebula@dd8f660c0a (2026-09-03).
Data as JSON: /api/errors/32749efea9aede2d.
Report an issue: GitHub.