feat(registry): verified domains by DNS TXT record #355
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/341-verified-domains"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #341
An organisation proves a domain with a TXT record
torb-owner=<owner>at_torb.<domain>; the registry shows it as a badge on every package page of the owner (RELEASE.md 7.1).PUT/DELETE /api/1/owners/<owner>/domainwith a{domain}JSON body. Organisations only, roleowner, call classowners,Torb-Codewhere a second factor is set. DELETE takes a body on purpose: an owner holds several domains.domain:(sorted, space separated); the pages of the owner's released packages are rewritten on a change.REGISTRY_DNS_SERVERS(ip or ip:port, default: the system's) for deployments and tests.tools/registry/tests/domains.test.trbagainst a fake name server (verified, no record, other owner's record, NXDOMAIN, SERVFAIL, silent server, 409, limit, 400 names, 401/403/404, second factor, delete, badge on pages).Out of scope: re-checking a verified domain (#343), DNSSEC. No seed impact: no syntax, native, driver flag or std name changes.
Gates run in CI; locally only
torb check,torb format --checkon touched files and the new test.Approved at
fd737ff.domains.test.trbagainst a fake name server cover verified, no record, other owner's record, NXDOMAIN, SERVFAIL, silent server, 409, limit, 400 names, 401/403/404, second factor, delete, badge on pages, the owner file andREGISTRY_DNS_SERVERSparsing. CI green for this head (tier A/B, registry, gates, pdisc).domainis a PRIMARY KEY, so concurrent claims cannot double-book. The owner file,changedand package pages are rewritten together on claim and withdrawal.ownerandTorb-Codeare required, domain input is validated (IDNA, no IP, no localhost, 253 bytes), the quoted foreign record is truncated, page output is escaped, and the DNS limits are written into the RELEASE.md threat table ("A false badge")..env.exampleupdated; pdisc green.CREATE TABLE IF NOT EXISTS), no format change sincedomain:was already in the signed owner text.Non-blocking:
claimDomaintakes theTorb-Code(proved) before the lookup, so a failed lookup (422) uses up a one-time TOTP or recovery code. Consider checking the record first or not consuming the code on a lookup failure; with recovery codes this costs a code per typo.localhostlets names likefoo.localorfoo.internalthrough; harmless here (the proof still needs the record), but an operator-run resolver could answer for them.