[GH-ISSUE #23048] issue: Terminal server "Verify Connection" calls external server directly from browser instead of proxying through backend #35402

Closed
opened 2026-04-25 09:36:42 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @westbrook-ai on GitHub (Mar 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23048

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.8.10

Ollama Version (if applicable)

No response

Operating System

MacOS

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When clicking the "Verify Connection" button in the Add Terminal Server modal, the verification request should be proxied through the Open WebUI backend (similar to how OpenAI and Ollama connection verification works via POST /api/v1/openai/verify and POST /api/v1/ollama/verify). The terminal server API key should never leave the backend.

Actual Behavior

The frontend calls the terminal server URL directly from the browser (fetch(\${baseUrl}/api/v1/policies\) and fetch(\${baseUrl}/api/config\), sending the API key in the Authorization header directly from the client. This has three problems:

API key exposure: The terminal server API key is sent from the browser to the terminal server, rather than being kept server-side. For OpenAI/Ollama connections, the key is sent to the Open WebUI backend which proxies the verification, keeping the key out of the browser's network traffic to external services.
CORS failures: When the terminal server is an in-cluster Kubernetes service (ClusterIP), the browser cannot reach it at all. Even when reachable, the terminal server may not have CORS headers configured for the Open WebUI origin, causing the fetch to fail.
Inconsistency: The putOrchestratorPolicy function in the same file (src/lib/apis/configs/index.ts) also makes direct calls to the terminal server from the browser, same issue.

Steps to Reproduce

  1. Install Open WebUI v0.8.10 from the dev branch via Git Clone.
  2. Start the application with default settings.
  3. Log in as an admin user.
  4. Navigate to Admin Panel → Settings → Integrations → Open Terminal section.
  5. Click the "+" button to add a new terminal server connection.
  6. Enter a terminal server URL (e.g., http://terminal-orchestrator:8080) and an API key.
  7. Open the browser's DevTools → Network tab.
  8. Click the "Verify Connection" button.
  9. Observe: the browser makes a direct GET request to http://terminal-orchestrator:8080/api/v1/policies with the API key in the Authorization header. This request originates from the browser, not from the Open WebUI backend.

Logs & Screenshots

Example screenshot of Network tab when clicking Verify Connection:

Image

Additional Information

No response

Originally created by @westbrook-ai on GitHub (Mar 26, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23048 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.8.10 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When clicking the "Verify Connection" button in the Add Terminal Server modal, the verification request should be proxied through the Open WebUI backend (similar to how OpenAI and Ollama connection verification works via `POST /api/v1/openai/verify` and `POST /api/v1/ollama/verify`). The terminal server API key should never leave the backend. ### Actual Behavior The frontend calls the terminal server URL directly from the browser (`fetch(\${baseUrl}/api/v1/policies\`) and `fetch(\${baseUrl}/api/config\`), sending the API key in the `Authorization` header directly from the client. This has three problems: **API key exposure**: The terminal server API key is sent from the browser to the terminal server, rather than being kept server-side. For OpenAI/Ollama connections, the key is sent to the Open WebUI backend which proxies the verification, keeping the key out of the browser's network traffic to external services. **CORS failures**: When the terminal server is an in-cluster Kubernetes service (ClusterIP), the browser cannot reach it at all. Even when reachable, the terminal server may not have CORS headers configured for the Open WebUI origin, causing the fetch to fail. **Inconsistency**: The `putOrchestratorPolicy` function in the same file (`src/lib/apis/configs/index.ts`) also makes direct calls to the terminal server from the browser, same issue. ### Steps to Reproduce 1. Install Open WebUI v0.8.10 from the `dev` branch via Git Clone. 2. Start the application with default settings. 3. Log in as an admin user. 4. Navigate to **Admin Panel → Settings → Integrations → Open Terminal** section. 5. Click the **"+"** button to add a new terminal server connection. 6. Enter a terminal server URL (e.g., `http://terminal-orchestrator:8080`) and an API key. 7. Open the browser's **DevTools → Network** tab. 8. Click the **"Verify Connection"** button. 9. **Observe:** the browser makes a direct `GET` request to `http://terminal-orchestrator:8080/api/v1/policies` with the API key in the `Authorization` header. This request originates from the browser, not from the Open WebUI backend. ### Logs & Screenshots Example screenshot of Network tab when clicking Verify Connection: <img width="758" height="258" alt="Image" src="https://github.com/user-attachments/assets/f1ada88d-f35e-4903-a968-b1f0960b2f13" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 09:36:42 -05:00
Author
Owner

@Arokha commented on GitHub (Mar 26, 2026):

NB: This is a shared modal, the same one used for adding user-specific from-browser OT connections as used in the admin panel to add system-wide OT connections. So care should be taken to not break the other one, since, the user-specific from-browser OT connections (set up in your own user settings modal) SHOULD be doing it this way.

<!-- gh-comment-id:4138920856 --> @Arokha commented on GitHub (Mar 26, 2026): NB: This is a shared modal, the same one used for adding user-specific from-browser OT connections as used in the admin panel to add system-wide OT connections. So care should be taken to not break the other one, since, the user-specific from-browser OT connections (set up in your own user settings modal) SHOULD be doing it this way.
Author
Owner

@Classic298 commented on GitHub (Mar 26, 2026):

a641325707

<!-- gh-comment-id:4138941262 --> @Classic298 commented on GitHub (Mar 26, 2026): https://github.com/open-webui/open-webui/commit/a6413257079a52fa4487eda36543f3955d0fbd53
Author
Owner

@tjbck commented on GitHub (Mar 26, 2026):

Addressed.

<!-- gh-comment-id:4138947759 --> @tjbck commented on GitHub (Mar 26, 2026): Addressed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35402