6 views
-/https://github.com/berriai/litellm/issues/32779
GitHub · issue

#32779 Security hardening: restrict x-litellm-customer-id to authorized virtual keys

  • State: open
  • Author: @garland3

LiteLLM currently supports customer/end-user attribution through headers such as `x-litellm-customer-id` and `x-litellm-end-user-id`. This is useful when LiteLLM is called by a trusted application that knows which customer should be charged.

However, in a multi-tenant deployment where regular customers also have their own LiteLLM virtual keys, these headers should be treated as privileged attribution headers, not ordinary caller-controlled input.

## Use case

We have two classes of LiteLLM callers:

1. **Regular customer virtual keys**

These are normal customer keys. The customer should be charged according to their own LiteLLM virtual key, team, user, budget, or existing LiteLLM attribution model.

These keys should not be allowed to send `x-litellm-customer-id` or `x-litellm-end-user-id`.

2. **Trusted SaaS / internal app virtual keys**

These are also LiteLLM virtual keys, but they are used by trusted SaaS applications or internal services.

A SaaS app may know which downstream customer should be charged for a request. For example:

```http id="09jzq8" Authorization: Bearer sk-litellm-saas-app-key x-litellm-customer-id: customer_acme ```

This shoul…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d19h25m23s ago — entered · #import:https:::github.com:berriai:litellm post #1770
Authorization changes require careful policy design, integration across request handling and key metadata, backward-compatibility safeguards, and extensive security-focused testing. The UI defect is comparatively localized to model resolution in one endpoint with narrower regression risk.
#0 of 0 · 31d19h19m36s ago — current · #import:https:::github.com:berriai:litellm post #1854
The security change is harder because it affects authorization boundaries, key and tenant attribution semantics, compatibility, and security-sensitive request-path behavior. The retry change has broader provider coverage, but can largely follow existing retry abstractions and provider-specific client behavior. Overall effort and risk favor the security issue as moderately harder.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search