Skip to content

[codex] add private model credential gateway - #147

Merged
wolfiesch merged 2 commits into
mainfrom
codex/private-model-gateway
Jul 22, 2026
Merged

[codex] add private model credential gateway#147
wolfiesch merged 2 commits into
mainfrom
codex/private-model-gateway

Conversation

@wolfiesch

@wolfiesch wolfiesch commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • add an optional provider-neutral t4-model-gateway workload and OCI image
  • keep the reusable provider credential in that gateway Pod only; session, controller, and cluster-server Pods receive no provider Secret reference
  • pin one HTTPS provider origin plus an exact inference-path allowlist, strip caller authority and proxy headers, reject redirects, and bound request size and duration
  • reread the projected credential per request so Kubernetes Secret rotation does not put the value in environment variables or require a gateway restart
  • wire a ClusterIP Service and fail-closed NetworkPolicies for session-to-gateway and gateway-to-provider traffic
  • remove the obsolete session credential-mode fields from Helm, controller configuration, and runtime preflight
  • publish, scan, attest, and promote the fourth cluster image through the existing Woodpecker evidence pipeline

Why

Cluster sessions expose arbitrary-code tools, so placing reusable provider credentials in the session workload would make them available to user code. The separate gateway preserves model access while reducing the credential-bearing trust boundary to one hardened workload. Exact path allowlisting also prevents the credential from being used against provider account, file, fine-tuning, billing, or other administrative APIs.

Validation

  • pnpm check
  • pnpm test:cluster:ci
  • pnpm --filter @t4-code/model-gateway test
  • pnpm --filter @t4-code/model-gateway typecheck
  • go test ./... in packages/cluster-operator with Helm 3.19.0 available
  • helm lint deploy/charts/t4-cluster
  • broad pnpm test runs: all affected suites passed; two unrelated 5-second integration tests intermittently exceeded their timeout under full concurrent load, then passed in isolation (start-electron.test.ts in 4.6 s for all five cases; runtime-workspace-server.test.ts in 5.0 s for all three cases with its established 30-second fixture timeout)

No cluster deployment, provider Secret, or production configuration is included in this pull request.

@wolfiesch
wolfiesch marked this pull request as ready for review July 22, 2026 05:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17f3041263

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/cluster-ci/cluster-proof.schema.json
@wolfiesch
wolfiesch merged commit 4944284 into main Jul 22, 2026
14 checks passed
@wolfiesch
wolfiesch deleted the codex/private-model-gateway branch July 22, 2026 05:32
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