-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
config: loosen up BaseDomain and ServerURL checks #2248
Conversation
Requirements [here][1]: > OK: > server_url: headscale.com, base: clients.headscale.com > server_url: headscale.com, base: headscale.net > > Not OK: > server_url: server.headscale.com, base: headscale.com > > Essentially we have to prevent the possibility where the headscale > server has a URL which can also be assigned to a node. > > So for the Not OK scenario: > > if the server is: server.headscale.com, and a node joins with the name > server, it will be assigned server.headscale.com and that will break > the connection for nodes which will now try to connect to that node > instead of the headscale server. Fixes juanfont#2210 [1]: juanfont#2210 (comment)
|
||
// OK | ||
// server_url: headscale.com, base: clients.headscale.com | ||
// server_url: headscale.com, base: headscale.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is said elsewhere that server url must not be a suffix of the base_domain. To me, server is a suffix of base here -- yes, additionally they are equal. Perhaps the wording using "suffix" needs to be adjusted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are write, it should probably be reformulated since we allow different domains, open to proposals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See updated error message. I think the new one is more intuitive, see if you like it better
|
||
// OK | ||
// server_url: headscale.com, base: clients.headscale.com | ||
// server_url: headscale.com, base: headscale.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are write, it should probably be reformulated since we allow different domains, open to proposals.
…and add a test case for the bug.
Currently users upgrading from 24.05 to 24.11 may stumble across an overly-restrictive BaseURL and ServerURL check in headscale[1]. A fix has been merged upstream[2], this is backport, so users can have it easier upgrading from 24.05 to 24.11. [1]: juanfont/headscale#2210 [2]: juanfont/headscale#2248
Currently users upgrading from 24.05 to 24.11 may stumble across an overly-restrictive BaseURL and ServerURL check in headscale[1]. A fix has been merged upstream[2], this is backport, so users can have it easier upgrading from 24.05 to 24.11. [1]: juanfont/headscale#2210 [2]: juanfont/headscale#2248
@kradalby since we're here, I would appreciate if you could stamp my NixOS backport. :) NixOS/nixpkgs#357969 |
Currently users upgrading from 24.05 to 24.11 may stumble across an overly-restrictive BaseURL and ServerURL check in headscale[1]. A fix has been merged upstream[2], this is backport, so users can have it easier upgrading from 24.05 to 24.11 or unstable. The patch does not apply cleanly on v0.23.0, so putting it here instead. Supersedes NixOS#357969, this will be backported to 24.11 with a tag. [1]: juanfont/headscale#2210 [2]: juanfont/headscale#2248
Currently users upgrading from 24.05 to 24.11 may stumble across an overly-restrictive BaseURL and ServerURL check in headscale[1]. A fix has been merged upstream[2], this is backport, so users can have it easier upgrading from 24.05 to 24.11 or unstable. The patch does not apply cleanly on v0.23.0, so putting it here instead. Supersedes #357969, this will be backported to 24.11 with a tag. [1]: juanfont/headscale#2210 [2]: juanfont/headscale#2248
Currently users upgrading from 24.05 to 24.11 may stumble across an overly-restrictive BaseURL and ServerURL check in headscale[1]. A fix has been merged upstream[2], this is backport, so users can have it easier upgrading from 24.05 to 24.11 or unstable. The patch does not apply cleanly on v0.23.0, so putting it here instead. Supersedes #357969, this will be backported to 24.11 with a tag. [1]: juanfont/headscale#2210 [2]: juanfont/headscale#2248 (cherry picked from commit f1bdc12)
Currently users upgrading from 24.05 to 24.11 may stumble across an overly-restrictive BaseURL and ServerURL check in headscale[1]. A fix has been merged upstream[2], this is backport, so users can have it easier upgrading from 24.05 to 24.11 or unstable. The patch does not apply cleanly on v0.23.0, so putting it here instead. Supersedes NixOS#357969, this will be backported to 24.11 with a tag. [1]: juanfont/headscale#2210 [2]: juanfont/headscale#2248
I want to set my base_url to example.com and the server_url to entry.example.com, I also have set split dns for entry.example.com to quad9's dns servers as to be still able to contact the headscale node. |
No, that is a foot gun we don't want to support or carry the issue burden for |
Okay, what other options would there be, I don't really want the base domain to be a subdomain, and don't want to use a separate domain for the control plane |
There are no other options, tailscale was designed in this way, upstream uses two domains, login.tailscale.com for the server and ts.net for basename. |
server_url check [has been loosened upstream][1] and backported to NixOS[2]. The new, much looser check, is not practical to be implemented in Nix (you are welcome to give it a try; I've implemented the original one). Since the surface area is much smaller now (and the scenario much less common), I think we can remove this assertion altogether. [1]: juanfont/headscale#2248 [2]: NixOS#358255
server_url check [has been loosened upstream][1] and backported to NixOS[2]. The new, much looser check, is not practical to be implemented in Nix (you are welcome to give it a try; I've implemented the original one). Since the surface area is much smaller now (and the scenario much less common), I think we can remove this assertion altogether. [1]: juanfont/headscale#2248 [2]: #358255 (cherry picked from commit de0a499)
Requirements here:
Fixes #2210