Enhancement: Add support for load balancer terminated OIDC authentication #5500
Closed
jameslamine
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment
-
Closing. I ended up just using LibreChat's native oidc |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Add support for OIDC authentication when it's terminated at the load balancer level. The load balancer handles the OIDC handshake and passes authenticated user information via OIDC headers. LibreChat never sees the OIDC flow, it just sees the resulting headers.
All unauthenticated traffic is rejected at the load-balancer level, so LibreChat will never see an unauthenticated user save for calls to
/health
and similar.Details
Currently, LibreChat supports direct OIDC integration, but our company uses a load balancer to handle OIDC authentication. Unauthenticated users are rejected by the load balancer and never make it to the application.
Authenticated users are proxied to the application with OIDC headers added. We also need the ability to customize the header names, since they have a company-specific prefix.
Requirements:
xxx-oidc-accesstoken
)xxx-oidc-identity
)xxx-oidc-data
)Either via environment variables, or
librechat.yml
User Profile Creation:
sub
claim in access tokenSince the load balancer handles the OIDC handshake and validation, you can assume the headers are valid. Everything should work even without
OPENID_CLIENT_SECRET
,OPENID_CLIENT_ID
andOPENID_SESSION_SECRET
Note that there's no callback URL - the callback happens at the load balancer level.
More details
Relevant fields in the OIDC headers. My guess is LibreChat's existing OIDC supports this, but for completeness:
xxx-oidc-accesstoken
payload:sub
- user's emailuid
- internal user id. You could use this if you want, but don't have to. Totally fine to ignore.Which components are impacted by your request?
General
Pictures
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions