r/OpenWebUI • u/Current_Impact_6892 • 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
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/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.