Skip to content

LiteLLM proxy endpoints accept anonymous requests when Copilot is enabled #5420

Closed

Description

@Yicong-Huang

What happened?

access-control-service/src/main/scala/org/apache/texera/service/resource/AccessControlResource.scala defines two JAX-RS proxies that forward to the deployment's LiteLLM instance:

  • LiteLLMProxyResource at /chat/* (chat completions)
  • LiteLLMModelsResource at /models (model listing)

Both classes are annotated @PermitAll and contain no internal authentication / authorization beyond a GuiConfig.guiWorkflowWorkspaceCopilotEnabled feature-flag check. With the eager JwtAuthFilter from PR #5404 enabled and Copilot turned on at deploy time, any unauthenticated caller can reach /api/chat/... or /api/models and spend the deployment's LLM credits / quota.

PR #5404 left the @PermitAll in place to preserve pre-eager-filter behavior — its description explicitly defers this hardening: "Whether /chat/* should require an authenticated user is a separate hardening decision."

How to reproduce?

  1. Bring up access-control-service (port 8081) on a build that has guiWorkflowWorkspaceCopilotEnabled = true and a live LiteLLM endpoint.
  2. With no Authorization header:
    • curl -X POST http://localhost:8081/api/chat/completions -H "Content-Type: application/json" -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'
    • curl http://localhost:8081/api/models
  3. Observe: both requests proxy to LiteLLM with the deployment's LLM_API_KEY and return the response. The caller is fully anonymous.

Branch

main

Commit Hash (Optional)

(after #5404 lands)

What browsers are you seeing the problem on?

  • n/a (server-side)

Relevant log output

INFO  org.eclipse.jetty.server.RequestLog: [...] - "POST /api/chat/completions HTTP/1.1" 200
INFO  org.apache.texera.service.resource.LiteLLMProxyResource: Proxying POST request to LiteLLM: http://localhost:9096/chat/completions

Activity

  1. added theissue type on Jun 6, 2026
  2. self-assigned this
    on Jun 6, 2026
  3. added 2 commits that reference this issue on Jun 7, 2026
    24e5b70
    afc5f98
  4. added a commit that references this issue on Jun 16, 2026
    64b9352
  5. added a commit that references this issue on Jun 22, 2026
    10f588b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions