Skip to content

feat: disable non-inference APIs by default - #23

Merged
reonokiy merged 1 commit into
mainfrom
feat/restricted-api
Nov 7, 2026
Merged

reonokiy merged 1 commit into
mainfrom
feat/restricted-api

Conversation

@reonokiy

@reonokiy reonokiy commented Nov 7, 2026

Copy link
Copy Markdown
Owner

The gateway currently exposes account, history, workspace, authentication and arbitrary native proxy routes alongside inference. This change limits the default HTTP surface to an explicit method/path allowlist: health, models, Responses (HTTP/SSE and WebSocket), compaction, images, standalone search and transcription, including their documented aliases. Other requests are rejected before upstream forwarding with HTTP 403 and endpoint_disabled; gateway authentication still applies.

--restricted-api / --restricted-api=true or CODEX_GATEWAY_RESTRICTED_API=true explicitly enables the full API. In this flag's terminology, true means allow restricted APIs. --restricted-api=false keeps the default restrictions and overrides the environment variable.

Compatibility: Existing clients that use account/profile/usage, history/notes, cloud tasks, workspace/plugins, file storage/transfers, Realtime/live, remote control or generic proxy routes must opt in to full API access. Internal login, credential refresh and model discovery continue normally. This is an endpoint policy; it does not redact inference responses or isolate upstream state between callers.

Includes an account/stored-data API audit and tests for 154 blocked inventory method/path combinations, aliases, unlisted paths/methods, permitted inference/WebSocket requests, CLI defaults and boolean forms, and explicitly enabling account/stored-data routes.

Validation: cargo test --workspace --locked — 307 passed, 0 failed, 12 ignored; cargo fmt --all -- --check; git diff --check. Tests use local mock upstreams; real-account E2E and optional client/source-audit cases were not run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T08:51:22.572163Z e7b4c87 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@reonokiy
reonokiy merged commit 953035d into main Nov 7, 2026
1 of 2 checks passed
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.

1 participant