Repository navigation
feat(admin): change the client scopes of an API client - #272
Merged
Merged
Conversation
PUT /v1/admin/api-client/{clientId}/scope replaces the client scopes (the access)
of an API client, so that administrators do not have to create new credentials
for an external system to change what it can access. Logged in the audit trail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Oct 29, 2026
…ient The OpenAPI contract gate requires every documented operation to be exercised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC
sleidig
commented
Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC
sleidig
marked this pull request as ready for review
October 29, 2026 15:17
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.
Adds
PUT /v1/admin/api-client/{clientId}/scopewith body{ "scopes": [...] }. It replaces the client scopes (the access) of an API client and returns the updatedApiClient. Administrators can then change what an external system can access without creating new credentials for it. Frontend: Aam-Digital/ndb-core#4611How it works
NO_SCOPE,UNKNOWN_SCOPE). This check is nowvalidateScopesinNewApiClient.kt, andvalidateNewApiClientreuses it.profile) stay as they are. As at creation, it removes any Optional scopes before adding scopes.api-prefix areAPI_CLIENT_NOT_FOUND.[audit] User '…' (…) changed the client scopes of API client '…' to [...]records every change. Failed attempts are logged the same way as for the other actions.Changes
ApiClientAdministration.updateScopesand its Keycloak implementationApiClientController.updateScopeswithUpdateApiClientScopesRequestDtoadmin-api-v1.yaml),docs/modules/admin.mdand the module READMEApiClientControllerTest. Keycloak integration tests: tokens carry the new scopes, Keycloak's own scopes are kept, scopes that aren't offered or an empty list are rejected, and other clients of the realm can't be changed.Testing
🤖 Generated with Claude Code
https://claude.ai/code/session_01Fb2hmonEJ4GPn7E8vpSMBC