Add client type support to Admin API v2#50895
Open
arnabnandy7 wants to merge 14 commits into
Open
Conversation
Apply configured client types during v2 client creation while preserving omitted type-controlled values and explicit update semantics. Closes keycloak#50894 Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client-type support to Admin API v2 client creation and updates.
Changes:
- Exposes client
typethrough representations and OpenAPI. - Applies client-type defaults while preserving omitted fields.
- Adds typed-client creation and merge-patch tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
InteropTest.java |
Adds typed-client regression tests. |
DefaultClientService.java |
Integrates client-type handling. |
OIDCClientModelMapper.java |
Refactors authentication mapping. |
ClientModelMapper.java |
Adds field-exclusion mapping. |
BaseClientModelMapper.java |
Implements excluded-field support. |
SAMLClientRepresentation.java |
Tracks explicit logout updates. |
OIDCClientRepresentation.java |
Tracks explicit OIDC fields. |
BaseRepresentation.java |
Records explicitly set fields. |
BaseClientRepresentation.java |
Adds the client type property. |
openapi.json |
Documents the client type schema. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
arnabnandy7
force-pushed
the
feature/v2-client-types
branch
from
July 14, 2026 19:11
51c824e to
b3f3ea1
Compare
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
…ypes Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com> # Conflicts: # rest/admin-v2/services/src/main/java/org/keycloak/services/client/DefaultClientService.java # rest/admin-v2/tests/src/test/java/org/keycloak/tests/admin/client/v2/InteropTest.java
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
This was referenced Jul 21, 2026
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
rest/admin-v2/tests/src/test/java/org/keycloak/tests/admin/client/v2/InteropTest.java:398
- This regression only patches fields that are mutable in the
oidctype, so it does not exercise the new client-type rejection path or parameterized error response. Add a typed service-account patch that explicitly removesSERVICE_ACCOUNT(or changes another fixed field) and assert the 400 response includes the controlled option inparams.
getClientsApi().client(client.getClientId()).patchClient(
new ByteArrayInputStream(mapper.writeValueAsBytes(patch)));
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredAndRequiredActionKeycloak CI - Forms IT (chrome) |
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 #50894
This adds client-type support when creating and updating clients through Admin API v2.
The v2 client creation flow now:
typein the v2 representation and generated OpenAPI schemaRegression coverage includes creating a minimal service-account client and clearing mutable typed-client properties through a merge patch.
The protocol-default changes remain in #50801 and are intentionally excluded from this PR.