Skip to content

[BOURNE-2565] Sync with upstream#1499

Closed
gregbaroni wants to merge 18 commits intoadorsys:mainfrom
appfolio:bourne-2656-sync-with-upstream
Closed

[BOURNE-2565] Sync with upstream#1499
gregbaroni wants to merge 18 commits intoadorsys:mainfrom
appfolio:bourne-2656-sync-with-upstream

Conversation

@gregbaroni
Copy link
Copy Markdown

Resolved merge conflicts

Client Pagination

Ours: BOURNE-1686: Use pagination when fetching all clients

Upstream: feat: get all clients by page of 100

Their fix only paginates one place using whereas we use our paginator in multiple places. So, I kept our change.

Auth Flow Recreation

Ours: Prevent recreating auth flows if priority values changed (but order remains the same)

Upstream: fix(auth-flows): normalize execution priorities for stable flow comparison

Their fix covers more than just execution priorities. So, I kept their change.

Authorization Import

Ours: Retrieve realm-management client authz information in parts to prevent long-running query

Upstream: fix: create authorization scopes before resources to ensure proper binding

These are unrelated, but I updated our implementation to also create the scopes before the authorization resources.

dannyrife and others added 18 commits April 8, 2026 14:26
When "remote state" is enabled for clients (the default), Keycloak will only delete clients that were listed in the config tool's state. This prevents it from deleting clients that it didn't create.

When deciding what to delete, we can just fetch the clients that were already in the state, rather than listing all the clients in the realm. This should be a much smaller list, and prevents issues where the server cuts off the response when the list is too large.
It's difficult to avoid all situations where we need to list all the clients in the realm. If we try fetching them all in one request, it can fail because the response is cut off by the server. As long as we're using reasonably-sized pages, we should avoid resource limits and actually run much faster.
Previously, searchByName() was fetching all groups and filtering. This now uses `?search=<name>&exact=true`.

There is still another place where it is fetching all groups. For now, we'll add pagination, but eventually we'll want to fix this.
@gregbaroni gregbaroni closed this Apr 8, 2026
@gregbaroni gregbaroni deleted the bourne-2656-sync-with-upstream branch April 8, 2026 21:32
@gregbaroni gregbaroni restored the bourne-2656-sync-with-upstream branch April 8, 2026 21:33
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants