Skip to content

fix: Talk repeats the gateway password when voice starts - #172448

Open
DonnieFi wants to merge 1 commit into
openclaw:mainfrom
DonnieFi:fix/172403-realtime-offer-auth
Open

DonnieFi wants to merge 1 commit into
openclaw:mainfrom
DonnieFi:fix/172403-realtime-offer-auth

Conversation

@DonnieFi

Copy link
Copy Markdown
Contributor

Closes #172403

What Problem This Solves

Fixes: mobile Talk shows Realtime WebRTC setup failed (401) and repeats the gateway password prompt when the Control UI is opened through a reverse proxy that uses HTTP basic auth.

User Impact

User impact: a signed-in browser session can start Talk without the offer request occupying Authorization. Re-entering the gateway password is no longer required to get the reservation token past the proxy.

Native clients that already send Authorization: Bearer keep working. Direct api.openai.com offers still send that bearer token and do not send the reservation header.

Why This Change Was Made

Talk posted the single-use reservation as Authorization: Bearer on every offer, including /plugins/openai/realtime/calls. The proxy uses that same header for the gateway password, so it can answer 401 before the gateway sees the reservation. The browser then shows its password dialog again, and a script-set Authorization header keeps the cached password from replacing the bearer token.

Gateway-origin offers now send the reservation in X-OpenClaw-Realtime-Token, leave Authorization unset, and use credentialed fetch so the browser can attach the cached basic credentials. The offer route accepts that header or the existing bearer token. Its own 401 does not send WWW-Authenticate. CORS allows the new header and credentialed browser origins.

Exempting the offer path from the proxy's password check is not this fix.

Evidence

  • Control UI offer tests: a gateway-relative offer and a same-origin absolute offer send X-OpenClaw-Realtime-Token and no Authorization; a direct https://api.openai.com/v1/realtime/calls offer still sends Authorization: Bearer and does not include credentials. webrtc.test.ts still passes.
  • Offer route tests: Authorization: Basic plus the reservation header returns the SDP answer; basic auth alone returns 401 Invalid or expired realtime session token with no WWW-Authenticate. Preflight allows X-OpenClaw-Realtime-Token and credentialed CORS.
  • Not replayed in mobile Chrome against the live gateway. The live gateway was left untouched.

Browser Talk posted the realtime reservation as Authorization: Bearer.
A reverse proxy that uses the same header for the gateway password
answers 401 before the gateway sees the token, and the password
prompt repeats.

Gateway-origin offers now send the reservation in
X-OpenClaw-Realtime-Token and leave Authorization unset so the
browser can attach its cached basic credentials. Direct OpenAI
offers still use Bearer. The offer route accepts either header and
does not challenge for basic auth.

Refs: openclaw#172403
@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime extensions: openai size: M labels Oct 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR moves Gateway-origin browser Talk reservations into a dedicated header so HTTP Basic proxy credentials can accompany the offer.

Example: Mobile Chrome starts Talk through a Caddy proxy protecting /plugins/openai/realtime/calls with HTTP Basic authentication.

  • Before: The offer sends Authorization: Bearer reservation-token, displacing the proxy credentials and potentially receiving a 401 password challenge.
  • After: The offer sends X-OpenClaw-Realtime-Token: reservation-token and permits cached Basic credentials in Authorization; successful browser operation remains unverified.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation has no definite introduced finding, but supplied proof is mocked and the authentication-contract direction remains owner-owned.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: A browser user behind HTTP Basic ingress cannot start Talk because its reservation bearer token occupies the header needed by the proxy.
Reason: The focused interoperability improvement has clear user value, but extends the existing documented authentication contract without recorded owner approval.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep this PR open: it offers a coherent, focused remedy for the reported authentication collision, and current main still sends the reservation through Authorization.

Priority: P2
Reviewed head: 65672c5a49bfef0970a66729bd1546f9a897d2db
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should browser Talk support HTTP Basic ingress by adding this reservation-header contract and credentialed CORS behavior?
  • Recommendation: Support the dedicated reservation header: Accept the interoperability direction, subject to real-browser and authorization-boundary evidence, while retaining bearer authentication for existing clients.
  • Why: The patch extends the documented authentication transport built by the Talk owners, while the linked report was previously closed as operator-owned proxy configuration and no maintainer has approved this extension.

Before merge

  • Add real behavior proof - Authority-chain proof required: exercise the changed browser exchange through Basic-auth ingress and the shipped Gateway offer route, recording successful SDP exchange and Talk startup; show proxy-only credentials, disallowed origins, and canceled, expired, or consumed reservations rejected before upstream call creation. The supplied tests mock fetch, responses, and provider sockets, and the inspected screenshot predates the patch. Include a latest-stable upgrade with existing configuration intact and retained bearer-client behavior; redact credentials, IPs, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security review attention item - No concrete authorization bypass was found, but the changed credential transport requires final-effect authorization evidence.
  • Resolve merge risk - Before merge, establish that credentialed offers using the new header cannot allocate an upstream call with proxy credentials alone, a disallowed browser origin, or a canceled, expired, or consumed reservation.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied after-fix browser/proxy trace shows Talk connecting without another password challenge, and no base-failing/head-passing run or final-effect negative authorization scenario is recorded.
Agent review details

How this fits together

The Control UI exchanges a browser-generated SDP offer with the OpenAI plugin's Gateway broker, which validates a single-use reservation, creates the upstream call, and returns its SDP answer.

flowchart LR
  A[Control UI Talk] --> B[Basic auth proxy]
  B --> C[Gateway offer route]
  C --> D[Reservation owner]
  D --> E[OpenAI call transport]
  E --> F[SDP answer]
  F --> A
Loading

Technical review

Best possible solution:

Adopt an owner-approved reservation transport that supports proxy authentication while preserving existing bearer clients and reservation authorization.

Do we have a high-confidence way to reproduce the issue?

Source establishes that Talk occupies Authorization with its reservation token, which conflicts with a proxy requiring Basic authentication; the inspected screenshot confirms a 401 but does not identify the rejecting server, and no current-main browser reproduction was run.

Is this the best way to solve the issue?

Separating the reservation from proxy credentials is a plausible, bounded solution that retains the existing broker owner, but adopting the new transport requires owner direction and browser evidence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1616d35dcb7f.

Merge-risk options

Maintainer options:

  1. Verify the new transport before adoption (recommended)
    Provide a browser/proxy trace of successful Talk startup and production-boundary evidence that unauthorized or retired reservations cause no upstream call.
  2. Pause the transport extension
    Retain the current bearer transport until the Talk owner settles proxy support and the authorization evidence is available.

Provenance checked

  • Browser offer authentication and Gateway-relative URL resolution changes intended behavior with a stated reason (de9ed64: The original feature enabled subscription-backed browser Talk using a bounded single-use exchange token while keeping upstream OAuth credentials server-side.)
  • Gateway-owned OpenAI offer authorization keeps the original intent (f78ba09: The broker creates and controls GPT-Live calls server-side, authenticating the browser exchange with its reservation token.)
  • Offer HTTP response and token-parsing helper keeps the original intent (32b4abb: The transport refactor centralized helpers while ensuring rejected uploads receive their selected HTTP response before connection cleanup.)

Testing

Proof path: in-process harness.

Security

Needs attention: No concrete authorization bypass was found, but the changed credential transport requires final-effect authorization evidence.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f78ba09 adds extensions/openai/realtime-quicksilver-session.ts:518 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f78ba091207b; files: extensions/openai/realtime-quicksilver-session.ts)
  • Colin Johnson: Raw commit de9ed64 adds ui/src/pages/chat/realtime-talk-webrtc-support.ts:48 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: de9ed64c2931; files: ui/src/pages/chat/realtime-talk-webrtc-support.ts)

PR surface

Source +76, Tests +176, Docs +7. Total +259 across 9 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 100 24 +76
Tests 4 180 4 +176
Docs 2 9 2 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 289 30 +259

Labels

Label changes:

  • add P2: The improvement addresses Talk startup in deployments using HTTP Basic ingress, with a limited deployment-specific blast radius.
  • add merge-risk: 🚨 compatibility: The shared browser exchange changes the authentication transport for Gateway-origin offers and adds a documented plugin HTTP contract requiring owner agreement.
  • add merge-risk: 🚨 security-boundary: The patch changes an authority-bearing token's transport and enables credentialed CORS without supplied final-effect authorization proof.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: The improvement addresses Talk startup in deployments using HTTP Basic ingress, with a limited deployment-specific blast radius.
  • merge-risk: 🚨 compatibility: The shared browser exchange changes the authentication transport for Gateway-origin offers and adds a documented plugin HTTP contract requiring owner agreement.
  • merge-risk: 🚨 security-boundary: The patch changes an authority-bearing token's transport and enables credentialed CORS without supplied final-effect authorization proof.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record successful browser Talk startup through HTTP Basic ingress on the patched build.
  • Prove forbidden and retired reservations cause no upstream call through the production authorization owner.
  • Obtain the Talk owner's decision on the new browser authentication contract.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 14, 2026, 2:48 PM ET / 18:48 UTC.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation extensions: openai gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Mobile Talk shows Realtime WebRTC setup failed (401) and repeats the gateway password prompt

1 participant