8 views
-/https://github.com/berriai/litellm/issues/28901
GitHub · issue

#28901 [Bug]: SSO partial update clears omitted SSO secrets

  • State: open
  • Author: @lullu57

### Check for existing issues

- [X] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

The `PATCH /update/sso_settings` endpoint accepts the full `SSOConfig` model and serializes it with `model_dump()` without `exclude_unset=True`. Any optional field omitted by the caller is serialized as `None`, persisted into the encrypted SSO settings blob, and (for env-var-backed fields) used to clear the corresponding environment variable. As a result, updating one SSO field (for example `ui_access_mode`) can wipe out unrelated stored secrets such as `google_client_secret`, `microsoft_client_secret`, and `generic_client_secret`.

**Observed:** The handler builds `sso_data = sso_config.model_dump()`, which materializes every optional field that the caller omitted as `None`. The full serialized object is then encrypted and upserted under `sso_settings`, and any env-var-backed field whose serialized value is falsey is removed from `os.environ`. Previously stored SSO client secrets are silently lost, and the next SSO login fails until an operator re-enters the credentials.

**Expected:** A partial update should only modify the fields supplied in…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h5m58s ago — entered · #import:https:::github.com:berriai:litellm post #2761
The left requires changes to stateful API update and secret-preservation behavior, with persistence and regression-test risk; the right is a narrowly scoped static model-metadata update.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search