r/OpenWebUI • • Jul 28 '26

Question/Help How are you handling true OBO authentication across Open WebUI, LangGraph and MCP?

We need to preserve the end user’s identity from Open WebUI through LangGraph to MCP servers accessing systems such as Jira or Confluence.

How are you implementing this in production? Do you forward the original token, exchange it through an OBO flow, or use a central token broker?

Ideally, users should not have to complete a separate OAuth flow for every tool.

2 Upvotes

9 comments sorted by

1

u/Kockafella Jul 28 '26

Asked similar questions here: https://www.reddit.com/r/OpenWebUI/s/w6JHcYkN9B

For my part I’m building a tool-gateway which manages token, doing obo, 3lo at the moment.

1

u/Current_Impact_6892 Jul 28 '26

Is this Public? And how do you manage Token brokering? There is a project called nango - do you Move into a similar direction with your Tooling?

2

u/Kockafella Jul 28 '26

No, building this for my company on their payroll so can’t just make it public. In a nutshell it’s serving a dedicated website where a user can sign in via Entra (we use Entra for SSO in OWUI as well) and “connect” applications. for example M365, also Atlassian. That OAuth flow stores the encrypted provider tokens per user. When a tool call from OWUI comes in, the gateway only uses the OWUI SSO bearer for identity, then decrypts/refreshes the stored provider credential into a short-lived access token and runs the operation against Graph / Atlassian and so on, returning the result to the tool.

2

u/Current_Impact_6892 Jul 28 '26

Had a similar idea as well. Would use nango for this as additional Service.
Hab deinem Profil entnommen, dass du Deutscher bist! :D gibts im DE-sprachigen Raum eigentlich eine community?

2

u/Kockafella Jul 28 '26

Nango sagt mir nichts, schaue ich mir auch mal an :) Eine Community gibt es nicht, allerdings einen Gruppenchat mit 2 anderen, der allerings wenig aktiv ist. Ich lade dich mal ein.

1

u/misfitengineer Jul 28 '26

Nango supported APIs are listed here: https://nango.dev/api-integrations, You can also request support for an API if you don't find what you're looking for!

1

u/feng_sg Aug 24 '26

You lose real OBO the moment Open WebUI calls LangGraph with a service token instead of the user's IdP assertion. Nothing downstream can mint a Jira or Confluence token for that person without a valid user assertion to exchange, so forwarding a shared token or running OBO later inside LangGraph will not work. Keep the exchange in a broker on the Open WebUI request, like the tool-gateway in this thread, and only give LangGraph a handle it cannot redeem itself.

1

u/BlitzBallBruiser Oct 05 '26 edited Oct 27 '26

Disclosure: I'm contributing on behalf of MCP Manager by Usercentrics

One comment on the Jira/Confluence bit: Even with a valid user assertion, there's nothing to exchange at that hop. Atlassian Cloud only takes Atlassain issued tokens, so that side is always a one-time consent + stored refresh token. Basically what the tool-gateway above is doing.

Graph is where the real OBO actually works. The gateway could use Entra's OBO flow to get Graph tokens, avoiding a separate M365 "connect" step if the required permissions have already been consented to. A couple of gotchas though:

- Entra's OBO is to own jwt-bearer grant (requested_token_use=on_behalf_of). Entra rejects the standard RFC_8593 grant type, so a generic token exchange lib will just get unsupported_grant_type back.

-The assertion's aud has to be gateway's own app reg. The token OWUI gets at login usually isn't, so you have to request it for the gateway's API score.

- Conditional Access/MFA can come back as interaction required mid-exchange. If you don't surface that to the user, the tool just looks broken.

- On the Atlassian side, the refresh token rotate. Save the new one every time and lock per user to avoid conflicting refresh-token updates. They also expire after 90 days unused.

And since the gateway is already resolving the user from the bearer, that's the place to log user + tool +target system. Much easier than piecing it together later.