Files
netbird/docs/custom-domain-validation.md
Maycon Santos b789ffbb9f [management] Expire unvalidated custom domain registrations (#7497)
Prevent unvalidated registrations from reserving domain names indefinitely.

Give pending registrations a 48-hour validation window and clean up expired entries at startup and every 60 minutes. Emit CustomDomainValidationExpired for each deletion and preserve registrations referenced by services.

Reject validation after expiry and prevent concurrent validation from recreating deleted registrations. Normalize domain names with the shared parser before registration.

Migrate existing pending registrations to receive a fresh 48-hour validation window.
2026-09-11 17:57:58 +02:00

29 lines
1.5 KiB
Markdown

A new custom domain name is converted to lowercase ASCII (punycode), with a
trailing dot removed, before availability and DNS validation checks. Invalid
names and wildcard registrations are rejected before storage.
A custom domain registration must complete validation within 48 hours of
creation. Retrying validation does not extend this window. Once validation
succeeds, the registration is exempt from this expiration policy.
Management removes expired, unvalidated registrations at startup and every
60 minutes. While management is running, removal normally occurs between
48 and 49 hours after registration. Validation is refused after the 48-hour
deadline even if cleanup has not yet removed the registration.
Removal releases the name for a new registration. The new registration must
complete its own validation. Its account does not inherit validation or
services from the expired registration.
The original account receives a system activity event named
`CustomDomainValidationExpired`, displayed as "Unvalidated domain registration
expired". The event includes the domain name, original registration ID, and
validation deadline.
On upgrade, existing unvalidated registrations receive a 48-hour validation
window. Restarting management does not extend a previously assigned deadline.
Registrations with existing services, including services using subdomains, are
retained for operator review. Management logs their account and domain IDs so
an operator can identify and resolve those dependencies before cleanup.