Repository navigation
Conversation
…n /Schemas Closes keycloak#55793 Signed-off-by: Beehtrix <walkin_danger@hotmail.com>
…types for multi-valued sub-attributes Closes keycloak#55793 Signed-off-by: Beehtrix <walkin_danger@hotmail.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
Adds SCIM /Schemas metadata for sub-attributes of multi-valued complex attributes.
Changes:
- Exposes standard sub-attributes and reference metadata.
- Adds tests for generated schema metadata.
- Adds JUnit test support.
| File | Description |
|---|---|
| scim/model/src/test/java/org/keycloak/scim/model/schema/SchemaResourceTypeProviderTest.java | Adds tests covering generated sub-attribute types, mutability, requiredness, and references. |
| scim/model/src/main/java/org/keycloak/scim/model/schema/SchemaResourceTypeProvider.java | Generates schema definitions for sub-attributes of multi-valued complex attributes. |
| scim/model/pom.xml | Adds JUnit as a test dependency. |
Review effort: Lite
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.
Closes #55793
/Schemasonly listed sub-attributes for attributes registered withwithAttribute(such asname). Multi-valued complex attributes backed byMultiValuedAttribute(User.emails,User.groups,Group.members) now exposevalue,display,type,primaryand$refas defined in RFC 7643 section 2.4.Decisions and assumptions:
MultiValuedAttributecomplex type inSchemaResourceTypeProvider, so any future attribute using that type gets them too.$refis of typereference. Not case exact,uniqueness: none.display,type,primaryand$refarereadOnlybecause the server derives them and ignores submitted values.emails.valueisreadWrite.groups.valueandmembers.valueareimmutableand required (entries are added or removed whole; blank values are rejected). RFC 7643 marksgroupsasreadOnly, but Keycloak accepts group ids on write, so this follows the server.$ref.referenceTypesis["Group"]forgroupsand["User"]formembers.scim/modelfor the new unit test.An AI agent (Kiro) was used to prepare this change.
Checks not run: the SCIM integration testsuite (
scim/tests) and the full build. RanSchemaResourceTypeProviderTest(fails before the fix, passes after) andspotless:applyonscim/model.