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 the recommended layout is a dedicated host name — auth.your-domain.com — whose
every request goes 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 into the host name of your application instead, there are two ways. Pass every
path of the table below: Veriqa then serves them from the root of the host name, so /_content/
and /hubs/ are taken on it. Or keep the root to 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 or switch a bot to Webhook: those pages and
webhooks live under /auth/ and /api/channels/.
WebSocket
The sign-in page learns that the user has confirmed through the /hubs/auth hub. The proxy must
let the connection upgrade — pass the Upgrade and Connection headers and use HTTP/1.1 towards
Veriqa — and must not cut an idle connection sooner than a sign-in may last. 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 carries a complete configuration with TLS settings and an HTTP-to-HTTPS redirect:
samples/docker-compose/nginx.conf (samples).
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. A value of
another form 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 by 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 as it is. 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 as it is. Behind a trimming proxy such a prefix answers
404. /auth/veriqa is not one of them.
- Requests that reach an instance directly go without the 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 closing the root of the instance from the outside is the job of the
proxy.
- 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: the sign-in by Email in both modes with its inbound webhook, the
messenger webhook (
Webhook mode), the phone number request, confirming
an email address by a code or by 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. The messenger
part was checked on Telegram only.
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 the paths of the table give way to the prefix alone — 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.