Skip to main content
Open WebUI is a self-hosted chat front-end for LLMs. It talks to any OpenAI-compatible API, so it connects to TrustGate’s LLM plane like any other OpenAI provider: one URL, one key, and every model the application routes to shows up in its model picker. A chat front-end serves many people through one connection. Open WebUI can tell TrustGate who each request is for, so Activity, analytics and cost reports show the person, not just the application. How much you can trust that name depends on the mode you pick — see Choose how users are identified.

Integration capabilities

Before you start

1

Add TrustGate as a connection

In Open WebUI, open Admin Panel → Settings → Connections, and under OpenAI API add a connection:Or set it from the environment where Open WebUI runs:
If Open WebUI runs in Docker and TrustGate on the same host, use host.docker.internal instead of localhost.
2

Check the models

Open WebUI lists models from the application’s /v1/models, so the picker shows what the application routes to. To show fewer, or to add a value the list does not carry — auto for an application that load-balances — use the connection’s Model IDs filter. See What goes in model.Send a chat and open Activity in the console: the request is there, under the application.
3

Identify your users

Without this, every request is the application’s. Pick a mode below and turn it on; nothing changes on TrustGate’s side for the first two.

Choose how users are identified

The first two are declared: TrustGate records who Open WebUI says it was serving, for telemetry and cost attribution, and never lets the name authorize anything — see End-user attribution. The third is authenticated: TrustGate verifies the token, and the person becomes the request’s principal, which policies can act on.

User headers

Set one variable where Open WebUI runs. It is off by default:
Open WebUI then adds these to every request, and TrustGate reads them with no setup: Open WebUI percent-encodes the name (José arrives as Jos%C3%A9); TrustGate decodes it. If a proxy of your own sits between Open WebUI and TrustGate, check that it does not strip unknown request headers.

Signed user JWT

Add a secret, and Open WebUI stops sending the user headers and sends one token in their place:
The token is HS256, issued by open-webui, and expires after five minutes by default. TrustGate reads the user from its claims, again with no setup:
TrustGate does not check the token’s signature: that takes the secret you set in Open WebUI, which the gateway does not hold. The token is therefore worth what the user headers were — anyone holding the application key could mint one — and is recorded the same way: declared, never the principal. The token is signed, not encrypted: anyone who sees the request can read the user in it. For a user TrustGate verifies, use SSO.
Keep the default header name. If you rename it with FORWARD_USER_INFO_HEADER_JWT, TrustGate does not find it and the user is not recorded.

Verified users with SSO

When Open WebUI signs users in with your identity provider, its connection to TrustGate can send each person’s own access token instead of the application key. TrustGate validates the token — signature against the IdP’s keys, issuer, expiry, audience — and records the person it names as the request’s principal. You configure three places: your IdP, NeuralTrust, and Open WebUI. Have these at hand:
1

On your IdP: issue tokens for TrustGate

Expose an API for TrustGate with a delegated scope users can be granted, and let Open WebUI’s client request it. The token Open WebUI receives must carry TrustGate’s audience in aud.
  • Entra ID: on the TrustGate app registration, Expose an API with a scope such as api://trustgate/access, then add that scope to Open WebUI’s app registration under API permissions. See Entra ID.
  • Okta: use an authorization server whose audience is TrustGate’s, with a scope Open WebUI’s client may request. See Okta.
  • Keycloak: add an Audience mapper to Open WebUI’s client that includes TrustGate’s audience in the access token.
2

In NeuralTrust: add the trust anchor

Go to Settings → Agent Gateway → Machine identity → Add trust anchor:
  • Kind: IdP (JWT)
  • Name: e.g. company-idp
  • Issuer: your IdP’s issuer, exactly as it appears in the token’s iss
  • Audience: TrustGate’s audience
Save. No secret is stored: the gateway only verifies tokens. TrustGate finds the signing keys from the issuer; pin a JWKS URL under Advanced if your IdP does not publish discovery.
3

In NeuralTrust: enter the application through the IdP

Go to Agent Gateway → Applications, open the application Open WebUI connects to, and on General → Authentication choose Identity provider and select the anchor:
  • Allowed client IDs: Open WebUI’s client ID, so only tokens issued to Open WebUI get in. Leave it empty only when the audience is used by this application alone.
Save changes. Providers and models stay as they were.
An application is entered one way: with its key or through an identity provider. Once it trusts the IdP, the application key no longer opens it. If other clients still call this application with the key, create a separate application for Open WebUI instead.
4

In Open WebUI: sign in with the same IdP

Configure Open WebUI’s OIDC login against that provider and ask for TrustGate’s scope with the usual login scopes. Without it, many IdPs issue a token for a default resource, such as Microsoft Graph for Entra, and TrustGate rejects it:
Users who were already signed in must sign out and back in to get a token with the new scope. A user signed in with a local Open WebUI account has no IdP token to send.
5

In Open WebUI: switch the connection to OAuth

In Admin Panel → Settings → Connections, edit the TrustGate connection and set Auth to OAuth. The URL stays the same. Open WebUI now sends the signed-in user’s token as Authorization: Bearer on each request, in place of the application key.Keep ENABLE_FORWARD_USER_INFO_HEADERS on if you like: when the user Open WebUI declares has the same email as the verified principal, Activity shows them once, as verified.
6

Check it in NeuralTrust

Send a chat, then open Activity in the console. The request shows the person as a verified user, and opening it shows how it authenticated.
The principal is recorded as principal_subject (the token’s sub) and principal_email, the token’s email claim or, when the IdP sends none, the first of emailAddress, preferred_username, upn and unique_name that is an address.

Troubleshooting

  • End-user attribution: every source TrustGate reads, and how declared users differ from principals
  • Authentication: trusting an identity provider and admitting its tokens
  • Connect: the base URL, the key, and what goes in model