fix: enforce user deactivation via scim_active metadata#21113
Merged
krrishdholakia merged 1 commit intoBerriAI:litellm_oss_staging_02_14_2026from Feb 14, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile OverviewGreptile SummaryThis PR adds a SCIM user deactivation enforcement check to the
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| litellm/proxy/auth/auth_checks.py | Adds SCIM deactivation check in common_checks() to block users with scim_active=False in metadata. The check is correctly placed early in the function, uses strict is False comparison, and handles None metadata safely. |
| tests/test_litellm/proxy/auth/test_auth_checks.py | Adds two unit tests for SCIM deactivation: one verifying blocked users and one verifying active users pass through. Tests are mock-only (no network calls). Missing edge case tests for metadata=None and metadata without scim_active key. |
Sequence Diagram
sequenceDiagram
participant C as Client
participant A as Auth
participant D as Database
participant K as CommonChecks
C->>A: Request with API key
A->>D: Lookup user
D-->>A: User data
A->>K: Run common checks
alt SCIM deactivated
K-->>C: 401 Unauthorized
else SCIM active or unset
K-->>A: Passed
A-->>C: Success
end
Last reviewed commit: 56bb518
56bb518 to
443c8ec
Compare
443c8ec to
1dc7db2
Compare
- Add check in common_checks() to block users with scim_active=False - Fixes issue where SCIM PATCH to set active=false didn't prevent authentication - Add unit tests for scim_active validation - Raises ProxyException with 401 when deactivated user attempts to authenticate Resolves: BerriAI#16427 (related SCIM deactivation issue)
1dc7db2 to
cf6a132
Compare
5df06b4
into
BerriAI:litellm_oss_staging_02_14_2026
6 of 18 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue where SCIM PATCH to set active=false updates metadata but doesn't prevent authentication.
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🐛 Bug Fix
Changes