Skip to content

feat(e2e): P2-1b Keycloak federated-login E2E (real upstream, full chain) - #349

Merged
voidvec merged 1 commit into
masterfrom
feat/p2-1b-keycloak-e2e
Nov 17, 2026
Merged

voidvec merged 1 commit into
masterfrom
feat/p2-1b-keycloak-e2e

Conversation

@voidvec

@voidvec voidvec commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Purpose

P2-1 batch B: the real-upstream acceptance run for OIDC-in federation — a containerized Keycloak 26 executes the whole registry-driven chain, and the E2E immediately earned its keep by catching a real product bug on its first run.

What lands

tests/e2e/upstream-oidc/run-e2e.sh (+ README): boots Keycloak (start-dev) + fulla-server against local infra, provisions realm/client/user via kcadm (runtime-generated throwaway credentials — nothing credential-like committed), registers the provider through the P2-1a admin CRUD, then drives the complete browser-shaped chain with curl:

authorize dance (guard) -> Keycloak login form POST (real user)
  -> code on the registered redirect -> POST /api/auth/oidc/{provider}/login
  -> first-party token pair -> GET /oauth2/userinfo (sub/email from Keycloak)
  -> login page advertises the provider (type=oidc)

Local result: PASS end to end (Keycloak 26.7.1; KEYCLOAK_IMAGE env for quay-blocked networks; the DB is dropped/re-seeded per run and every upstream secret regenerated from /dev/urandom).

Product fix the E2E caught on its first run: the upstream form transport in IdentityAssembly used addHeader("content-type", ...), which stacked a second default content-type — Keycloak then skipped form parsing entirely (client_not_found on every token exchange). Switched to setContentTypeString, which drogon treats as the single authoritative body content type. This is exactly the class of upstream-facing regression the hermetic fakes cannot see.

CI: new upstream-oidc-e2e job in interop.yml (master/release pushes): builds the server, starts the script-default infra containers, runs the same script — one green/red signal for the whole federation chain.

Verification

  • Local E2E: PASS (full chain, live Keycloak)
  • Full-suite regression after the product fix: 62271/62280 — only the known local-lab AuditExport artifact (CI-green, unrelated; documented in the P2-1a PR)
  • No spec/route/error-code surface changes (e2e tooling + one assembly-internal fix)

…ain)

- tests/e2e/upstream-oidc/run-e2e.sh: boots Keycloak 26 (start-dev) +
  the fulla server against local infra, provisions realm/client/user
  via kcadm (runtime-generated throwaway credentials), registers the
  provider through the admin CRUD, then drives the complete chain with
  curl: authorize dance -> Keycloak login form POST -> code capture ->
  POST /api/auth/oidc/{provider}/login -> first-party token pair ->
  GET /oauth2/userinfo (claims from Keycloak) -> login-page listing.
  PASSes locally end to end (26.7.1 image; KEYCLOAK_IMAGE override for
  quay-blocked networks).
- Product fix found by this E2E on its first run: the upstream form
  transport used addHeader(content-type) which stacked a second
  default header, making Keycloak skip form parsing entirely
  (client_not_found); switched to setContentTypeString.
- interop.yml: new upstream-oidc-e2e job (master/release pushes) runs
  the script on a fresh runner with its own infra containers.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T03:32:03.378184Z
We couldn’t complete this review. Comment @codex review to try again.
f4337dd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@voidvec
voidvec merged commit 5dcc7a9 into master Nov 17, 2026
13 checks passed
@voidvec
voidvec deleted the feat/p2-1b-keycloak-e2e branch November 17, 2026 04:19
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.

1 participant