Skip to content

BOURNE-3024: Sync upstream v6.5.1 - #35

Open
adhurjaty wants to merge 452 commits into
mainfrom
merge-upstream-v6.5.1
Open

BOURNE-3024: Sync upstream v6.5.1#35
adhurjaty wants to merge 452 commits into
mainfrom
merge-upstream-v6.5.1

Conversation

@adhurjaty

@adhurjaty adhurjaty commented Aug 26, 2026

Copy link
Copy Markdown

What this does

Merges the upstream v6.5.1 tag into main.

Alongside the upstream release itself, this recovers a set of upstream files that had gone missing
from main, and fixes a latent bug in ExecutionFlowsImportService (see resolution 2).

Where to look

Most of the diff is upstream fixture JSON — baseline realms and the import schema — which is safe to
skim. The Java changes are the review:

git diff origin/main...HEAD -- '*.java'

Within those, the substantive ones are AuthenticationFlowsImportService,
ExecutionFlowsImportService, ClientAuthorizationImportService and ImportAuthenticationFlowsIT.

Conflict resolutions

Most conflicts were in Java sources. The judgment calls:

  1. UsedAuthenticationFlowWorkaroundFactory — kept deleted. Our "update flows in place" approach
    replaced upstream's delete-and-recreate path, so the class is unreferenced. Note this also drops
    upstream's InvalidImportException guard against changing a flow's built-in flag — deliberate, not
    a merge accident. Upstream's newer e88559a5 (setting postBrokerLoginFlowAlias to null
    mid-recreation) is moot for us; we never unbind.

  2. ExecutionFlowsImportService — our updateExecutionFlows coexists with upstream's method,
    renamed updateBuiltInExecutionFlows. Both AuthenticationFlowRepository and upstream's newer
    keycloakProvider are now injected. main had dropped the former and lost the latter, which
    is the only reason it compiled — so this is a bug fix, not just a merge.

  3. AuthenticationFlowsImportServiceupdateTopLevelFlow dispatches on
    existingAuthenticationFlow.isBuiltIn(). This is the heart of our update-instead-of-recreate
    behaviour and the highest-value thing to review.

  4. ClientAuthorizationImportService — upstream's FGAP V2 resource-name fix (daf24b71) and our
    FGAP error handling converged on the same constructor change independently; kept one copy. The two
    fgapV2Active blocks live in different methods (updateClientAuthorizationSettings and
    updateAuthorization), which is intended.

  5. ClientRepository — our stream-returning getAll/getAllIds over PaginationUtil, with
    upstream's single logger and without its now-dead private findAll.

  6. Keycloak version now has one source of truth, and targets what we run. Our CircleCI
    build-arg pin was a second copy of the version alongside the Dockerfile default, and had drifted
    to 26.1.0 -- which is what made this a conflict. The pin is gone; CircleCI inherits the Dockerfile
    default. A follow-up commit then moves that single definition to 26.6.4, the version we run in
    production, rather than sitting on upstream's 26.5.5. The admin client stays at upstream's 26.0.8,
    since it has its own release line.

    That bump also drops activeByDefault from the pre-keycloak26-6 Maven profile. The profile
    excludes OrganizationRepository and OrganizationImportService from compilation and skips the
    passkey and organization ITs; leaving it on would silently disable organization support now that
    the default server version is 26.6.4. CI is unaffected either way -- it always passes -Pcoverage,
    which deactivates activeByDefault profiles.

Upstream code restored that main had lost

docs/SCHEMA_USAGE.md, keycloak-config-cli-import-schema.json,
OrganizationRepository.java.legacy, the baseline/* sets for 21.1.2, 22.0.5, 26.1.0, 26.4.0, 26.5.5
and 26.5.7, and some test fixtures. This accounts for most of the diff's size.

Verification

  • Full unit suite passes
  • Checkstyle, PMD and SpotBugs all clean — PMD was failing before this branch
  • docker build succeeds and the resulting jar boots (fails only on absent keycloak.url, expected)
  • ImportParallelImportIT passes against a real Keycloak container
  • Audited the newly-inherited upstream commits for security regressions. No new exploitable
    vulnerability
    ; YAML deserialization, the FGAP authorization change, auth-flow execution priority,
    new logging and dependency changes all checked clean. Two pre-existing findings in the
    default-disabled script-evaluation feature are written up separately — ask if you want the detail.
  • Ran config on QA3 on this branch. All seems successful. Unsure how to test with high confidence there were no breakages.

Known issues

Integration tests need -Dkeycloak.version=<version> passed explicitly. Upstream's
maven-failsafe-plugin block is commented out, so ITs run under surefire and read the version from a
system property. Without it the container tag resolves to null and AbstractImportIT dies in its
static initialiser with NoClassDefFound — a harness quirk, not a regression.

Note on merging

Use a merge commit, not squash. Squashing would flatten the upstream history this brings in and
make the next sync harder to reason about.

Security audit

Claude artifact

🤖 Generated with Claude Code

Motouom and others added 30 commits February 23, 2026 12:11
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.0 to 5.0.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v4.2.0...v5.0.3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
- skip group client role lookups when role list is empty
- add client protocol mapper sync helpers (add/remove/update/get)
- always update client protocol mappers and scopes to allow empty-array deletes
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4.2.2...v6.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.7.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v3.3.0...v3.7.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.8 to 7.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4.1.8...v7.0.0)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…iles and fixed the vulnerabilities in the root pom.xml
…s/actions/checkout-6.0.2

build(deps): bump actions/checkout from 4.2.2 to 6.0.2
…s/docker/login-action-3.7.0

build(deps): bump docker/login-action from 3.3.0 to 3.7.0
…s/actions/download-artifact-7.0.0

build(deps): bump actions/download-artifact from 4.1.8 to 7.0.0
…redentialsFlow_1387

Allow to change default reset credentials flow adorsys#1387
…s/actions/cache-5.0.3

build(deps): bump actions/cache from 4.2.0 to 5.0.3
…k-in-logs

added turbo filter to sanitize wire log messages
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.18.0 to 6.19.2.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v6.18.0...v6.19.2)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.19.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Nkwenti-Severian-Ndongtsop and others added 23 commits May 15, 2026 13:48
Bumps [madhead/semver-utils](https://github.com/madhead/semver-utils) from 4 to 5.
- [Release notes](https://github.com/madhead/semver-utils/releases)
- [Commits](madhead/semver-utils@v4...v5)

---
updated-dependencies:
- dependency-name: madhead/semver-utils
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [net.logstash.logback:logstash-logback-encoder](https://github.com/logfellow/logstash-logback-encoder) from 8.0 to 9.0.
- [Release notes](https://github.com/logfellow/logstash-logback-encoder/releases)
- [Commits](logfellow/logstash-logback-encoder@logstash-logback-encoder-8.0...logstash-logback-encoder-9.0)

---
updated-dependencies:
- dependency-name: net.logstash.logback:logstash-logback-encoder
  dependency-version: '9.0'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.6.1 to 3.0.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v2.6.1...v3.0.0)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…s/softprops/action-gh-release-3.0.0

build(deps): bump softprops/action-gh-release from 2.6.1 to 3.0.0
…stash.logback-logstash-logback-encoder-9.0

build(deps): bump net.logstash.logback:logstash-logback-encoder from 8.0 to 9.0
…s/madhead/semver-utils-5

build(deps): bump madhead/semver-utils from 4 to 5
…-priority

Fix sub-flow execution priority being silently reset to 0
…ssue-template-cncf-slack

Update ISSUE_TEMPLATE to point to Slack instead of GitHub Discussions
…1568-added-baseline-config-from-keycloak

Added baseline config for new keycloak versions
feat: Improve config validation with JSON schema
Co-authored-by: Ian <ianwallen@hotmail.com>
…526-resource-bare-id

fix(authz): preserve full resource names for custom clients in FGAP V2
…514-removing-ldap-default-mappers

removing ldap default mappers
…492-postbrokerlogin-server-error

Resolve post broker login recreate bug
Nineteen files conflicted, thirteen of them Java. Resolutions:

- UsedAuthenticationFlowWorkaroundFactory: kept deleted. Our "update flows in
  place" approach replaced upstream's delete-and-recreate path, so the class is
  unreferenced. Note this also drops upstream's InvalidImportException guard
  against changing a flow's built-in flag, which was the original intent.
- ExecutionFlowsImportService: our updateExecutionFlows coexists with upstream's
  method, renamed updateBuiltInExecutionFlows. Both AuthenticationFlowRepository
  and upstream's newer keycloakProvider are injected -- main had lost the latter
  and dropped the former, which is why it compiled.
- AuthenticationFlowsImportService: updateTopLevelFlow dispatches on
  existingAuthenticationFlow.isBuiltIn().
- ClientAuthorizationImportService: upstream's FGAP V2 resource-name fix and our
  FGAP error handling converged on the same constructor change; kept one copy.
- ClientRepository: our stream-returning getAll/getAllIds over PaginationUtil,
  with upstream's single logger and without its now-dead private findAll.
- ParallelUtil restored with its call sites. Main had lost it, apparently to a
  rename false-match against our PaginationUtil, silently reverting three
  services to raw parallelStream().
- Dropped our CircleCI Keycloak build-arg pin; we now inherit upstream's 26.5.5
  and client 26.0.8 rather than duplicating the version in two places.

Resulting tree is identical to the reviewed reconstruction in #34, so the same
verification applies: full unit suite, checkstyle, PMD and SpotBugs clean, and
docker build boots.
@adhurjaty
adhurjaty marked this pull request as ready for review August 26, 2026 19:53
@adhurjaty
adhurjaty requested a review from a team as a code owner August 26, 2026 19:53
@adhurjaty adhurjaty changed the title Merge upstream v6.5.1 (alternative to #34) Merge upstream v6.5.1 Aug 26, 2026
@adhurjaty adhurjaty changed the title Merge upstream v6.5.1 Sync upstream v6.5.1 Aug 26, 2026
We run 26.6.4, but upstream v6.5.1 defaults to 26.5.5. Building and testing
against the version we actually deploy is what catches model and API drift --
the kind that forced an earlier bump to pick up passkey attributes on
RealmRepresentation.

Set in the places contrib/scripts/upgrade-keycloak.sh keeps in sync: the pom
property and its default-keycloak-version profile, .env, and the Dockerfile ARG
default. CircleCI inherits the Dockerfile default rather than naming a version
of its own, so there is still one source of truth.

Drops activeByDefault from the pre-keycloak26-6 profile. That profile excludes
OrganizationRepository and OrganizationImportService from compilation and skips
the passkey and organization ITs; leaving it on would silently disable
organization support now that the default server version is 26.6.4. CI is
unaffected either way, since it always passes -Pcoverage, which deactivates
activeByDefault profiles.

keycloak.client.version stays at upstream's 26.0.8 -- the admin client has its
own release line, so moving it is a separate decision.
@adhurjaty adhurjaty changed the title Sync upstream v6.5.1 BOURNE-3024: Sync upstream v6.5.1 Aug 27, 2026
@kermitapp

kermitapp Bot commented Aug 27, 2026

Copy link
Copy Markdown

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.