Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(auth): remove hardcoded base64 string flagged by secret scanner (#22125)

Julio Quinteros Pro54e4af84d6c7
diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py
index 9240d84db83..6106f69ea65 100644
--- a/litellm/proxy/auth/user_api_key_auth.py
+++ b/litellm/proxy/auth/user_api_key_auth.py
@@ -395,10 +395,8 @@ async def check_api_key_for_custom_headers_or_pass_through_endpoints(
endpoint.get("custom_auth_parser") is not None
and endpoint.get("custom_auth_parser") == "langfuse"
):
- """
- - langfuse returns {'Authorization': 'Basic YW55dGhpbmc6YW55dGhpbmc'}
- - check the langfuse public key if it contains the litellm api key
- """
+ # langfuse returns {'Authorization': 'Basic <base64(username:password)>'}
+ # check the langfuse public key if it contains the litellm api key
import base64
api_key = api_key.replace("Basic ", "").strip()