chore(ci): update e2e test environments to Keycloak 26.4 - #3792
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
📝 WalkthroughWalkthroughKeycloak tooling now uses version 26.4, and runtime and integration containers enable DPoP. OAuth tests use the standard image and OpenID configuration readiness checks. The startup action accepts and validates an allowlisted bootstrap reference for downloads. ChangesKeycloak configuration and OAuth integration
Configurable startup bootstrap
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
There was a problem hiding this comment.
Pull request overview
Updates the repo’s CI/e2e/integration Keycloak targets to align on Keycloak 26.4 (matching the already-upgraded runtime image), removing reliance on an orphaned SHA-pinned custom image and making DPoP enablement explicit for test environments.
Changes:
- Switched the cert-exchange OAuth integration test Keycloak container from a SHA-pinned custom image to
ghcr.io/opentdf/keycloak-standard:26.4.0, and replaced log-based readiness with an HTTP readiness check. - Enabled DPoP explicitly via
KC_FEATURES=dpopacross docker-compose, OAuth integration tests, and ERS Keycloak integration tests. - Updated the temporary truststore/keytool helper scripts to use
keycloak/keycloak:26.4.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
test/integration/oauth/oauth_test.go |
Unifies Keycloak image usage, adds explicit DPoP feature enablement, and improves container readiness checks to reduce test flakiness. |
service/entityresolution/integration/keycloak_test.go |
Enables DPoP feature flag in the ERS integration Keycloak container env for consistency with 26.4 behavior. |
docker-compose.yaml |
Sets KC_FEATURES: dpop so local/dev and container-based test flows consistently run with DPoP enabled. |
.github/scripts/init-temp-keys.sh |
Updates the keytool container image tag used to build the truststore to Keycloak 26.4. |
.github/scripts/init-temp-keys.cmd |
Windows equivalent update of the keytool container image tag to Keycloak 26.4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
abc403f to
d1081e9
Compare
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
- Bump keytool image keycloak/keycloak:25.0 -> 26.4 in init-temp-keys.{sh,cmd}
- Consolidate the cert-exchange OAuth test onto keycloak-standard:26.4.0,
removing the orphaned SHA-pinned custom image (ghcr.io/opentdf/keycloak);
switch its readiness probe to an HTTP check to avoid a 26.4 startup race
- Enable DPoP feature (KC_FEATURES: dpop) across docker-compose and the
OAuth/ERS test containers (DPoP is supported/default-on in 26.4; set
explicitly for robustness)
- Add a 'bootstrap-ref' input to the start-up-with-containers composite action
so the docker-compose.yaml / init-temp-keys.sh / watch.sh bootstrap files can
be fetched from an allowlisted ref (main, pqc-enabled, or DSPX-4190; default
unchanged: pqc-enabled). These files are executed, so the input is restricted
to a vetted allowlist rather than an arbitrary branch/tag.
Fixes DSPX-4190
Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
d1081e9 to
8905606
Compare
|
@elizabethhealy I removed allowing workflow runs against the DSPX-4190 (this) branch, so it needs a re-stamp |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/start-up-with-containers/action.yaml`:
- Around line 10-17: Update the bootstrap reference handling used by the
workflow’s three downloads to resolve the approved main and pqc-enabled refs to
reviewed immutable commit SHAs before constructing URLs. Use the resolved SHA
consistently for docker-compose.yaml, init-temp-keys.sh, and watch.sh,
preserving the existing allowlist and default behavior while preventing mixed
revisions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 037b2b5b-ed5f-47b9-b6ff-e377a4ec698c
📒 Files selected for processing (6)
.github/scripts/init-temp-keys.cmd.github/scripts/init-temp-keys.shdocker-compose.yamlservice/entityresolution/integration/keycloak_test.gotest/integration/oauth/oauth_test.gotest/start-up-with-containers/action.yaml
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
) ## What Bump the `start-up-with-containers` pin to `18b8070f` (opentdf/platform#3792) and pass `bootstrap-ref: main` on the `main` platform lane only. ## Why The action overlays `docker-compose.yaml` from `bootstrap-ref`, **independent of `platform-ref`**. That input defaults to the `pqc-enabled` tag, which is still pinned to `keycloak/keycloak:25.0` — a Keycloak that cannot issue DPoP-bound access tokens. So every lane ran KC 25 even though platform `main`'s own compose has been `ghcr.io/opentdf/keycloak-standard:26.4.0` with `KC_FEATURES: dpop` since #3792, and `service/cmd/keycloak_data.yaml` provisions `opentdf-dpop` with `dpop.bound.access.tokens: "true"`. The visible symptom: `test_dpop.py::test_dpop_happy_path_roundtrip` fails for any SDK that checks token binding. The token comes back `typ=Bearer` with no `cnf.jkt`, and the js CLI rejects it: ``` [CRITICAL] DPoP requested but the access token is not bound (missing cnf.jkt) ``` go and java pass only because they don't assert `cnf.jkt`. The other `test_dpop.py` cases already self-skip on `token_type != DPoP`; the SDK-level roundtrips gate on the platform well-known and SDK features, not on IdP capability, so they run and fail. This is what keeps opentdf/web-sdk#939 red. Released platform tags keep the 25.0 bootstrap — they predate the move to standard Keycloak token exchange (opentdf/platform#3754). ## Testing Dispatched against this branch with `platform-ref=main`, `js-ref=refs/pull/939/merge`, `focus-sdk=js` — https://github.com/opentdf/tests/actions/runs/31016132383 — all three lanes green (`go@main`, `java@main`, `js@pull-939`). Confirmed Keycloak 26.4 came up, and these ran rather than skipped: ``` PASSED test_dpop.py::test_dpop_happy_path_roundtrip[small-js@pull-939-js@pull-939-in_focus0] PASSED test_dpop.py::test_dpop_happy_path_roundtrip[small-js@pull-939-java@main-in_focus0] PASSED test_dpop.py::test_dpop_rejects_replayed_jti[small-js@pull-939-in_focus0] PASSED test_dpop.py::test_dpop_rejects_tampered_proof_htu[small-js@pull-939-in_focus0] PASSED test_dpop.py::test_dpop_bearer_scheme_warns_but_accepted_for_dpop_token[small-js@pull-939-in_focus0] ``` The nonce-dependent cases still skip, correctly — `dpop-challenge` is off by default, so `require_nonce` is unset. ## Notes - The new action's input set is a strict superset of the old pin's; no call-site changes beyond `bootstrap-ref`. - `start-additional-kas` is left at `6dd5f649` — it downloads no compose. - Overlaps #568 (DSPX-4190), which took the broader approach of moving every lane to 26.4 via a platform PR branch. This is the narrow slice needed now; #568's remaining checklist (re-point the `pqc-enabled` tag, align `vulnerability.yml`) still stands. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated platform startup workflows to use the Keycloak 26.4 revision. * Adjusted bootstrap selection so the main platform lane uses the main configuration while released tags retain the PQC-enabled configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
Summary
Updates all test/CI/e2e Keycloak targets to 26.4+. The runtime image (
ghcr.io/opentdf/keycloak-standard:26.4.0) was already at 26.4; this cleans up the remaining stale/orphaned targets.Fixes DSPX-4190
Changes
25.0 → 26.4in.github/scripts/init-temp-keys.shandinit-temp-keys.cmd(used only as akeytoolentrypoint to build the truststore).ghcr.io/opentdf/keycloak:sha-8a6d35a(no semver tag, no public source repo). RepointedsetupCustomKeycloakForCertExchangeatkeycloak-standard:26.4.0, dropped the redundant legacyKEYCLOAK_ADMIN*env vars, and switched its readiness probe fromwait.ForLog("Running the server")to an HTTP check — on 26.4 that log line is printed before the HTTP connector accepts connections, which raced the admin login (EOF).KC_FEATURES: dpopindocker-compose.yaml(covers thestart-up-with-containersaction + BDD suite transitively) and in the OAuth + ERS test containers. DPoP is supported/default-on in 26.4; set explicitly for robustness. Theopentdf-dpopclient attribute is unchanged.start-up-with-containersaction: newbootstrap-refinput. The action overlaysdocker-compose.yaml/init-temp-keys.sh/watch.shby fetching them from a hardcodedpqc-enabledtag (independent ofplatform-ref). Added abootstrap-refinput (defaultpqc-enabled, so existing behavior is unchanged) so those bootstrap files can be pulled from any branch/tag/SHA — letting downstream e2e workflows test infra changes like this one from a PR branch before the tag is moved.Testing
Run against
keycloak-standard:26.4.0(local Docker):TestOAuthTestSuite— pass, including both DPoP tests and standard token exchange.TestCertExchangeTestSuite— pass; X.509 cert-exchange flow works on the standard image (validates dropping the custom image).service/entityresolution/integration/...— pass with the DPoP env addition.make fmt/gofmtclean; remaining lint findings are pre-existing and unrelated.To exercise cross-repo e2e workflows on this branch, reference the action at this branch and set both refs:
Notes
tdf_claimsmapper so the custom image can be fully retired.Summary by CodeRabbit
New Features
Bug Fixes