Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backport of #4449. Refs sequentech/meta#14445 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keycloak 26.7.5 trusts emSign ECC Root CA - G3 and has no newer 26.7.x. Refs sequentech/meta#14445 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
This was referenced Dec 3, 2026
vic3lord
added a commit
that referenced
this pull request
Dec 3, 2026
Parent issue: sequentech/meta#14445 #4449 (crate bumps) is merged. ## Problem Keycloak 26.6.4 trusts `emSign ECC Root CA - G3` in its PEM bundle and JVM `cacerts`. Keycloak 26.8.2 (built 2026-11-19) no longer ships it, so upgrading fixes item 5 without an in-image workaround. ## Result - **Images:** `quay.io/keycloak/keycloak:26.6.4` → `26.8.2` in `Dockerfile.keycloak` (builder and runtime), the three `Dockerfile.keycloak-vstl-*` files and the voter-enrollment integration test. #4449 no longer carries a Keycloak trust-store workaround, so this PR is the fix on `main`. - **Extensions:** compile against Keycloak 26.8.2 (`keycloak.version` in every extension pom; beyond's extensions inherit it). Compiling against the new API caught three changes that a version bump alone would only have hit at runtime (`NoSuchMethodError` / `AbstractMethodError`): 1. **`action-token-login-bridge`:** `Cors.allowedOrigins(token)` is now `checkAllowedOrigins(token)`. **Behaviour change:** a request whose `Origin` isn't in the token's allowed origins now gets HTTP 403 instead of a response without CORS headers. Keycloak's own admin API uses the same call (`AdminRoot`). 2. **`conditional-authenticators`:** `X509ClientCertificateAuthenticator` now takes `legacyCriticalBehavior`. `X509UserResolutionAuthenticator` passes its factory's SPI setting through (default `false`), as the built-in factory does. **Behaviour change (upstream):** on 26.6, a Key Usage / Extended Key Usage mismatch was only fatal when the extension was critical; on 26.8 with the default, any mismatch rejects the certificate. This only applies where a realm's X.509 config sets expected KU/EKU; no realm template in step does. `spi-authenticator--x509-user-resolution--legacy-critical-behavior=true` restores the old behaviour if needed. 3. **`url-truststore-provider`:** `TruststoreProvider` adds `getHttpsTruststore()`, `getHttpsRootCertificates()` and `getHttpsIntermediateCertificates()`. 26.8's `CertificateValidator.validateTrust()` uses these instead of the non-HTTPS methods to validate X.509 client certificates (voter mTLS login). The URL truststore returns its per-realm store from them, as `FileTruststoreProvider` does when no separate HTTPS store is configured. A `null` would fail every X.509 login closed; a different store would trust the wrong CAs. A new unit test pins this. ## Validation Built locally with Apple `container` from this Dockerfile, with beyond's extensions at the pinned submodule commit (`a0ee42e`): - **Maven reactor:** all 15 modules `SUCCESS`, including beyond's `idp-linking-authenticator`, `beyond-keycloak-extensions` and `smart-link-hmac-authenticator`. 369 tests pass, 0 failures (`url-truststore-provider`: 16, including the new `httpsTruststoreIsTheRealmTruststore`). - **`idp-linking-authenticator`:** was still on 26.4.0 in the reactor run above; now compiled against 26.8.2 on its own (22 tests pass). The full image was not rebuilt after this change or after merging the cut #4449. - **`kc.sh build`:** succeeds with all 15 provider jars. - **`start-dev` on Postgres:** `Keycloak 26.8.2 on JVM ... started`. `serverinfo` lists the `url` truststore provider, `x509-user-resolution` and `x509-cert-classifier`, and the `sequent.admin-portal` / `sequent.voting-portal` login themes. - **Login pages:** with internationalization enabled, both Sequent themes render (HTTP 200, username field, 3 locales). - **Pre-existing, not from this PR:** with internationalization disabled, the Sequent themes return HTTP 500 because `template.ftl:329` lists `locale.supported` with no `locale??` guard. Keycloak only sets `locale` when i18n is on, in both 26.6.1 and 26.8.2, so 26.6 does the same. Tracked separately. - **Trust stores in the built image:** | Check | emSign chain | AAA chain | github.com | |---|---|---|---| | `openssl s_client -CAfile` (PEM bundle) | error 20 | error 20 | ok | | Java `HttpClient` (`cacerts`) | PKIX failed | PKIX failed | HTTP 200 | Not tested locally: a real voter X.509 login (needs a realm with an uploaded CA and the Envoy client-cert setup) and the login-bridge CORS flow from the admin portal. Both should be exercised on a dev tenant before rollout. ## Rollout 1. Merge this PR. 2. Deploy to a dev tenant. Check voter X.509 login on a realm with a CA, admin-portal flows that use the login bridge, and the login pages in each language. 3. Then follow the normal per-environment tag bumps. `release/10.0`, `release/10.1` and `ovcs` are on 26.7.5 and get an in-image workaround instead: #4693, #4694, #4695. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * Upgraded the identity platform and its extensions to Keycloak 26.8.2. * **Bug Fixes** * Updated certificate-based authentication compatibility for the newer Keycloak version. * Improved handling of allowed origins in the login bridge. * **Improvements** * Added HTTPS-specific truststore and certificate access, with the same trust information as the existing truststore. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Or Elimelech <vic3lord@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Parent issue: https://github.com/sequentech/meta/issues/14445
Problem
ovcstrustsemSign ECC Root CA - G3, whose eMudhra intermediates have recoverable private keys, in two places: the embeddedwebpki-roots1.0.4 (item 7) and the Keycloak 26.7.5 image (item 5).Result
packages/Cargo.lock:webpki-roots1.0.4 → 1.0.12,rustls-webpki0.103.13 → 0.103.17. Backport of fix(deps): drop compromised eMudhra root from embedded webpki-roots #4449.Dockerfile.keycloak: removes both compromised roots from the PEM and OpenSSL bundles, the hashed directory and the JVMcacerts, and fails the build if either is still trusted. There is no newer 26.7.x image (checked 2026-12-03).mainfixes this with the 26.8.2 upgrade in feat(keycloak): upgrade to 26.8.2 #4456, which changes X.509 and CORS behaviour, so it is not backported here. The block comes from step commit 017c51d.Not covered: the Debian images (they need a rebuild with
ca-certificates 20250419~deb12u2), Hasura, and the url-truststore fail-closed change.Validation
The same RUN block was built on this branch's pinned Keycloak digest (26.7.5) with Apple
container:HttpClient, beforeHttpClient, afterwebpki-roots1.0.4 source matches the root names; 1.0.12 does not.cargo metadata --locked: ok.Rollout
Merge, build images, then bump tags per environment through gitops in agreed windows.
🤖 Generated with Claude Code