Skip to main content
A self-hosted Veriqa speaks HTTP and expects TLS to end at a proxy in front of it. This page lists what that proxy has to pass through. Trusting the proxy on the Veriqa side — the ForwardedHeaders section — is covered in self-hosted, step 6.

Give Veriqa a host name of its own

The simplest and recommended layout is a dedicated host name — auth.your-domain.com — that sends every request to Veriqa. Nothing has to be listed, nothing collides with your application, and a path added by a later release works without touching the proxy. That address is also the issuer your applications validate tokens against: an instance has one issuer, so applications on different domains — a staging site and a production one, for example — all point at the same address rather than each proxying Veriqa under its own domain. If you mount Veriqa on your application’s host name instead, you have two options. Pass every path of the table below: Veriqa then serves them from the root of the host name, so your application cannot use /_content/ and /hubs/ on it. Or keep the root for your application and put the whole of Veriqa under a path prefix.

Paths

/health/live, /health/ready and /health/channels are for your own monitoring and need not be published.
A list limited to /.well-known/, /connect/, /hubs/, /api/transaction/ and /_content/ is enough for a plain sign-in and looks complete. It stops being enough the day you ask for a phone number or an email, enable the Email channel, enable sign-in with a provider account such as Google, or switch a bot to Webhook: those pages, the provider’s return address and the webhooks live under /auth/ and /api/channels/.

WebSocket

The sign-in page learns through the /hubs/auth hub that the user has confirmed. The proxy must let the connection upgrade — pass the Upgrade and Connection headers and use HTTP/1.1 towards Veriqa — and must not close an idle connection before a sign-in can finish. When the upgrade does not get through, the page falls back to polling /api/transaction/{id}/status: the sign-in still completes, with a delay.

NGINX

When Veriqa shares the host name with your application, keep the body of the location block and repeat it for each prefix of the table instead of /:
The repository contains a complete configuration with TLS settings and an HTTP-to-HTTPS redirect: samples/docker-compose/nginx.conf (samples).

Limit requests per client address

The core counts its limits per route, per user and per client, never per address (see Preparing for production). The limit per address is set on the proxy, and two routes need it first:
  • /connect/authorize: a request creates a sign-in transaction;
  • POST /auth/email/start: a request sends a sign-in email. A GET to the same address only shows the Email form, so the limit counts only POST requests.
Add to the http context:
And to the server block:
What to keep in mind:
  • Only the two routes are counted. NGINX does not count a request with an empty key, and the map blocks leave the key empty for every other request. The sign-in page actions under /connect/authorize/callback, the form and the pages of email links are left to the core buckets.
  • The values are a starting point for one person or a household behind one address: up to 21 sign-ins at once, then one every 3 seconds; up to 6 emails at once, then one every 12 seconds. A request beyond that gets 429, the code the core itself returns when a bucket is used up, so one fail2ban rule covers both. Without limit_req_status, NGINX would answer 503.
  • Many users behind one address. An office often sends all its employees out through one NAT address, and a limit per address counts them as one visitor. List such addresses in the geo block with the value 1: the proxy does not limit them, and only the core buckets count them. To limit them as well, give them a zone of their own with a higher rate.
  • A load balancer in front of NGINX. $binary_remote_addr is then the address of the balancer. Restore the client address with the realip module (set_real_ip_from, real_ip_header).
  • Under a path prefix, add it to the paths in the map blocks: /auth/veriqa/connect/authorize. NGINX checks the path the browser requested, whether it then passes the prefix to Veriqa or trims it.

Under a path prefix

With a path prefix every address of Veriqa starts with it — https://app.your-domain.com/auth/veriqa/connect/token — and the root paths of the host name stay with your application. Set the prefix on the Veriqa host and repeat it in every public address you configure: Veriqa:PathBase starts with /, does not end with / and may have several segments. It is written as plain text: no ?, #, %, \, whitespace, and no . or .. segment. Any other value stops the host at startup; an empty one means the root. The prefix applies whichever way the proxy forwards the path — use one of the two blocks:
https://app.your-domain.com/auth/veriqa/.well-known/openid-configuration then returns the issuer and every endpoint with the prefix. A client that reads the metadata per RFC 8414 asks for it at the root of the host name, with the path of the issuer appended. Map that address:
This mapping is verified for a proxy that passes the path unchanged. With a proxy that trims the prefix the target is the same address without /auth/veriqa; that variant has not been verified. What to keep in mind:
  • A prefix that a path of Veriqa itself starts with — /auth, /api, /connect, /hubs, /_content, /health, or the path of hop links (/r by default, Veriqa:HopMode:HopPath) — works only when the proxy passes the path unchanged. Behind a trimming proxy such a prefix returns 404. /auth/veriqa is not one of them.
  • Requests that reach an instance directly carry no prefix — a health probe asks http://127.0.0.1:8080/health/live. Veriqa cannot tell such a request from one the proxy trimmed and serves both, so blocking outside access to the instance root is the proxy’s job.
  • Several instances. The proxy has to keep a browser on one instance (session affinity, ip_hash in NGINX): without it the hub of the sign-in page does not connect. The Email channel has a limit of its own — the multi-instance caveat in Channel setup, Email. Neither depends on the prefix.
  • Verified under a prefix: sign-in by Email in both modes with its inbound webhook, the messaging channel webhook (Webhook mode), the phone number request, confirming an email address with a code or with a message the user sends during claim enrichment, the tokens and userinfo, the form that collects a missing profile field, and a confirmation transaction created by your server.
Veriqa:PathBase is a setting of the shipped host. When Veriqa is embedded in your ASP.NET Core application, the prefix is the UsePathBase of that application, and discovery carries it.

Other proxies

Traefik, Caddy and IIS need the same three things: every path of the table, the X-Forwarded-Proto and X-Forwarded-For headers, and the WebSocket upgrade. Traefik and Caddy pass the upgrade without configuration; in IIS the WebSocket Protocol feature has to be installed. Under a path prefix, only the prefix needs to be passed instead of the paths in the table — see Under a path prefix.

Check

  • https://auth.your-domain.com/.well-known/openid-configuration returns https URLs on your host name. http URLs or invalid_request mean the proxy is not trusted — self-hosted, step 6.
  • On the sign-in page the browser’s network tab shows /hubs/auth answered with 101 Switching Protocols.
  • Request Header Or Cookie Too Large — raise large_client_header_buffers.