There are two kinds of branding, and they do not compete:
  • Per organization, at runtime (Enterprise). An organization’s admin sets its own product name, logo, colours and support contact in Settings → Branding, optionally turns on white label, and can give its people their own sign-in address. Nothing is rebuilt and nothing is restarted: the change shows on the next page load for everyone in that organization, in the dashboard, in the mail the organization’s members receive, and in the NHI Security console.
  • Per deployment, at build time. An operator renames the whole deployment with environment variables and dashboard build arguments. Every organization on it sees that identity unless it has its own.

Per-organization branding

Needs the custom_branding plan feature, which the Enterprise plan includes. A partner who resells the product to its own customers gets it as an entitlement override on each customer organization; there is no separate partner plan. Owners and admins (organization:manage) change it; every member sees the result.

Colours are checked against WCAG AA

A colour is refused, with the ratio in the message, when:
  • neither a white label nor the light theme’s text colour reaches 4.5:1 on it as a button (the fill is the same in both themes, so this holds in both);
  • the primary is under 4.5:1 on the light theme’s page and surface, where it is the link colour;
  • the accent is under 3:1 there, where it is a focus ring.
The dark theme’s variants are not asked for. They are derived by raising the colour’s lightness until it clears the same thresholds on the dark theme’s page and surface, so no stored colour can leave either theme illegible. The settings page lists every pairing with its ratio, and the API returns the same list (contrast on GET /api/v1/settings/brand).

Where it shows

Account mail that belongs to no organization (address verification, password reset) keeps the deployment’s brand. Mail links and the logo point at the organization’s verified custom domain. Until it has one, they point at the deployment’s own address, so a white-labelled organization’s mail is free of the deployment’s name only once its domain is verified.

White label

Off, an organization’s console and mail show its own name and add a small “Powered by” line naming the deployment’s product. On, nothing a member can read names the deployment’s product: the support-access card says “Platform support”, the Help menu offers the organization’s support contact instead of the deployment’s documentation, and the NHI Security console drops the deployment’s documentation link and support address. Tests render the dashboard shell, an invitation email and the NHI Security console under a foreign white-label brand and fail if TRUSTIVAN, TrustOwl or trustowl appears. What white label does not rename is listed under What cannot be rebranded: identifiers that are stored, signed or typed, such as database roles, cookie names and Go packages, keep their spelling. So do the names of artefacts a member copies from a setup dialog, such as the trustivan-collector IAM role and service account and the trustivan-runtime Helm chart, because they name published files.

If the plan lapses

The brand stops applying and the deployment’s brand shows again. Nothing is deleted, and nobody is locked out: the custom domain stops mapping to the brand, and sign-in still works on the deployment’s own address. Removing a logo and releasing a domain never need the plan.

Custom sign-in domain

An organization can give its people their own address, such as security.example.com, that shows its brand on the sign-in page.
  1. Claim it. In Settings → Branding → Custom sign-in domain, enter the hostname. The deployment’s own domain and its subdomains are refused.
  2. Prove it. Publish the TXT record the page shows: _domain-verification.<hostname> with the value domain-verification=<token>. A job checks every unverified domain every five minutes; Check now checks at once. Only one organization can hold a hostname verified; a claim alone blocks nobody.
  3. Point it. A CNAME (or A/AAAA records) for the hostname to the deployment’s edge. The certificate is obtained when the first visitor arrives (below).
Sign-in methods that hand off to another site (single sign-on, GitHub, Google) return to the deployment’s own address, because that is the callback registered with the provider, and passkeys are bound to WEBAUTHN_RP_ID. Password sign-in completes on the custom domain.

Serving custom domains at the edge

Custom domains need an edge that can obtain a certificate for a hostname it has never seen, and only for hostnames an organization has proven. With Caddy that is on-demand TLS with an ask endpoint. The API serves one: GET /internal/tls/ask?domain=<hostname> answers 200 only for a verified custom domain whose organization still has custom_branding, and 404 for anything else, so the edge never requests a certificate for a name nobody proved. It is outside /api/v1 and should be reachable only from the edge (on the internal network, as below).
api and dashboard are the Compose service names; use your own. Keep your deployment’s named sites above the catch-all. Do not publish /internal/tls/ask through the edge.

Per-deployment branding

What can be rebranded

The backend

Set these on every API and worker process and restart. Nothing is compiled in. All three addresses must be absolute http:// or https:// URLs. Anything else stops the process at startup with the variable named, because these are printed into messages your customers follow and a typo there is found by a customer. A trailing slash is removed. BRAND_NAME reaches, among others:
  • outbound mail subjects, bodies and the From display name;
  • the issuer an authenticator app files a TOTP account under;
  • the User-Agent on webhook and notification deliveries;
  • the messages kubectl prints when the admission webhook warns or refuses;
  • SCIM resource and authentication-scheme descriptions;
  • the notes and disclaimers in compliance reports;
  • validation and credential error messages that name the product.
A slug of the name is used where a string has to be a filename or an identifier: the producer field of SBOM and audit exports, and the audit export’s filename. The slug is the name in lower case with each run of characters other than letters and digits replaced by one hyphen, so Acme Secure becomes acme-secure. A name with no letters or digits falls back to trustivan. Mail needs one more setting to look like yours: SMTP_FROM is the envelope sender, and receivers reject mail from a domain you do not control. See Send mail through your SMTP relay.

The dashboard

The dashboard’s branding variables are all NEXT_PUBLIC_, which Next.js inlines into the build output. Setting them on a running container does nothing. They are build arguments, so a rebranded dashboard is its own image.
Run it from the repository root. API_PROXY_URL is not branding, but it is baked in the same way and every deployed dashboard image needs it. See Environment variables. Every value is validated, and an invalid one is dropped rather than applied. A malformed accent leaves your customers looking at the default palette, not at an error page. That also means a mistake is silent, so check the result:
  • Accents are HSL triples, not hex. Three numbers separated by spaces, the last two with percent signs. #3b82f6 is dropped.
  • Logos are fetched by the browser. data: and javascript: URLs are dropped. Host the image somewhere your users’ browsers can reach.
  • An empty or whitespace-only name leaves TRUSTIVAN.
An image built with none of these set is the ordinary TRUSTIVAN dashboard.
BRAND_NAME and NEXT_PUBLIC_BRAND_NAME are separate settings of separate programs, and nothing reconciles them. Set both to the same value, or the dashboard and the mail it triggers will disagree about what the product is called.

What cannot be rebranded

Licence attribution. The third-party notices shipped with the product and the attribution line in the dashboard are fixed text that no branding value reaches. They are an obligation of the licences TRUSTIVAN is built on, and the obligation holds whatever logo is in the corner. Identifiers an operator or an integration types. These keep their spelling under any brand, because each one is stored, signed, matched or scripted against:
  • environment variable names;
  • binary and image names;
  • the database roles trustowl_app and trustowl_job;
  • Prometheus metric names, which begin trustowl_;
  • cookie names such as trustivan_session;
  • HTTP header names, including the webhook signature headers your customers’ receivers verify.
The public website and this documentation. The TRUSTIVAN website is not part of a self-hosted deployment. Point WEBSITE_URL, DOCS_URL and their NEXT_PUBLIC_ counterparts at your own. NHI Security’s own default. The NHI Security console keeps the deployment’s brand in its own database and reads none of the variables on this page. A standalone NHI Security deployment changes it from the operator console: see Change the brand. Inside TRUSTIVAN, an organization’s own brand reaches that console through the session (above); the deployment default is the one its migrations set.

Check the result

For an organization’s brand:
  1. Save a name and a colour in Settings → Branding. The page repaints at once, and the tab title shows the name.
  2. Invite a test address. The mail’s From name, logo, button colour and footer are the organization’s.
  3. Open NHI Security from the product switcher. Its rail shows the name and logo.
  4. Once the domain is verified, curl -s -o /dev/null -w '%{http_code}' 'http://api:8080/internal/tls/ask?domain=<hostname>' from the edge host prints 200, and the sign-in page on that hostname shows the brand.
For the deployment’s:
  1. Load the dashboard. The wordmark and the tab title show your name, your logo sits beside it, and accent-coloured elements use your colour.
  2. Send yourself an invitation or a password reset. The subject and the From display name show your name.
  3. Enrol a second factor on a test account. The authenticator app files it under your name.
  4. Export an audit log. The filename begins with your slug.