Skip to content

fix: pass effective jwt token to API calls#1088

Merged
lucaseduoli merged 8 commits into
mainfrom
fix/jwt_token
Mar 10, 2026
Merged

fix: pass effective jwt token to API calls#1088
lucaseduoli merged 8 commits into
mainfrom
fix/jwt_token

Conversation

@lucaseduoli

Copy link
Copy Markdown
Collaborator

This pull request updates the authentication logic for API key users in the src/dependencies.py file. The main change is that API key users now receive an effective JWT token, if available, when their user object is created. This improves compatibility with systems that require JWT tokens, such as OpenSearch OIDC.

Authentication improvements:

  • Added session_manager dependency to the get_api_key_user_async function to enable retrieval of JWT tokens.
  • Obtained an effective JWT token using session_manager.get_effective_jwt_token(None, None) and assigned it to the jwt_token field of the user object, replacing the previous default of None. [1] [2]

@lucaseduoli lucaseduoli requested a review from phact March 10, 2026 15:32
@lucaseduoli lucaseduoli self-assigned this Mar 10, 2026
@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. labels Mar 10, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 10, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 10, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 10, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 10, 2026
@github-actions github-actions Bot added the lgtm label Mar 10, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 10, 2026
@lucaseduoli lucaseduoli merged commit 685ecd3 into main Mar 10, 2026
9 checks passed
@github-actions github-actions Bot deleted the fix/jwt_token branch March 10, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants