Repository navigation
Conversation
Group membership now records which side added each member: "scim" when SCIM pushed it, "jit" when an SSO assertion added it at login. A SCIM group can hold JIT members, because SSO assertions keep their own membership so the user's idpGroups claim survives a token refresh. Group.source comes along because a member whose own source is empty (recorded before provenance was tracked) belongs to the group's source, so the member field cannot be interpreted without it. Both are read-only, populated by the server and ignored on writes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
🐕 Shuni ReviewNo new issues found. 🤖 Model: Review scope: Partial incremental re-review Reviewed new changes (1)
🐕 Review complete — View session on Shuni Portal 🐾 🤖 Model: |
The group endpoints deserialized into a raw List, so every element came back as a LinkedHashMap. Iterating the result as Group, or calling any getter on an element, threw ClassCastException, which made the model's fields unreachable. Use a TypeReference, as the user service already does. With that fixed the member fields still would not bind: the mapper is case sensitive and the server sends loginId and userId, so name them explicitly while keeping the Java accessors. Group and GroupMember each gained a field, which widens the generated all-args constructor. Add explicit three-field constructors so existing callers keep compiling. Callers that currently cast elements of these responses to Map will need to change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
List.of is Java 9+, and this project targets Java 8, so the test broke the oldest build in the matrix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The group endpoints deserialize through postAndGetArray, so the three tests still stubbing post received null and their assertions failed. These are the same tests that previously failed with a null proxy, which masked the stub being wrong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Description
Group membership now records which side added each member.
GroupMember.sourceis"scim"when SCIM pushed the member,"jit"when an SSO assertion added it at login, and empty for memberships recorded before provenance was tracked (those belong to the group's ownsource).A SCIM group can legitimately hold JIT members: SSO assertions keep their own membership so a user's
idpGroupsclaim survives a token refresh, rather than only being present at login. The field lets callers tell the two apart.Group.sourceis included because a member with an emptysourceinherits the group's, so the member field cannot be interpreted on its own. The other SDKs already exposeGroup.source; this SDK had not picked it up yet.Both fields are read-only: populated by the server, ignored on writes.
Issue: descope/etc#18722
Backend: descope/backend#2745
Testing
mvn compileandmvn checkstyle:checkpass.GroupServiceImplTestreports the same 3 pre-existingapiProxy is nullerrors on this branch as on a cleanorigin/main(verified side by side); the suite mocksGroup, so model fields are not exercised by it.🤖 Generated with Claude Code