Tenancy: tenants verify the domain names they add (MT-24) #503

Merged
jcoffey-dev merged 1 commits from fix/tenant-domain-verification into main 2026-11-20 18:09:51 +00:00
Owner

A domain name a tenant administrator adds, as a new domain, a rename or an alias, now has to be verified before the server uses it, and every name counts toward the tenant's maxDomains.

  • x:Domain gets unverifiedNames and a read-only, server-set verificationToken. The stored Domain is version 4; names saved before stay as they are.
  • Until a tenant-added name is verified it takes no mail, isn't a local domain, signs nothing and gives no addresses to send as.
  • The tenant publishes a TXT record at _inbuxa-verification.<name> with inbuxa-verification=<token>, then takes the name off unverifiedNames. The save looks the record up and names it in the refusal if it's missing.
  • Names a server administrator adds need no record.
  • A domain counts as 1 plus its aliases toward maxDomains: on create, on an update that adds aliases (under the tenant's write lock from #501), and on a move into a tenant.
  • Spec: multi-tenancy MT-24. The domain form gets a Verification section.

Part of the inbuxa/inbuxa-admin#257 remediation (Refs inbuxa/inbuxa-admin#257).

Tests: registry stored-version tests, TXT matching unit tests, new tenant_tests cases; tenant, scim, undelete, legal_hold and jmap suites pass locally.

A domain name a tenant administrator adds, as a new domain, a rename or an alias, now has to be verified before the server uses it, and every name counts toward the tenant's `maxDomains`. - `x:Domain` gets `unverifiedNames` and a read-only, server-set `verificationToken`. The stored Domain is version 4; names saved before stay as they are. - Until a tenant-added name is verified it takes no mail, isn't a local domain, signs nothing and gives no addresses to send as. - The tenant publishes a TXT record at `_inbuxa-verification.<name>` with `inbuxa-verification=<token>`, then takes the name off `unverifiedNames`. The save looks the record up and names it in the refusal if it's missing. - Names a server administrator adds need no record. - A domain counts as 1 plus its aliases toward `maxDomains`: on create, on an update that adds aliases (under the tenant's write lock from #501), and on a move into a tenant. - Spec: multi-tenancy MT-24. The domain form gets a Verification section. Part of the inbuxa/inbuxa-admin#257 remediation (Refs inbuxa/inbuxa-admin#257). **Tests:** registry stored-version tests, TXT matching unit tests, new `tenant_tests` cases; `tenant`, `scim`, `undelete`, `legal_hold` and `jmap` suites pass locally.
jcoffey-dev added this to the 27.1 milestone 2026-11-20 17:43:06 +00:00
jcoffey-dev added 1 commit 2026-11-20 17:43:06 +00:00
Tenancy: tenants verify the domain names they add (MT-24)
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 13m10s
da404a513a
A domain name a tenant administrator adds, as a new domain, a rename
or an alias, now has to be shown to be the tenant's before the server
uses it, and every name counts toward the tenant's maxDomains.

- x:Domain gets unverifiedNames (948) and a read-only, server-set
  verificationToken (949); the stored Domain is version 4. Names saved
  before stay as they are.
- A name a tenant administrator adds is saved as unverified, and the
  domain gets a 32-character token. Until it's verified the name takes
  no mail, isn't a local domain, signs nothing, and gives no addresses
  to send as.
- The tenant verifies a name with a TXT record at
  _inbuxa-verification.<name> carrying inbuxa-verification=<token>,
  then takes it off unverifiedNames; the save looks the record up and
  names it in the refusal if it isn't there. Names a server
  administrator adds need no record, and a server administrator may
  clear or add entries.
- A domain counts as 1 plus its aliases toward maxDomains: on create,
  on an update that adds aliases (under the tenant's write lock), and
  on a move into a tenant.
- Spec: multi-tenancy MT-24. The domain form gets a Verification
  section.

Part of the inbuxa/inbuxa-admin#257 remediation.

Test: registry stored-version tests (version 3 reads back with no
unverified names); TXT matching unit tests; tenant_tests covers an
unverified alias, clears refused without the record and with a wrong
token, a clear with it, the token refused as client-set, aliases over
maxDomains, a tenant-created domain unverified as a whole, and the
server administrator's clear and alias. scim, undelete, legal_hold and
jmap suites pass.
jcoffey-dev merged commit a4723c51ab into main 2026-11-20 18:09:51 +00:00
jcoffey-dev deleted branch fix/tenant-domain-verification 2026-11-20 18:09:51 +00:00
Sign in to join this conversation.