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

Remove use_username_in_magic_dns option #2279

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This will also affect the way you [reference users in policies](https://github.c

### BREAKING

- Remove `dns.use_username_in_magic_dns` configuration option [#2020](https://github.com/juanfont/headscale/pull/2020)
- Remove `dns.use_username_in_magic_dns` configuration option [#2020](https://github.com/juanfont/headscale/pull/2020), [#2279](https://github.com/juanfont/headscale/pull/2279)
- Having usernames in magic DNS is no longer possible.
- Remove versions older than 1.56 [#2149](https://github.com/juanfont/headscale/pull/2149)
- Clean up old code required by old versions
Expand Down
9 changes: 0 additions & 9 deletions config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,6 @@ dns:
# # you can also put it in one line
# - { name: "prometheus.myvpn.example.com", type: "A", value: "100.64.0.3" }

# DEPRECATED
# Use the username as part of the DNS name for nodes, with this option enabled:
# node1.username.example.com
# while when this is disabled:
# node1.example.com
# This is a legacy option as Headscale has have this wrongly implemented
# while in upstream Tailscale, the username is not included.
use_username_in_magic_dns: false

# Unix socket used for the CLI to connect without authentication
# Note: for production you will want to set this to something like:
unix_socket: /var/run/headscale/headscale.sock
Expand Down
9 changes: 4 additions & 5 deletions hscontrol/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,22 +322,21 @@ func validateServerConfig() error {
depr.fatalIfNewKeyIsNotUsed("dns.nameservers.split", "dns_config.restricted_nameservers")
depr.fatalIfNewKeyIsNotUsed("dns.search_domains", "dns_config.domains")
depr.fatalIfNewKeyIsNotUsed("dns.extra_records", "dns_config.extra_records")
depr.warn("dns_config.use_username_in_magic_dns")
depr.warn("dns.use_username_in_magic_dns")
depr.fatal("dns.use_username_in_magic_dns")
depr.fatal("dns_config.use_username_in_magic_dns")

// TODO(kradalby): Reintroduce when strip_email_domain is removed
// after #2170 is cleaned up
// depr.fatal("oidc.strip_email_domain")
depr.fatal("dns.use_username_in_musername_in_magic_dns")
depr.fatal("dns_config.use_username_in_musername_in_magic_dns")

depr.Log()

for _, removed := range []string{
// TODO(kradalby): Reintroduce when strip_email_domain is removed
// after #2170 is cleaned up
// "oidc.strip_email_domain",
"dns_config.use_username_in_musername_in_magic_dns",
"dns.use_username_in_magic_dns",
"dns_config.use_username_in_magic_dns",
} {
if viper.IsSet(removed) {
log.Fatal().
Expand Down
1 change: 0 additions & 1 deletion hscontrol/types/testdata/base-domain-in-server-url.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ server_url: "https://server.derp.no"
dns:
magic_dns: true
base_domain: derp.no
use_username_in_magic_dns: false
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ server_url: "https://derp.no"
dns:
magic_dns: true
base_domain: clients.derp.no
use_username_in_magic_dns: false
2 changes: 0 additions & 2 deletions hscontrol/types/testdata/dns_full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ dns:

# you can also put it in one line
- { name: "prometheus.myvpn.example.com", type: "A", value: "100.64.0.4" }

use_username_in_magic_dns: true
2 changes: 0 additions & 2 deletions hscontrol/types/testdata/dns_full_no_magic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ dns:

# you can also put it in one line
- { name: "prometheus.myvpn.example.com", type: "A", value: "100.64.0.4" }

use_username_in_magic_dns: true
Loading