Skip to content
PlatformMarkdown

Host names

The host names your realm answers on, each with a TLS certificate obtained and renewed for you.

AvailableAPI

A realm is reached by its host names: foobar.cvyuh.com, and others beside it, such as one per site. A request’s host name decides which realm answers it, so each host name belongs to one realm at a time. You list a realm’s host names when you create it and can change the list at any time; each one gets a TLS certificate, renewed for you.

  • Privilege: DELEGATE over the realm’s parent. Host names are set from the realm above: for a realm beneath yours, that’s you; for foobar itself, it’s whoever administers the realm above it, or Cvyūh.
  • Where: the API.
  • First: the realm’s id and rev, from GET https://foobar.cvyuh.com/api/v0/am/global/realms/v1, and your session in $CVYUH_SESSION (Call the API).

A realm’s host names are one list, changed as a whole: send the new list, and names that are new are claimed while names left out are freed for other realms. A realm created with no host names gets one of its own under cvyuh.com.

Certificates follow the list. A name one label beneath cvyuh.com, such as foobar-eu.cvyuh.com, is covered at once; a deeper one gets a certificate of its own. The realm answers HTTPS on a name once its certificate is ready, usually within minutes. A name just freed keeps its certificate for an hour, in case it’s claimed again.

Each host name is also its own issuer unless you set a base URL, so tokens name the host name the app signed in on.

Send the whole list:

Terminal window
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/global/realms/v1/<realm id> \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-H 'If-Match: "<rev>"' \
-d '{ "hostnames": ["foobar-engineering.cvyuh.com", "foobar-engineering-eu.cvyuh.com"] }'

The realm answers 200 with its hostnames, and which it claimed and freed. Leave out If-Match, or send If-Match: *, to change the list whatever its current revision.

AnswerCauseWhat to do
400, “a realm holds at most 3 hostnames”The list is longer than the realm’s limitSend fewer, or ask Cvyūh to raise the limit
409, “the hostname … is already in use by another realm”Another realm holds the nameChoose another name, or free it from the other realm first
400A reserved name, such as mtls, or a request that changes status and hostnames togetherChoose another name; send each change on its own

A user who opens a host name you’ve just freed reaches no realm. Tell users and apps before you take a name away.

WhatDefaultCan it change
Host names per realm3, not counting mtls. aliasesCvyūh raises it on request
Host names a realm gets when you give none1, under cvyuh.comGive your own list
Time for a new name’s certificateUsually minutes; a name one label beneath cvyuh.com at onceNo
Certificate kept after a name is freed1 hourNo
Domains certificates are obtained forcvyuh.com onlyYour own domains are planned
  • The browser shows a certificate error on a new name. Its certificate isn’t ready yet. Wait a few minutes and try again; a name one label beneath cvyuh.com avoids the wait.
  • Apps refuse tokens after you added a host name. Each host name is its own issuer. Set a base URL so every host name signs under one issuer.
  • A name on your own domain doesn’t work. Only names under cvyuh.com get a certificate. A CNAME from your own domain to a realm’s host name doesn’t work either, since the certificate doesn’t cover your name. See What’s next for realms.

A change to a realm’s host names is an UPDATED record on the realm’s audit trail, naming who made it and the list before. No API returns these records yet; ask Cvyūh support for them.

  • Certificate-bound clients get an mtls. alias. While the realm’s oauth2Settings.mtls is on, each of its host names gets an mtls. alias beside it, where clients present a certificate. It’s claimed and freed with its host name, and doesn’t count toward the limit. See Certificate-bound tokens.
  • Passkeys belong to a domain. By default a realm’s passkeys are bound to its first host name (its webauthnSettings.rpId). Settle the realm’s host names before users register passkeys: moving users to another domain, such as your own later, means registering their passkeys again.
  • Your own domains. Certificates for host names on your own domain, obtained and renewed the same way.