Repository navigation
feat(scim): add source storage and provisioning contracts - #43725
joshua-berri wants to merge 15 commits into
Conversation
|
| class SCIMGroupMapping(BaseModel): | ||
| model_config = ConfigDict(frozen=True, extra="forbid") | ||
|
|
||
| external_group_id: UUID |
There was a problem hiding this comment.
| @model_validator(mode="after") | ||
| def validate_agent_extension(self) -> "SCIMUser": | ||
| if SCIM_AGENT_USER_SCHEMA in self.schemas and self.agent_user is None: | ||
| raise ValueError("The agent-user schema requires identityParentId") | ||
| return self |
There was a problem hiding this comment.
Agent schema mismatch accepted
A user payload can include the agent extension without declaring its schema in schemas. Provisioning treats it as an agent, but later SCIM reads retain the inconsistent schema declaration. This can confuse directory clients about what kind of user they received.
| @model_validator(mode="after") | |
| def validate_agent_extension(self) -> "SCIMUser": | |
| if SCIM_AGENT_USER_SCHEMA in self.schemas and self.agent_user is None: | |
| raise ValueError("The agent-user schema requires identityParentId") | |
| return self | |
| @model_validator(mode="after") | |
| def validate_agent_extension(self) -> "SCIMUser": | |
| if SCIM_AGENT_USER_SCHEMA in self.schemas and self.agent_user is None: | |
| raise ValueError("The agent-user schema requires identityParentId") | |
| if self.agent_user is not None and SCIM_AGENT_USER_SCHEMA not in self.schemas: | |
| raise ValueError("The agent-user extension requires its schema in schemas") | |
| return self |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
67a4f68 to
8f6d78d
Compare
80e8682 to
01d81a2
Compare
01d81a2 to
cf1cb69
Compare
cf1cb69 to
47510ae
Compare
47510ae to
2706ed0
Compare
2706ed0 to
4611985
Compare
4611985 to
e02ac4e
Compare
3453468 to
7409ffa
Compare
e02ac4e to
74d17f8
Compare
74d17f8 to
f8fac3e
Compare
51cc903 to
9a5fb0c
Compare
TLDR
Problem this solves:
How it solves it:
Adds the SCIM source/resource migration, request contracts and source configuration building blocks. Source-bound public provisioning is activated in PR8, not by this prerequisite
Stack 6/9. Depends on #43724, targeting
litellm_agent_split_budgets. Current headf8fac3e6659c9f2007c7f5fa8aedce2163ba7daf; parent boundary7a1343178ebf0f5601821b641300a8b201a7cd03. Own diff: +721/-0 across 12 filesUser Flow
Before: the immediate parent provides the following experience
After: this PR provides the following experience
Relevant issues
Splits the approved scope from #43230 into the smaller review stack below. The nine PRs collectively replace #43149, #43229, #43230 and #43459; this PR covers only the scope described above. Original PRs remain open pending replacement review
Linear ticket
Fixes LIT-8961
Pre-Submission checklist
Verification
Restacked bottom-up after #43724 was rebased onto main
c168199e33af584e33198714fd4bff716c866ae0. Old parent boundaries and backup refs were retained, and only this branch's own commits were replayedCurrent head:
f8fac3e6659c9f2007c7f5fa8aedce2163ba7daf. Immediate parent:7a1343178ebf0f5601821b641300a8b201a7cd03. The preceding stack tip passed 2,281 backend and 59 dashboard tests. The preceding main restack passed 139 affected header/native/chat/version tests. The current restack carries the narrowly scoped chat model-pricing correction; its own current-tip readiness remains pending. This PR’s own patches are unchanged by range-diff. The financial fixes in #43724 remain inheritedPrevious tip-specific CI, coverage, independent execution, and bot evidence is superseded. This PR still needs its own current-tip readiness checks before maintainer review
Screenshots / Proof of Fix
Fresh PR-specific before/after evidence remains pending for parent
7a1343178ebf0f5601821b641300a8b201a7cd03and headf8fac3e6659c9f2007c7f5fa8aedce2163ba7daf. Previous screenshots and measured runs predate this rewrite and have been removed from the current proof sectionType
New Feature
Caveats (if any)
Medium
Final Attestation
Latest restack includes #43724 resolved admission, token pricing, and request compatibility repairs at
7a1343178ebf0f5601821b641300a8b201a7cd03. This PR’s own patches are unchanged by range-diff; tip-specific readiness remains pending