Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 2 tasks
nielscil opened this issue Dec 28, 2024 · 2 comments · May be fixed by #2329
Open
1 of 2 tasks

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

nielscil opened this issue Dec 28, 2024 · 2 comments · May be fixed by #2329
Labels
enhancement New feature or request no-stale-bot

Comments

@nielscil
Copy link

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.
@nielscil nielscil added the enhancement New feature or request label Dec 28, 2024
@kradalby
Copy link
Collaborator

I think we already support nextdns via the config, just not via nodeattrs.

@nielscil
Copy link
Author

Yeah, but that is on global level, isn't it? I would like to have different profile for different users.

@nielscil nielscil linked a pull request Jan 6, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-stale-bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants