Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Fix the manual-verification report QR destination - #4702

Merged
Findeton merged 7 commits into
ovcsfrom
rc50-handoff-qr
Dec 3, 2026
Merged

Findeton merged 7 commits into
ovcsfrom
rc50-handoff-qr

Conversation

@Findeton

@Findeton Findeton commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Use the configured login and verifier destination for the manual-verification QR and test link construction. Keep the existing verification and authorization flow. Initial draft; exact-head review, CI and demo scan pending.

…meta#15634) (ovcs)

Build the login redirect from URL path segments so a trailing slash,
sub-path (offline EMS/LAN) or ID characters cannot yield a different
redirect URI. Accept the issued link only as a Keycloak action-token URL
with a single `key` query parameter, no credentials or fragment, refuse
the internal KEYCLOAK_URL origin when a distinct KEYCLOAK_PUBLIC_URL is
configured, and percent-encode it for the QR script literal.

Tracker: meta#15633

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 2

  • release/10.0
  • feat/meta-12767/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Findeton and others added 3 commits December 3, 2026 14:15
…m (meta#15634) (ovcs)

Resolve the expected browser-facing action-token route before issuing:
the configured KEYCLOAK_PUBLIC_URL (or KEYCLOAK_URL for single-origin
deployments), keeping any path prefix, plus the event realm from
get_event_realm and /login-actions/action-token. Invalid frontend
configuration fails before a token is minted. The issued link must
match that scheme, host, port and path exactly with a single `key`, and
is rebuilt from the expected route before being encoded for the QR.

The Keycloak issuer now explicitly builds both the link and the token
issuer from the FRONTEND URL (hostname / realm frontend URL) rather than
the address of the backchannel request.

Tracker: meta#15633

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chor (meta#15634) (ovcs)

In the pinned Keycloak (26.7.0) KeycloakContext.getUri() already returns
the FRONTEND URL info, so getUri(UrlType.FRONTEND) changed nothing at
runtime. Restore the plain call and stub it once in the test, keeping the
exact link and issuer assertions on a prefixed (/auth) frontend.

Keep the strict windmill route check (KEYCLOAK_PUBLIC_URL, else
KEYCLOAK_URL, plus the event realm and action-token path) and document
that Keycloak's hostname / realm frontendUrl must name the same origin
and prefix. Add a synthetic test rendering the shipped user template with
the production Handlebars registry: the QR text equals the decoded
"Login Link" anchor href.

Tracker: meta#15633

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…meta#15634) (ovcs)

Where Windmill reaches Keycloak on an internal URL and Keycloak's hostname
is dynamic, the FRONTEND URL info is request-derived (internal), so the
issued link fails Windmill's public-route check. Add the optional Keycloak
server environment variable MANUAL_VERIFICATION_KEYCLOAK_PUBLIC_URL, used
only for manual verification issuance: an HTTP(S) base without
credentials, query, fragment or dot segments, normalized to a trailing
slash. One base-only UriInfo builds both the token issuer/audience and the
action-token link, so the token verifies when redeemed on that browser
origin. Invalid values fail closed before voter lookup or minting; unset
or blank keeps Keycloak's frontend. The request cannot influence it, and
global hostname, verification and auth are unchanged.

Synthetic tests cover the split internal/public topology, blank fallback,
base normalization and invalid values.

Tracker: meta#15633

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-12-03 23:30 UTC

Findeton and others added 3 commits December 3, 2026 19:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ycloak's hostname provider (meta#15634)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Findeton
Findeton marked this pull request as ready for review December 3, 2026 23:16
@Findeton
Findeton merged commit aa7f107 into ovcs Dec 3, 2026
63 of 67 checks passed
@Findeton
Findeton deleted the rc50-handoff-qr branch December 3, 2026 23:17
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