LibreChat/api/server/services/Tools
J.C. Bartle 9131186bd1 🛠️ fix: centralize OBO identity scoping
Add shared auth identity helpers for app user ids, OpenID subjects,
tenant ids, and normalized OpenID issuers.

Thread a non-placeholder-visible OBO identity context from the real
request user through MCP connection, tool-call, reinit, and refresh
paths. Keep tenantId and openidIssuer out of createSafeUser so MCP
user placeholders do not expose those fields.

Scope OBO token cache and in-flight exchange keys by tenant, issuer,
OpenID subject, scopes, and a SHA-256 hash of the upstream assertion.
This prevents cross-tenant/cross-issuer collisions and avoids reusing
tokens minted from stale rotated assertions.

Use the shared identity helpers for OpenID refresh-flight keys and
refresh-token bridge recovery records so related OBO refresh paths share
the same identity normalization rules.

The helper is intended for auth-boundary and credential-cache code, not
as a blanket replacement for ordinary app user id ownership checks.
2026-06-28 10:39:04 -04:00
..
credentials.js 🛡️ fix: Filter user_provided Sentinel in Tool Credential Loading (#12840) 2026-04-29 09:09:54 +09:00
credentials.spec.js 🛡️ fix: Filter user_provided Sentinel in Tool Credential Loading (#12840) 2026-04-29 09:09:54 +09:00
mcp.js 🛠️ fix: centralize OBO identity scoping 2026-06-28 10:39:04 -04:00
mcp.spec.js ♻️ refactor: Pass OBO upstream-token closure into MCP instead of req 2026-06-23 11:59:01 -04:00
search.js 🌊 feat: Resumable LLM Streams with Horizontal Scaling (#10926) 2025-12-19 12:14:19 -05:00