8000 Expose sub-attributes of multi-valued complex attributes in SCIM /Schemas by Beehtrix · Pull Request #55798 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Expose sub-attributes of multi-valued complex attributes in SCIM /Schemas - #55798

Open
Beehtrix wants to merge 2 commits into
keycloak:mainfrom
Beehtrix:fix/scim-schemas-multivalued-subattributes-55793
Open

Beehtrix wants to merge 2 commits into
keycloak:mainfrom
Beehtrix:fix/scim-schemas-multivalued-subattributes-55793

Conversation

@Beehtrix
@Beehtrix Beehtrix commented Dec 3, 2026
Copy link
Copy Markdown

Closes #55793

/Schemas only listed sub-attributes for attributes registered with withAttribute (such as name). Multi-valued complex attributes backed by MultiValuedAttribute (User.emails, User.groups, Group.members) now expose value, display, type, primary and $ref as defined in RFC 7643 section 2.4.

Decisions and assumptions:

  • The sub-attributes are derived from the MultiValuedAttribute complex type in SchemaResourceTypeProvider, so any future attribute using that type gets them too.
  • $ref is of type reference. Not case exact, uniqueness: none.
  • display, type, primary and $ref are readOnly because the server derives them and ignores submitted values. emails.value is readWrite. groups.value and members.value are immutable and required (entries are added or removed whole; blank values are rejected). RFC 7643 marks groups as readOnly, but Keycloak accepts group ids on write, so this follows the server.
  • $ref.referenceTypes is ["Group"] for groups and ["User"] for members.
  • Added junit as a test dependency of scim/model for 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. Ran SchemaResourceTypeProviderTest (fails before the fix, passes after) and spotless:apply on scim/model.

…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>
@Beehtrix
Beehtrix requested a review from a team as a code owner December 3, 2026 21:24
Copilot AI lite review requested due to automatic review settings December 3, 2026 21:24
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCIM - Sub attributes missing for complex attributes in /Schemas

2 participants

0