juanfont/headscale · error
cannot use autogroup:danger-all as a dst
Error message
cannot use autogroup:danger-all as a dst
What it means
Returned by validateAutogroupForDst (hscontrol/policy/v2/types.go:2058) when autogroup:danger-all appears on the destination side of an ACL rule. danger-all matches every possible source (a deliberate footgun allowed only on src, mirroring Tailscale); allowing it as a dst would grant the entire universe access to internal services, so it is hard-rejected.
Source
Thrown at hscontrol/policy/v2/types.go:139
ErrInvalidAutoApprover = errors.New("invalid auto approver format")
ErrInvalidOwner = errors.New("invalid owner format")
ErrGroupNotDefined = errors.New("group not defined in policy")
ErrInvalidGroupMember = errors.New("invalid group member type")
ErrGroupValueNotArray = errors.New("group value must be an array of users")
ErrInvalidHostIP = errors.New("hostname contains invalid IP address")
ErrTagNotDefined = errors.New("tag not found")
ErrAutoApproverNotAlias = errors.New("auto approver is not an alias")
ErrInvalidACLAction = errors.New("invalid ACL action")
ErrInvalidSSHAction = errors.New("invalid SSH action")
ErrInvalidProtocolNumber = errors.New("invalid protocol number")
ErrProtocolLeadingZero = errors.New("leading 0 not permitted in protocol number")
ErrProtocolOutOfRange = errors.New("protocol number out of range (0-255)")
ErrAutogroupNotSupported = errors.New("autogroup not supported in headscale")
ErrAutogroupInternetSrc = errors.New("autogroup:internet can only be used in ACL destinations")
ErrAutogroupSelfSrc = errors.New("\"autogroup:self\" not valid on the src side of a rule")
ErrAutogroupNotSupportedACLSrc = errors.New("autogroup not supported for ACL sources")
ErrAutogroupNotSupportedACLDst = errors.New("autogroup not supported for ACL destinations")
ErrAutogroupDangerAllDst = errors.New("cannot use autogroup:danger-all as a dst")
ErrAutogroupNotSupportedSSHSrc = errors.New("autogroup not supported for SSH sources")
ErrAutogroupNotSupportedSSHDst = errors.New("autogroup not supported for SSH destinations")
ErrHostNotDefined = errors.New("host not defined in policy")
ErrSSHSourceAliasNotSupported = errors.New("alias not supported for SSH source")
ErrSSHDestAliasNotSupported = errors.New("alias not supported for SSH destination")
ErrUnknownField = errors.New("unknown field")
ErrProtocolNoSpecificPorts = errors.New("protocol does not support specific ports")
ErrTestEmptyAssertions = errors.New("test entry must have at least one of \"accept\" or \"deny\"")
ErrTestProtocolNotAllowed = errors.New("test protocol must be tcp, udp, sctp, or empty")
ErrTestDestinationMultiPort = errors.New("test destination port must be a single port")
ErrTestDestinationCIDR = errors.New("test destination must be a single host, not a CIDR range")
ErrAutogroupInternetTestDst = errors.New("autogroup:internet not valid as a test destination")
ErrSSHTestEmptySrc = errors.New("SSH tests entry must have a non-empty src")
ErrSSHTestEmptyDst = errors.New("SSH tests entry must have at least one dst")
ErrSSHTestDstUnknownTag = errors.New("SSH tests dst contains unknown tag")
ErrSSHTestDstDisallowedElement = errors.New("SSH tests dst contains disallowed element")
)
View on GitHub (pinned to 565fd254d0)
Solutions
- Remove autogroup:danger-all from dst; if you truly want allow-all in a lab, use "*:*" as the dst with an explicit src
- Keep autogroup:danger-all (if at all) only on the src side
- Prefer explicit groups/tags to avoid unintended exposure
Example fix
// before
{"action": "accept", "src": ["autogroup:member"], "dst": ["autogroup:danger-all:*"]}
// after (lab-only allow-all)
{"action": "accept", "src": ["autogroup:member"], "dst": ["*:*"]} Defensive patterns
Strategy: validation
Validate before calling
for _, d := range acl.Dst {
if strings.HasPrefix(d.Alias, "autogroup:danger-all") {
return errors.New("autogroup:danger-all cannot be a dst")
}
} Type guard
func isAutogroupDangerAllDst(err error) bool {
return errors.Is(err, policy.ErrAutogroupDangerAllDst)
} Try / catch
if err := p.Validate(); err != nil {
if errors.Is(err, policy.ErrAutogroupDangerAllDst) {
return fmt.Errorf("danger-all is src-only; use *:port or explicit targets as dst: %w", err)
}
return err
} Prevention
- Reserve autogroup:danger-all (if ever) for src-only lab rules
- Review any rule containing danger-all in change management — it is a security footgun
- Prefer explicit groups/tags over catch-alls in production policies
When it happens
Trigger: Policy with "acls": [{"action": "accept", "src": ["autogroup:member"], "dst": ["autogroup:danger-all:*"]}] or any dst alias spelling of autogroup:danger-all.
Common situations: Attempt to write 'everyone can reach everything' — sometimes done in lab tailnets. Also from templating that injects danger-all into both sides of generated rules.
Related errors
- nodeAttrs target does not support this autogroup
- invalid autogroup
- autogroup:internet can only be used in ACL destinations
- "autogroup:self" not valid on the src side of a rule
- autogroup not supported for ACL sources
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/76dd83f9bbee6f98.
Report an issue: GitHub.