Skip to content

[Feature] Support for node attributes (nodeattrs) #2319

@nielscil

Description

@nielscil

Use case

I would like to use headscale and NextDNS together. Tailscale supports configuring different profiles using node attributes. This is something I would like to use in headscale too.

In addition some other features also need the use of node attributes, like #2146

Description

This feature request would implement the use of nodeattrs inside the policy file and support nextDNS profile options as metioned in the official tailscale docs.

example of policy

{
	"acls": ["..."],
	"nodeAttrs": [
		{
			"target": ["*"],
			"attr": [
                                "nextdns:abc123",
				"nextdns:no-device-info",
			],
		},
	],
}

this issue is a duplicate of #1407, but is closed because it got stale.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

  • Add nodeAttrs to policy file and parse inside ACLPolicy
  • Retrieve attributes in mapper.go
  • When using NextDNS DOH (already checked in mapper.go)
    • When nextdns-attribute is provided, change the profile of the uri
    • When nextdns:no-device-info is provided, skip adding the extra device info (currently done in mapper.go)
  • Add attributes to tnode.CapMap inside tail.go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestno-stale-botnodeAttrsNode attributes (nodeAttrs) featurepolicy 📝tailscale-feature-gapA feature in Headscale is either missing or incompatible with Tailscale's control plane.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions