Accept operator-named private TLDs through INBUXA_PRIVATE_TLDS #192

Merged
jcoffey-dev merged 1 commits from feat/private-tlds into main 2026-10-11 07:39:23 +00:00
Owner

A from-source user on the forum runs their own DNS under a TLD of their own. The setup wizard refused it: is_valid_domain (crates/utils/src/lib.rs) accepts only public suffixes and ten hardcoded private TLDs. The same check guards domains, addresses, identities, submission and the LDAP/SQL directory lookups, so it blocked them everywhere, not just at setup. Their TLD is also their directory's domain, so moving to .internal isn't an option.

Change: INBUXA_PRIVATE_TLDS (comma or space separated; multi-label suffixes such as home.arpa work; IDN is converted to ASCII) is read once and accepted alongside the built-in list. Everything else still gets the public-suffix check. It's an environment variable, like INBUXA_ADMIN_URL, because the wizard runs before any configuration exists.

Tests:

  • Unit: parsing and suffix matching (notmyownlab doesn't match myownlab).
  • tests/e2e/private_tlds.py (debug build, Docker): without the variable the wizard refuses home.myownlab; with INBUXA_PRIVATE_TLDS=myownlab the wizard completes, the admin signs in, a second domain and an account on it are created, and that account signs in; with the variable removed a new .myownlab domain is refused. All 7 checks pass locally.

Fork checks, rustfmt and cargo test -p utils pass locally. No translated strings.

Docs follow once this is in a release. Forum thread: https://community.coffeylabs.org/t/environment-settings-for-non-docker-install/94

A from-source user on the forum runs their own DNS under a TLD of their own. The setup wizard refused it: `is_valid_domain` (`crates/utils/src/lib.rs`) accepts only public suffixes and ten hardcoded private TLDs. The same check guards domains, addresses, identities, submission and the LDAP/SQL directory lookups, so it blocked them everywhere, not just at setup. Their TLD is also their directory's domain, so moving to `.internal` isn't an option. **Change:** `INBUXA_PRIVATE_TLDS` (comma or space separated; multi-label suffixes such as `home.arpa` work; IDN is converted to ASCII) is read once and accepted alongside the built-in list. Everything else still gets the public-suffix check. It's an environment variable, like `INBUXA_ADMIN_URL`, because the wizard runs before any configuration exists. **Tests:** - Unit: parsing and suffix matching (`notmyownlab` doesn't match `myownlab`). - `tests/e2e/private_tlds.py` (debug build, Docker): without the variable the wizard refuses `home.myownlab`; with `INBUXA_PRIVATE_TLDS=myownlab` the wizard completes, the admin signs in, a second domain and an account on it are created, and that account signs in; with the variable removed a new `.myownlab` domain is refused. All 7 checks pass locally. Fork checks, rustfmt and `cargo test -p utils` pass locally. No translated strings. Docs follow once this is in a release. Forum thread: https://community.coffeylabs.org/t/environment-settings-for-non-docker-install/94
jcoffey-dev added 1 commit 2026-10-11 07:31:04 +00:00
Accept operator-named private TLDs through INBUXA_PRIVATE_TLDS
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 7m46s
5b91c7827b
A domain is only accepted when its suffix is public or one of a fixed list of reserved private TLDs, so a network that runs its own DNS under a TLD of its own could not finish the setup wizard, add its domains or sign in its directory's users. INBUXA_PRIVATE_TLDS names extra suffixes (comma or space separated, multi-label allowed) that is_valid_domain accepts alongside the built-in ones. It is read from the environment because the wizard runs before any configuration exists.

tests/e2e/private_tlds.py boots the debug build and checks the wizard, a second domain, an account and its sign-in under a made-up TLD, and that the TLD is refused without the variable.

Raised on the forum: https://community.coffeylabs.org/t/environment-settings-for-non-docker-install/94
jcoffey-dev merged commit 5632b2a929 into main 2026-10-11 07:39:23 +00:00
jcoffey-dev deleted branch feat/private-tlds 2026-10-11 07:39:23 +00:00
Sign in to join this conversation.