Skip to content

[Backport release-1.5] fix(dashboard): unbreak CORS on expired session for k8s API calls - #3291

Merged
myasnikovdaniil merged 1 commit into
release-1.5from
backport-2788-to-release-1.5
Jul 15, 2026
Merged

myasnikovdaniil merged 1 commit into
release-1.5from
backport-2788-to-release-1.5

Conversation

@github-actions

Copy link
Copy Markdown

Description

Backport of #2788 to release-1.5.

… paths

Two related issues caused the dashboard SPA to break with CORS errors
after the kc-access cookie expired:

1. KeycloakClient for dashboard had no webOrigins set, so the operator
   never touched the field in Keycloak after initial creation. After
   any rootUrl change the existing webOrigins value became stale and
   blocked CORS from the SPA. Setting "+" tells Keycloak to derive
   allowed origins from redirectUris.

2. oauth2-proxy returned 302 -> Keycloak /auth for unauthenticated
   XHR/fetch on /api and /apis. The login page does not emit
   Access-Control-Allow-Origin, so the SPA's fetch failed with CORS.
   --api-route makes oauth2-proxy answer 401 without redirect, so the
   SPA can handle the re-auth itself via top-level navigation.

Signed-off-by: Ivan Okhotnikov <[email protected]>
(cherry picked from commit be8f6b4)
@dosubot dosubot Bot added area/dashboard Issues or PRs related to the dashboard / UI kind/backport Categorizes issue or PR as requiring a backport to the current release line kind/bug Categorizes issue or PR as related to a bug labels Jul 14, 2026
@myasnikovdaniil
myasnikovdaniil merged commit 1cbc5af into release-1.5 Jul 15, 2026
7 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the backport-2788-to-release-1.5 branch July 15, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dashboard Issues or PRs related to the dashboard / UI kind/backport Categorizes issue or PR as requiring a backport to the current release line kind/bug Categorizes issue or PR as related to a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants