Skip to content

Anthropic workload identity federation#551

Open
Ankur Goyal (ankrgyl) wants to merge 1 commit into
mainfrom
anthropic-wif
Open

Anthropic workload identity federation#551
Ankur Goyal (ankrgyl) wants to merge 1 commit into
mainfrom
anthropic-wif

Conversation

@ankrgyl
Copy link
Copy Markdown
Contributor

When it's used, we need to send a Bearer token

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-proxy Ready Ready Preview, Comment May 11, 2026 2:55pm

Request Review

Copy link
Copy Markdown

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

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: a7e1f36bd7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

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

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

headers["anthropic-version"] = "2023-06-01";
headers["host"] = fullURL.host;
headers["x-api-key"] = secret.secret;
Object.assign(headers, anthropicAuthHeaders(secret));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Drop stale x-api-key before setting Anthropic bearer auth

In the /chat/completions Anthropic path, this line only merges authorization for WIF secrets, but the mutable headers object can already contain the caller's proxy auth x-api-key. When clients authenticate to this proxy with x-api-key, that token is forwarded upstream together with the new bearer token, which can break Anthropic auth and leaks the proxy credential to the model provider. Clear x-api-key before applying bearer auth for this flow.

Useful? React with 👍 / 👎.

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.

3 participants