[0.1.16] [macOS] Load-balancer affinity cookie disables browser sign-in

未关闭
#63 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
electron, typescript

调研方向

The sign-in decision lives in signInWithBrowser in src/main/sessions.ts, which checks accessHeaders(...).Cookie and returns false on any cookie for the WebUI. Read that function and how the connection's session cookies are gathered, then reproduce by serving a fake /api/config that sets an affinity cookie. Done when the browser flow runs for a reachable WebUI with only affinity cookies, while known access-proxy cookies such as CF_Authorization still fall back to in-app sign-in.

由索引模型根据 Issue 内容生成。

描述

Version

0.1.16

Platform

macOS

Description

Behind a load balancer that sets a session-affinity cookie, Tether never uses browser sign-in.

signInWithBrowser returns false as soon as the connection's session holds any cookie for the WebUI (accessHeaders(...).Cookie in src/main/sessions.ts), treating it as an access-proxy cookie. Affinity cookies (Gateway API sessionPersistence, AWS ALB, nginx ingress affinity: cookie, Traefik sticky sessions) are set on the first page load, so Tether always falls back to in-app sign-in, even though the server supports auth sessions and /api/config works without the cookie.

Expected: browser sign-in (PKCE + loopback) whenever the WebUI is reachable without cookies.

Suggestion: fall back only when the cookies are needed, e.g. probe api/config without cookies and use browser sign-in if it succeeds, or only treat known access-proxy cookies (such as CF_Authorization) that way.

Steps to reproduce
  1. Put Open WebUI 0.13.x with OIDC sign-in behind a gateway that sets an affinity cookie (Path=/) on every response.
  2. Add the connection in Tether and click the OIDC provider button.
  3. Sign-in opens inside the app instead of the system browser.
Additional context

Open WebUI 0.13.3, OIDC only (password login disabled); /api/config reports features.auth_sessions: true and the provider. In-app sign-in works; only the browser flow is skipped. Removing the affinity cookie isn't a good option for us: the relay WebSocket carries it too, which keeps relay traffic on the same replica as the user's requests.

主要语言
TypeScript
星标
199
派生
10
平均合并
1 分钟
30 天内合并 PR
15

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

open-webui/tether 的其他 Issue

查看 open-webui/tether 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。