Every Sloppy Voice party has to turn a domain into a server before it can do anything else. A person types bob@guild.sloppyvoice.com, a server delivers a federated event, a push gateway checks a token: each first needs the server's base URL, metadata and public keys. Document 02 defines that step.

A successful resolution gives you:

  • the base URL, for example https://chat.sloppyvoice.com/server, under which every API path lives ({base}/meta, {base}/v1/...);
  • the ServerMetadata: name, icon, protocol versions, features, login providers, limits and endpoints;
  • the canonical domain, which is the domain you store and display;
  • the server's signing keys;
  • the evidence level, which says how strongly the delegation was authenticated.

Address syntax and canonicalize() are on Addresses. Problem objects, rate limits and versioning are on HTTP API.

Two statements make a binding

A domain is bound to a server only when two independent statements agree (02 §8.1):

  1. The domain owner says "my users live at this URL", through a DNS TXT record at _sloppyv.<domain> or an HTTPS document at https://<domain>/.well-known/sloppyv. This is the delegation.
  2. The server says "I serve this domain", by listing it in the domains member of its metadata.

Either statement alone can be forged by someone who controls only one side: without the second, a stranger could point their own domain at your server and gain addresses there; without the first, a server could claim any domain (02 §2).

  user types  bob@guild.sloppyvoice.com
                         |
   delegation   _sloppyv.guild.sloppyvoice.com TXT  --none-->  https://guild.sloppyvoice.com/.well-known/sloppyv
                         |  "v=sv1 url=https://chat.sloppyvoice.com/server2"
                base URL https://chat.sloppyvoice.com/server2         evidence: same-site
                         |
   metadata     GET https://chat.sloppyvoice.com/server2/meta  ->  ServerMetadata
                         |
   checks       guild.sloppyvoice.com in domains?              -> else discovery.domain_not_served
                canonicalDomain resolves to the same base URL? -> else discovery.canonical_mismatch
                pin (servers): same base URL and keys, or an accepted change? -> else suspend
                         |
   result       DiscoveryResult { baseUrl, canonicalDomain, evidence, metadata, keys }

Native clients, bots and servers query DNS themselves. Web clients can't send TXT queries, so they get the delegation from their home server through GET /v1/resolve and check the metadata themselves.

The _sloppyv TXT record

The discovery record for domain D is the set of TXT records at _sloppyv.D, where D is the lowercase A-label. It is never placed at the bare name, because a name that is a CNAME can't hold a TXT record, and the bare name is already crowded with SPF, DMARC and verification records (02 §3.1). The owner's deployment (02 §14):

_sloppyv.sloppyvoice.com.        3600 IN TXT "v=sv1 url=https://chat.sloppyvoice.com/server"
_sloppyv.chat.sloppyvoice.com.   3600 IN TXT "v=sv1 url=https://chat.sloppyvoice.com/server"
_sloppyv.guild.sloppyvoice.com.  3600 IN TXT "v=sv1 url=https://chat.sloppyvoice.com/server2"

sloppyvoice.com and chat.sloppyvoice.com reach one server (canonical sloppyvoice.com, alias chat.sloppyvoice.com). guild.sloppyvoice.com is a separate server with its own community on the same origin.

Syntax

The record text is the concatenation of a record's character-strings with nothing between them, so a long URL can be split anywhere (02 §3.2):

sv-record     = *WSP version-tag 1*( 1*WSP sv-param ) *WSP
version-tag   = "v=sv1"
sv-param      = url-param / ext-param
url-param     = "url=" base-url              ; exactly once per record
ext-param     = param-name "=" param-value   ; ignored by v1 consumers
param-name    = ALPHA *( ALPHA / DIGIT / "-" )
param-value   = 1*VCHAR

A record whose first whitespace-separated token isn't v=sv1 (case-insensitive) is foreign and ignored; v=spf1 -all, v=sv2 url=... and v=sv1url=... are all foreign. A record that starts with v=sv1 is valid only if every other token is a name=value parameter, url appears exactly once, no parameter name repeats, the text is at most 1,024 octets and contains only printable ASCII and tabs, and the URL is a valid base URL. Otherwise it is malformed. Unknown parameters are ignored.

Then decide on the whole RRset (02 §3.4):

The RRset contains Outcome
Nothing (NXDOMAIN or NODATA), or only foreign records No record: try .well-known (case W-a).
One sv1 record that is valid, or several valid ones that all normalize to the same base URL Delegation, source txt.
Any malformed sv1 record, or valid ones with different base URLs discovery.record_invalid. Do not try .well-known.
SERVFAIL (including DNSSEC "bogus"), REFUSED, timeout, or an unretryable truncated answer Temporary DNS failure: try .well-known (case W-b).

Warning

A broken record is an error, not a reason to fall back. The operator clearly meant to publish one, and a silent fallback would hide the mistake and make verifiers disagree depending on which source they tried (PD-02-1).

Worth unit-testing, from 02 §20.1:

TXT RRset Outcome
"v=sv1 url=https://chat.sloppy" "voice.com/server" Delegation to https://chat.sloppyvoice.com/server.
"V=SV1 URL=https://Chat.SloppyVoice.com:443/server/" The same delegation.
"v=sv1" discovery.record_invalid, reason: malformed.
"v=sv1 url=http://chat.sloppyvoice.com/server" discovery.record_invalid, reason: bad_url.

DNS details (02 §3.5):

  • _sloppyv.D may be a CNAME, so aliases can follow the canonical record. A chain longer than 8 links is a temporary failure.
  • The timeout is 5 s per attempt, at most 2 attempts, 10 s in total.
  • The delegation's lifetime is the smallest TTL in the answer, including every CNAME, clamped to [300 s, 86,400 s].
  • A server must not treat the AD bit from a resolver reached over an unauthenticated network path as validation. Servers should use a validating resolver on the same host or one reached over DNS over TLS or HTTPS.

Base URL normalization

Base-URL equality decides whether two domains are the same server, so every party that stores, compares, pins or signs a base URL uses the normalized form (02 §3.3). A base URL is https only, with a DNS host of at least two labels, an optional port and a path; it has no userinfo, query, fragment or IP address, and is at most 512 octets.

normalizeBaseUrl() lowercases the scheme and host, removes one trailing . from the host, strips leading zeros from the port and then drops port 443, normalizes percent-encoding, and removes one trailing /. It fails on dot segments, //, single-label hosts, and hosts whose last label is all digits or starts with 0x, because browsers parse those as IPv4. Paths stay case-sensitive. From 02 §20.2:

Input Result
HTTPS://CHAT.SloppyVoice.COM.:443/server/ https://chat.sloppyvoice.com/server
https://chat.sloppyvoice.com:0443/server https://chat.sloppyvoice.com/server
https://chat.sloppyvoice.com/%7eserver/a%2fb https://chat.sloppyvoice.com/~server/a%2Fb
https://chat.sloppyvoice.com/Server Unchanged; a different server from /server
https://2130706433/server Fails (browsers read it as 127.0.0.1)

The .well-known fallback

A domain owner who can't publish TXT records, or who wants stronger evidence for a delegation to a provider's hostname, serves a two-member document at https://D/.well-known/sloppyv (02 §4.1, WellKnownDocument):

{ "v": "sv1", "url": "https://chat.sloppyvoice.com/server" }

A v other than "sv1" means absent. A document that isn't a JSON object, lacks or mistypes a member, has a bad url or exceeds 4,096 octets is invalid. Fetch it over HTTPS with normal certificate validation, follow up to 3 HTTPS redirects (many domains redirect to www, and each hop is authenticated by TLS), never reject it for its Content-Type, and give up after 5 s to connect or 10 s in total (02 §4.2). The domain owner must serve it with Access-Control-Allow-Origin: * so web clients can read it.

Outcome When
present 200 with a valid body.
invalid 200 with an invalid body.
absent 404 or 410; a redirect to non-HTTPS, a fourth redirect or a loop; or D has no A or AAAA record.
unavailable Connection, timeout or TLS failure, 429, 5xx, or any other status.

The TXT record takes precedence. The document is consulted in exactly three cases (02 §4.3):

Case Who Result
W-a: no record Everyone Present: delegation, source wellknown. Invalid: discovery.record_invalid. Absent: discovery.not_found. Unavailable: discovery.server_unreachable without data.baseUrl.
W-b: temporary DNS failure Everyone Present: delegation, source wellknown, fresh for at most 300 s. Invalid: discovery.record_invalid. Absent or unavailable: discovery.dns_failure.
W-c: a valid record whose evidence would otherwise be dns-only Servers MUST; native clients SHOULD for their home server at sign-in Same URL: evidence wellknown. Different URL: discovery.delegation_conflict. Anything else: evidence stays dns-only.

Delegation evidence

Every resolution records one evidence level: the first of these tests that passes (02 §9.1).

Order Level Test
1 dnssec Source txt, and a validating resolver you trust returned the whole answer as Secure. Web clients never record it.
2 same-site The base-URL host H equals D, or registrableDomain(H) equals registrableDomain(D).
3 wellknown Source wellknown, or source txt and the W-c check agreed.
4 dns-only Always.

registrableDomain() uses the Public Suffix List with both the ICANN and PRIVATE sections, so alice.github.io and bob.github.io are different sites. Servers refresh the list at least every 30 days (SHOULD) and never use one older than 180 days (02 §9.3).

dns-only means anyone on the resolution path could have forged the answer; it is still accepted at first contact and then pinned (D-074). same-site assumes one party controls the whole registrable domain, which isn't true of shared university or company domains, so it counts as strong for pin changes only in limited cases (02 §9.2). Evidence matters when a pin changes, and is never shown to ordinary users.

The resolution algorithm

resolve(D) for native clients, bots, servers and push gateways (02 §5.2):

  1. Validate. D is a lowercase A-label of at most 253 octets with at least two labels, not an IP address and not a special-use name (localhost, local, internal, invalid, test, example, arpa, alt, onion and the rest of the IANA registry). Otherwise discovery.invalid_domain.
  2. Cache. A server whose pin for D is suspended fails with discovery.peer_suspended. Otherwise return a fresh cached result or a negative entry's error. A re-check skips this step.
  3. Coalesce concurrent resolutions of one domain.
  4. Delegation. Process the TXT record and .well-known as above, giving a candidate base URL B.
  5. Target check (servers only). Refuse with discovery.forbidden_target any address that isn't globally reachable (loopback, private-use, link-local, shared, multicast, unspecified, documentation and benchmarking ranges, and IPv4-mapped forms of these), including after redirects; an admin may allowlist specific internal hosts. Strangers choose these URLs through DNS, so this is server-side request forgery protection (02 §5.6). Clients don't apply it.
  6. Evidence, including the W-c check.
  7. Metadata. Fetch and validate GET B/meta. Connection, TLS, timeout, 5xx or 429 give discovery.server_unreachable; anything else, including a redirect, gives discovery.metadata_invalid.
  8. Domain check. D must be in domains, else discovery.domain_not_served.
  9. Canonical check (below).
  10. Pinning. Servers must apply their pin for D; clients apply theirs (see "Pins" below).
  11. Store and return.

Steps 4–9 must not be reordered, except that the /meta fetch may run in parallel with the W-c fetch.

The canonical-domain check

Let C be metadata.canonicalDomain. If C equals D, the check passes. Otherwise run the full resolve(C), including its pinning step, and require the same base URL (02 §5.3). If resolve(C) fails, D fails with the same error, so temporary errors and suspensions propagate unchanged. discovery.canonical_mismatch means resolve(C) succeeded with a different base URL.

Without this check, a server reached through any domain its operator controls could claim any canonical domain, and canonicalize() would show bob@evil.example as bob@sloppyvoice.com. Running C's pinning step stops an attacker who controls DNS for C and a never-contacted alias from bypassing C's pin (vectors C1–C3, 02 §20.6).

Timeouts

From 02 §5.5:

Item Value
DNS query 5 s per attempt, 2 attempts, 10 s total
.well-known fetch 5 s connect, 10 s total, 4,096 octets, 3 redirects
/meta fetch 5 s connect, 10 s total, 262,144 octets, no redirects
Whole resolution, including the canonical check 30 s; on expiry, the error of the step in progress
Server outbound resolutions 10 per second by default

A server never retries within one resolution; callers retry by their own rules and the negative cache.

Web clients and /v1/resolve

Browsers can't query TXT records, so a web client borrows its home server's resolver (D-029). Each web build knows the base URL of the server that served it, the bootstrap server; before sign-in that is the web client's home (02 §5.4).

GET /v1/resolve takes one required domain parameter in A-label or U-label form. Authentication is optional; anonymous calls are limited to 30 per 60 s per IP address and authenticated ones to 120 per 60 s per session, after which you get 429 core.rate_limited. A missing or repeated domain parameter gets core.invalid_request. The server runs its own full resolve(), including the W-c check, target restrictions, the canonical check and its pin state, and returns only the result, never raw DNS records or documents, because it isn't a general proxy (02 §6). Responses carry Cache-Control: private, max-age=<seconds until expiresAt>. 02 §6.1 applies this to authenticated calls too, while 03 §2.3 requires no-store on authenticated responses, and neither says which rule wins.

GET /server/v1/resolve?domain=guild.sloppyvoice.com HTTP/1.1
Host: chat.sloppyvoice.com
Origin: https://app.sloppyvoice.com
{
  "domain": "guild.sloppyvoice.com",
  "baseUrl": "https://chat.sloppyvoice.com/server2",
  "canonicalDomain": "guild.sloppyvoice.com",
  "source": "txt",
  "evidence": "same-site",
  "resolvedAt": "2026-12-04T09:12:03.418Z",
  "expiresAt": "2026-12-04T10:12:03.418Z",
  "stale": false
}

In a ResolveResult, treat an unknown source as wellknown and an unknown evidence as dns-only. expiresAt is the earlier of the delegation and metadata expiry, and never more than 86,400 s after the response. stale: true means the server is using a stale copy because the target is unreachable. Errors are problem objects carrying data.domain and, where one was found, data.baseUrl (02 §6.4):

{
  "type": "urn:sloppyv:error:discovery.domain_not_served",
  "code": "discovery.domain_not_served",
  "title": "That server doesn't serve this domain",
  "status": 404,
  "detail": "chat.sloppyvoice.com/server2 doesn't list sloppyvoice.com among its domains.",
  "retryable": false,
  "retryAfterMs": null,
  "userAction": "none",
  "data": { "domain": "sloppyvoice.com", "baseUrl": "https://chat.sloppyvoice.com/server2" }
}

webResolve(D):

  1. Validate D and check your cache.
  2. Call GET {home}/v1/resolve?domain=D, with the session token if signed in.
    • 200: take baseUrl, canonicalDomain, source and evidence.
    • Any discovery.* error, or 429: this is the answer. Retry /v1/resolve later if it is retryable.
    • No usable answer (network error, timeout, a 5xx that isn't a discovery.* problem, or core.unavailable): go to step 3 if DNS-over-HTTPS is configured, else fail with discovery.server_unreachable.
  3. Optional DNS-over-HTTPS. Query _sloppyv.D TXT through a CORS-enabled RFC 8484 resolver, process it as a native client would, and fetch .well-known directly (absent if CORS blocks it). Never record dnssec, because you can't validate it.
  4. Check the metadata yourself. Fetch baseUrl/meta, validate it, check that D is in domains and that canonicalDomain matches the ResolveResult. On the DNS-over-HTTPS path, run the full canonical check yourself.
  5. Apply client pinning, cache, and return.

Warning

Never use DNS-over-HTTPS to get around an answer the home server gave you. If the home server reached the question, its pins have spoken, and DNS-over-HTTPS would bypass them exactly when they detect an attack (PD-02-4).

The home server supplies only the delegation. Keys, the domain list and the canonical domain come from your own /meta fetch, so a lying home server can do no more than a DNS attacker (02 §21.6).

No-contact flows. Before a message request is accepted (see Direct messages), any client must not fetch the sender's server's /meta or .well-known and must not create or change a pin for it. Use the keys your home server supplies and GET {home}/v1/resolve for display, and run the full resolution once contact is allowed (02 §5.8).

Discovery errors

From 02 §17. Definitive errors discard the cached result and create a negative entry; temporary ones let you keep a stale result (02 §13.2). unknown_key and key_unusable come from key lookup, not resolution, so they carry iss and kid instead of domain.

Code HTTP Kind data
discovery.invalid_domain 400 Definitive (not cached) domain
discovery.not_found 404 Definitive domain
discovery.record_invalid 502 Definitive domain, reason
discovery.delegation_conflict 502 Definitive domain, txtBaseUrl, wellknownBaseUrl
discovery.dns_failure 503 Temporary domain
discovery.server_unreachable 503 Temporary domain, baseUrl (absent in case W-a)
discovery.metadata_invalid 502 Definitive domain, baseUrl, reason
discovery.domain_not_served 404 Definitive domain, baseUrl
discovery.canonical_mismatch 502 Definitive domain, baseUrl, canonicalDomain
discovery.version_unsupported 502 Definitive domain, baseUrl, versions
discovery.forbidden_target 502 Definitive domain
discovery.peer_suspended 503 wait, retryAfterMs 900,000 domain
discovery.unknown_key 400 retry, retryAfterMs 60,000 iss, kid
discovery.key_unusable 400 Not retryable iss, kid, reason

Present them in four groups (02 §5.7; exact copy on Client requirements):

  • invalid_domain, not_found: there's no Sloppy Voice server at this address; check the spelling.
  • domain_not_served: this server doesn't host that address.
  • record_invalid, delegation_conflict, metadata_invalid, canonical_mismatch, version_unsupported: the server isn't set up correctly right now, with the contact.admin link when known.
  • Everything else: the server can't be reached right now, with automatic retry. unknown_key and key_unusable never reach users.

Note

Discovery never produces a security warning. Pin conflicts, key rotations and evidence levels aren't in the warning catalogue, and server key rotation is on the never-prompt list; conflicts go to admins and diagnostics (02 §5.7).

ServerMetadata

GET /meta returns the ServerMetadata. It is unversioned so a client of any version can learn which versions the server speaks (02 §7.1). It needs no authentication, is identical for every requester, allows any origin, and is at most 262,144 octets. It answers GET and HEAD. Servers send Cache-Control: max-age between 300 and 86,400 (3,600 recommended) and should send an ETag; a server that sends one must answer If-None-Match with 304. It is never redirected: a 3xx is discovery.metadata_invalid, because the base URL is the server's identity and metadata served from elsewhere would let the two disagree.

The example from 02 §7.5, with keyChain shortened as in the spec and only part of limits:

{
  "canonicalDomain": "sloppyvoice.com",
  "domains": ["sloppyvoice.com", "chat.sloppyvoice.com"],
  "name": "Sloppy Voice",
  "description": "The original Sloppy Voice community. Everyone welcome.",
  "icon": "https://chat.sloppyvoice.com/server/static/icon-256.png",
  "secure": false,
  "securedAt": null,
  "versions": ["1.0"],
  "minClient": "1.0",
  "features": ["voice-dc/1", "video-dc/1", "sfu-rtp/1", "webhooks"],
  "keys": [
    { "kty": "OKP", "crv": "Ed25519", "x": "1QEvvbfolRXg51y9hdJWQb43G4Z1oOcbXi6vYLAezoE",
      "kid": "sloppyvoice.com#2026-01a", "purpose": "sign", "status": "retired",
      "nbf": 1767571200, "exp": 1796601600, "retiredAt": 1795996800 },
    { "kty": "OKP", "crv": "Ed25519", "x": "lrh-xA3rlW5M_Ob4qj07SRjWjzB28938Ikff1p7cESA",
      "kid": "sloppyvoice.com#2026-11a", "purpose": "sign", "status": "active",
      "nbf": 1795996800, "exp": 1827532800 },
    { "kty": "OKP", "crv": "Ed25519", "x": "dcf9usCLfKyLiK9JRshBFlW6lYpsXTpIfCh34idTeLY",
      "kid": "sloppyvoice.com#mls-2026-01a", "purpose": "mls-external-sender", "status": "active",
      "nbf": 1767571200, "exp": 1799107200 },
    { "kty": "OKP", "crv": "Ed25519", "x": "rGji7yZg61-x0jmpHobbbxMCaqKuWM3QsoChKkACi6Y",
      "kid": "sloppyvoice.com#mls-2026-12a", "purpose": "mls-external-sender", "status": "next",
      "nbf": 1796472000, "exp": 1828008000 }
  ],
  "keyChain": [
    "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWtleXJvdCtqd3QiLCJraWQiOiJzbG9wcHl2b2ljZS5jb20jMjAyNi0wMWEifQ.eyJpc3Mi…",
    "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWtleXJvdCtqd3QiLCJraWQiOiJzbG9wcHl2b2ljZS5jb20jMjAyNi0xMWEifQ.eyJpc3Mi…"
  ],
  "endpoints": {
    "api": "https://chat.sloppyvoice.com/server",
    "relayUrl": "https://relay.sloppyvoice.com/r1",
    "push": {
      "gatewayPolicy": "any",
      "webPushKey": "BBfoyiKrPjLGj3FY3oY2Ld_qCa4DDW2MKjt-sJMSIIJbmCgRUdhB-P8Mc6fOahDpPu3LmPGM4JBZIcn8OyAPHA4"
    }
  },
  "auth": {
    "providers": [
      { "id": "google", "name": "Google", "type": "google" },
      { "id": "github", "name": "GitHub", "type": "github" },
      { "id": "staff", "name": "Sloppy Voice staff", "type": "oidc",
        "icon": "https://chat.sloppyvoice.com/server/static/staff.png", "signup": false }
    ],
    "registration": "open"
  },
  "limits": {
    "maxRequestBytes": 1048576,
    "maxEventBytes": 1048576,
    "maxMessageBytes": 16384,
    "maxAttachmentBytes": 26214400,
    "maxSecureLeaves": 1000,
    "maxGroupDmParticipants": 25,
    "maxDmRequestBytes": 65536
  },
  "links": {
    "join": "https://sloppyvoice.com/j{/local}{?invite}",
    "web": "https://app.sloppyvoice.com/",
    "terms": "https://sloppyvoice.com/terms",
    "privacy": "https://sloppyvoice.com/privacy"
  },
  "contact": {
    "operator": "Sloppy Voice",
    "admin": "mailto:admin@sloppyvoice.com",
    "abuse": "mailto:abuse@sloppyvoice.com",
    "security": "mailto:security@sloppyvoice.com",
    "url": "https://sloppyvoice.com/about"
  },
  "software": { "name": "example-server", "version": "2.0.0" },
  "updatedAt": "2026-12-04T09:00:00.000Z"
}

Ignore unknown members. Invalid cosmetic members (description, icon, contact, software, auth.providers[].icon, links.join, links.terms, links.privacy, links.help) are dropped instead of invalidating the document (02 §7.2). A few non-cosmetic members have their own rules, given below (links.web, providers[].signup, keys with an unknown purpose or status).

Identity

  • canonicalDomain is the one domain every stored and signed address on the server uses. It is in domains and never changes for the life of the server (02 §8.3).
  • domains lists 1–100 domains, no duplicates: the canonical domain plus aliases. A domain must not be in the domains of two servers of one deployment (02 §14).
  • name (1–64 code points) equals the community name.
  • securedAt is null exactly when secure is false, and secure never goes from true back to false. Clients and servers pin it; see Secure accounts.

Versions, minClient and features

versions has one entry per major version served, giving its highest minor version ("1.0" or a later "1.x" for v1). Use the highest major version you share with the server, and don't rely on anything from a minor version higher than the one listed (03 §12.1). If no listed major version is one you implement (02 §7.4 step 5):

minClient is the lowest version a client must implement to use the server, normally "1.0". A client below it shows "update required" and uses that server for nothing beyond reading /meta; other servers keep working, and the metadata is still cached (03 §12.4).

features lists every feature the server implements, including the mandatory voice-dc/1 and video-dc/1. Ignore names you don't know. A session's effective features are the intersection of the server's list and yours (03 §12.2). Decide what exists from features and versions, never from software, which is for diagnostics only.

limits

limits holds non-negative integers named max<Thing><Unit>, each defined by its owning document; the registry is 00 §7.12. A server lists every registered limit and never advertises one below its floor. If a limit is missing or invalid, use its floor. Ignore unknown names. Never send anything larger than the advertised limit, and check before sending, so the person sees "This file is too large for this server (max 25 MB)" instead of an error after uploading (02 §7.3.3).

Member What to know
endpoints.api Must equal the normalized base URL you fetched from, else discovery.metadata_invalid (reason: api_mismatch).
endpoints.relayUrl Default media relay, connected at {relayUrl}/connect; a call-join response's relay wins. See Calls.
endpoints.push gatewayPolicy any or listed (unknown means listed), gateways when listed, optional VAPID webPushKey. See Notifications.
auth.providers 0–16 OIDC providers in display order: id, name, type (unknown means oidc), optional icon and signup (absent means true). See Accounts.
auth.registration open, invite or closed; unknown means closed.
links.join RFC 6570 template for HTTPS share links. Its host must be the endpoints.api host or one of domains, checked by resolution, never by a same-site test. Treat an invalid template as absent.
links.web Not cosmetic: its origin identifies the server's own web client, which decides where a secure account's keys may be held. An invalid value matches no origin.

A mobile build can only receive pushes through its publisher's gateway, so a client whose gateway is missing from a listed policy can warn before sign-in that notifications won't arrive (02 §7.3.1).

Validation

Validate metadata fetched from base URL B in this order; failures are discovery.metadata_invalid with a reason unless noted (02 §7.4):

  1. A JSON object of at most 262,144 octets, valid I-JSON, no duplicate members.
  2. Every required member present and valid; invalid cosmetic members dropped.
  3. canonicalDomain valid and in domains.
  4. endpoints.api equals B.
  5. A supported major version in versions.
  6. minClient checked ("update required", not a failure).
  7. keys follows the key-set rules below.
  8. secure is true exactly when securedAt isn't null.
  9. Every keyChain element is a compact JWS of at most 2,048 octets with alg EdDSA and typ sv-keyrot+jwt, in n order. Signatures are checked only when the chain is used.

Server keys

Each element of keys is a ServerKey, an Ed25519 public JWK (02 §11.1):

Member Rule
kty, crv, x "OKP", "Ed25519", and base64url of exactly 32 octets, canonically encoded and not of small order.
kid <canonicalDomain>#<key-id>, where key-id is 1–32 of ALPHA / DIGIT / "." / "_" / "-", case-sensitive and never reused.
purpose sign or mls-external-sender. Ignore a key with another value.
status next, active, retired or revoked. Ignore a key with another value.
nbf, exp NumericDate integers, nbf < exp ≤ nbf + 63,158,400 (731 days).
retiredAt Required when retired; nbf ≤ retiredAt < exp.
rvt Required when revoked: the earliest moment the key may have been compromised.

A key containing the private member d invalidates the whole document (reason: private_key_published), and you should tell your own admin. Never fetch anything x5u or jku point to.

Note

Keys are identified by RFC 7638 thumbprint. A kid is only a lookup hint, and a known kid bound to a different thumbprint is a new key (02 §11.2).

The sign key signs every JWS a server produces: HomeAssertions and S2S tokens (Federation), IdentityStates, RelayTickets, push gateway tokens and KeyRotations. The mls-external-sender key signs MLS messages the server sends as a group's external sender and never signs a JWS (MLS and sealed messages). Every server publishes both, because every server supports secure mode. One public key must never be published with two purposes or by two servers (02 §11.3).

A keys array is valid only if it has 1–16 elements, no shared kid or thumbprint, every kid domain equal to canonicalDomain, exactly one active and at most one next key per purpose, every active key with nbf ≤ now + 60 s and exp > now, and retiredAt or rvt where required. Otherwise reason: invalid_keys (02 §11.5).

Looking up a key

Anything that verifies a server-signed JWS gets the key with serverKey(iss, kid, "sign", iat) (02 §11.6). KeyRotations are verified by chainAccepts() instead, and MLS external-sender messages by 13 §6.2. The steps:

  1. The kid domain must equal iss, else discovery.unknown_key.
  2. Resolve iss. It must be the canonical domain; an alias fails with address.non_canonical. A server whose pin for iss is suspended doesn't resolve: it uses only the pinned keys and skips step 4, so a key that isn't in the pin fails with discovery.peer_suspended.
  3. Look up kid in your pin, or in your cached metadata if you keep no pin.
  4. Unknown kid: re-check iss with Cache-Control: no-cache, at most once per 60 s per domain however many unknown kids arrive. If the re-check suspends the domain: discovery.peer_suspended. Still unknown: discovery.unknown_key.
  5. Usability, with ±60 s skew: the purpose matches; the status is next, active or retired and not revoked; now ≤ exp; iat ≥ nbf; a next key needs now ≥ nbf; a retired key needs iat ≤ retiredAt; and a stale result that expired more than 24 h ago only verifies objects with iat before that expiry. Otherwise discovery.key_unusable with a reason (wrong_purpose, revoked, expired, not_yet_valid or stale).
  6. Verify the JWS as Cryptography describes.

Federation and push map these failures to their own codes; where a JWS type's owner names no code, return the discovery.* code, not crypto.unknown_key. When the JWS is the request's credential, the status is 401.

Key rotation

Lifecycle

            publish (nbf >= now + 25 h)        at or after nbf            exp >= retirement + 7 days
  (new) ──────────────────────────────> next ─────────────────> active ─────────────> retired ──────> (removed after exp)
                                          \                       |                     |
                                           \______________________|_____________________|______> revoked (rvt)

From 02 §11.4:

  • A new key appears as next with nbf at least 25 h away, and its KeyRotation is in keyChain from that moment. Metadata is cached for at most 24 h, so every verifier that follows the rules sees the key before it is used.
  • At or after nbf the new key becomes active and the previous one retired, with exp at least 7 days later so that IdentityStates and offline verifiers can catch up.
  • A revoked key stays listed for at least 30 days and never returns.
  • Start a rotation no later than 8 days and 1 hour before the active key's exp, so the retiring key still has 7 days left. Servers should rotate each active key at least every 365 days and remove expired keys within 30 days.

KeyRotation and keyChain

A KeyRotation is a permanent JWS (typ sv-keyrot+jwt, at most 2,048 octets) in which the active sign key vouches for a new key and a base URL (02 §12.1). Vector R1 from 02 §20.5:

header:  {"alg":"EdDSA","typ":"sv-keyrot+jwt","kid":"sloppyvoice.com#2026-01a"}
payload: {"iss":"sloppyvoice.com","n":1,"iat":1795903200,"prev":"vxp4YsK2h0e_z-1ZPEZt4ouuPgPZvY5UG5jZVDf80rg","key":{"kty":"OKP","crv":"Ed25519","x":"lrh-xA3rlW5M_Ob4qj07SRjWjzB28938Ikff1p7cESA","kid":"sloppyvoice.com#2026-11a","purpose":"sign"},"url":"https://chat.sloppyvoice.com/server"}

n counts from 1, prev is the signer's thumbprint, key has exactly kty, crv, x, kid and purpose, and url is the base URL the server authorises from now on; once a rotation names a new base URL, every later rotation of any purpose names the same URL until the server moves again. mls-external-sender keys are also vouched for by the active sign key, so sign keys are the single root of continuity. keyChain lists the rotations in n order with no gaps: every one from the last 400 days, at least the 16 most recent, at most 64 (02 §12.2).

A verifier with a pin uses chainAccepts() (02 §12.3) to learn which new keys its pinned keys vouch for:

  • Walk forward from the pin's chain head. Each new element must be signed by a pinned next or active sign key, or one vouched for earlier in the run, matched by both kid and prev. The first element that doesn't match ends the run. An element that matches but whose signature or claims fail stops the walk with status failed.
  • A different element at the pinned head's n is a fork; a chain that ends before it is a rollback. Neither vouches for anything.
  • Retired and revoked keys can't vouch for anything new, so a key that leaks later can't extend the chain.
  • Only the highest element's url counts. The chain is URL-bound to a base URL when that element's url equals it and the element was accepted in this run or is the pinned chain head.

Vectors V1–V10 in 02 §20.5 cover rotation, a move, kid collisions, wrong-purpose signers, bad signatures, revoked signers, forks and rollbacks. Run all of them.

Compromise

When a private key is compromised, the server marks it revoked with rvt, activates a replacement at once (waiving the 25 h rule), sends discovery.metadata_changed with urgent: true within 10 s, and warns its admin that peers holding weak-evidence pins will suspend. A revoked key can't vouch for its successor, because a thief can sign backdated rotations (02 §11.7).

Once you learn a sign key is revoked, accept nothing newly presented under it, whatever its iat. You may keep an object you verified yourself before rvt − 60 s until its own expiry; discard and refetch everything else. A server may keep a standby sign key published as next, stored offline; peers have already pinned it, so activating it after a compromise needs no evidence.

Caching

From 02 §13.1:

Item Cache key Lifetime
Delegation from TXT Queried domain Smallest TTL, clamped to [300 s, 86,400 s]
Delegation from .well-known Queried domain max-age, else Expires, else 3,600 s, clamped to [300 s, 86,400 s]; at most 300 s after a DNS failure
ServerMetadata Normalized base URL max-age, else Expires, else 3,600 s, clamped to [300 s, 86,400 s]
ResolveResult (web) Queried domain Until expiresAt

A result is fresh while both halves are; refresh each on its own, using If-None-Match for metadata. Every refetch that bypasses your cache sends Cache-Control: no-cache.

Temporary failures. You may keep using an expired result with stale: true for up to 7 days, retrying with backoff. Stale keys verify objects signed before expiry for the whole 7 days, but newly signed objects only for the first 24 h (02 §13.2).

Definitive failures discard the result and create a negative entry; pins are not affected (02 §13.2, 02 §13.3):

Outcome Negative entry
discovery.not_found DNS negative TTL, clamped to [60 s, 900 s]; 300 s if unknown
discovery.invalid_domain Not cached
Other definitive failures 300 s
Temporary failures 30 s, doubling up to 300 s

A person's explicit "Try again" may bypass a negative entry once per 10 s per domain.

Refresh early (02 §13.4) on an unknown kid, on a discovery.metadata_changed event, on a TLS failure or refused connection at the base URL, on a 404 or 410 from /meta (or from a /v1/... endpoint without a registered problem body), and on discovery.domain_not_served for a domain you thought the server served. Each trigger is limited to once per 60 s per domain, and the unknown-kid and event triggers share one limit. A refetch the limit holds back for a discovery.metadata_changed event is deferred to the end of the 60 s window, never dropped.

discovery.metadata_changed

A server sends this within 60 s of a change to any member other than the cosmetic ones and updatedAt, or within 10 s when urgent (a key was revoked). It is ephemeral on the client WebSocket and also goes to peers over S2S. A server whose /meta sits behind a CDN or reverse proxy must purge or revalidate that cache before sending the event, so refetches see the new document (02 §16.1):

{
  "v": 1,
  "t": "discovery.metadata_changed",
  "id": "01938f40-5a1b-7c2d-8e3f-405162738495",
  "ctx": "me",
  "ts": "2026-12-04T09:00:04.120Z",
  "d": { "canonicalDomain": "sloppyvoice.com", "updatedAt": "2026-12-04T09:00:00.000Z",
         "changes": ["keys"], "urgent": false }
}

Receivers refetch /meta with Cache-Control: no-cache, subject to the 60 s limit above. Clients first wait a random 0–30 s (0–5 s when urgent) so thousands of clients don't refetch at once. The payload is only a trigger; take no values from it. See Events.

Pins

A pin is the stored first-seen answer for a domain: canonical domain, base URL, secure flag, evidence, every non-revoked key with its public key, the revoked thumbprints, and a chain head (n and SHA-256 of one KeyRotation). A later answer that differs must be justified before it replaces the pin, which turns a later DNS attack into a visible conflict (02 §10.1).

A first contact is always accepted, at any evidence level (D-074). Pins aren't a cache and don't expire with TTLs; a server may delete one that hasn't been verified for 400 days.

Change rules

A candidate R is strong when its evidence is dnssec or wellknown, or same-site with a new host that is D, a subdomain of D, or the pinned host. Everything else is weak, including same-site between siblings such as cs.uni.edu and evil.uni.edu (02 §10.2).

Difference Accepted when
Keys removed, status or time changes, a known key now revoked Always
A revoked key reappears Never (key_unrevoked)
secure goes from true to false Never (secure_downgrade)
New keys The chain vouches for each with the same kid and purpose, or R is strong (else keys_changed)
A known key with a different kid or purpose R is strong (else keys_changed)
A new base URL The chain is URL-bound to it, or R is strong (else base_url_changed)
A new canonical domain for a canonical domain Never (canonical_changed)
A new canonical domain for an alias R is strong (else canonical_changed)
A forked chain R is strong (else chain_fork)

A weak base-URL change is accepted only through a URL-bound rotation, never because the new location publishes the same public keys, which anyone can copy (PD-02-6). If any difference is rejected, the pin stays unchanged and the domain is suspended, with reason the first that applies in this order: key_unrevoked, secure_downgrade, canonical_changed, chain_fork, chain_rollback, base_url_changed, keys_changed. chain_rollback (a keyChain that ends before the pinned head) replaces base_url_changed and keys_changed. One exception keeps a suspended pin honest: if the candidate came from the pinned base URL or is strong, keys it lists as revoked still move to the pin's revoked set (02 §10.2).

Suspension

While a domain is suspended, a server sends that domain's server nothing (outgoing events stay queued under 06's retry rules), verifies inbound requests from it only with pinned keys, and answers local operations and /v1/resolve for it with discovery.peer_suspended. It re-checks every 15 minutes, and also on an inbound S2S request from that server (at most once per 60 s). The pin resumes by itself if the answer returns to the pinned values or becomes acceptable (02 §10.3, 02 §10.4).

Admins receive discovery.peer_suspended (a PeerPin) and discovery.peer_resumed, and manage pins with the admin system role (Roles and moderation):

{
  "domain": "bobsclub.org",
  "state": "suspended",
  "canonicalDomain": "bobsclub.org",
  "baseUrl": "https://tenant8f2.voicehost.net/s",
  "secure": false,
  "evidence": "dns-only",
  "keys": [ { "kid": "bobsclub.org#k1", "thumbprint": "Pw3m1xYv8qLr0Tz5bN2cK7dH4sJ9fA6gE1uW3oR8iXk",
              "purpose": "sign", "status": "active" } ],
  "revoked": [],
  "firstSeenAt": "2026-06-01T10:00:00.000Z",
  "changedAt": "2026-06-01T10:00:00.000Z",
  "lastVerifiedAt": "2026-12-04T08:45:12.004Z",
  "suspendedAt": "2026-12-04T09:00:13.551Z",
  "reason": "base_url_changed",
  "observed": {
    "baseUrl": "https://203-0-113-7.cheap-hosting.example/sv",
    "canonicalDomain": "bobsclub.org",
    "secure": false,
    "evidence": "dns-only",
    "keys": [ { "kid": "bobsclub.org#k1", "thumbprint": "Pw3m1xYv8qLr0Tz5bN2cK7dH4sJ9fA6gE1uW3oR8iXk",
                "purpose": "sign", "status": "active" } ],
    "observedAt": "2026-12-04T09:00:13.551Z"
  }
}

Here the same key appears at a new base URL with weak evidence and no URL-bound rotation, so the server can't tell a move from an attack. Advise the admin to accept only after the peer's operator confirms the move directly.

Client pins and token binding

From 02 §10.6:

  • Keep pins (MUST) for every server where you hold a session token (home, remote or bot), and apply the change rules. Keep one (SHOULD) for every server whose keys verify IdentityStates for DM validation, and never accept an IdentityState for DM validation with keys that fail the change rules.
  • Bind tokens (MUST). Send a session token only to the normalized base URL that issued it. Move it to a new base URL only if your own pin accepts the change, so a DNS attacker never receives existing users' tokens.
  • On a rejected change, keep your pin, show the server as temporarily unreachable, retry, and report pin_conflict through /v1/diagnostics. Show no security warning.
  • Other servers recover when your home server's /v1/resolve returns the new base URL with stale: false and your own /meta fetch there validates with the same canonical domain. Then get a new remote session silently.
  • Your home server has no automatic recovery. Show "temporarily unreachable" and never a sign-in prompt, which would walk people into signing in to whatever server the unverified delegation names.
  • Web clients keep pins in origin storage. If it is cleared, the home server's pins still protect the delegation.

Secure contexts only

If the person signs out and in again on their own after a rejected home-server change, the client treats the domain as a first contact. A device that holds an identity key must confirm that the account's IdentityState is secure and names that key (igen and ikf) before any upgrade, reset, pairing or KeyBackup upload. If it doesn't, stop, and don't delete the old identity key, DSK, box key or vault keys (02 §10.6, Secure accounts).

Avoiding suspensions as an operator

Operators can avoid suspensions by choosing a delegation with strong evidence and moving servers the documented way (02 §10.4). A move done as 02 §15.6 describes is followed automatically and keeps users signed in: bring up the new base URL, rotate the sign key with a KeyRotation whose url is the new base URL at least 25 h before switching DNS, lower the record's TTL to 300 s, then switch the record and keep the old base URL serving for at least 24 h.

A delegation to a host that is your domain itself or a subdomain of it (for example a CNAME to the provider plus an ACME certificate for that hostname) gives peers same-site evidence that is strong for pin changes, without DNSSEC; a sibling host, such as guild.sloppyvoice.com → chat.sloppyvoice.com, is weak for pin changes. With a provider's hostname, publish the .well-known document or sign the zone with DNSSEC. A provider hostname with nothing else gives dns-only, which works but suspends federation on any later move or key emergency (02 §15.1). See Running a server and Security model.