Skip to content

Require authentication for remote server binding - #1687

Draft
Thump604 wants to merge 1 commit into
ml-explore:mainfrom
Thump604:604/upstream-remote-server-auth
Draft

Require authentication for remote server binding#1687
Thump604 wants to merge 1 commit into
ml-explore:mainfrom
Thump604:604/upstream-remote-server-auth

Conversation

@Thump604

@Thump604 Thump604 commented Aug 9, 2026

Copy link
Copy Markdown

What changed

  • Require an API key when binding to a non-loopback address.
  • Authenticate GET and POST endpoints with a constant-time bearer-token comparison.
  • Support --api-key and MLX_LM_API_KEY.

Root cause

Explicit remote binding exposed dynamic model, draft, and adapter selection without authentication while wildcard CORS was enabled by default.

Validation

  • Regressions verify unauthenticated requests return 401 and remote binding without a key is rejected.

Fixes #1695

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote server binding exposes model selection without authentication

1 participant