-
Notifications
You must be signed in to change notification settings - Fork 832
fix Client settings UI to accept * as accepted headers #2400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
akshaydeo
merged 1 commit into
main
from
03-30-fix_client_settings_ui_to_accept_as_accepted_headers
Mar 30, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authorizationis NOT in the runtime security denylistThe PR comment says "security headers are always stripped at runtime unconditionally in ctx.go", but that's only true for most of the security headers —
authorizationis not in thesecurityDenylistmap inctx.go:The direct-header-forwarding path in
ctx.go(lines ~358–378) only guards againstsecurityDenylistheaders. Becauseauthorizationis absent from that map, a request-level client that sendsAuthorization: Bearer sk-ant-…will have that header forwarded directly to the upstream AI provider whenever:authorization*or*(now accepted by this PR), andauthorizationheader doesn't happen to carry a governance virtual-key prefix (which causesreturn trueearly at line 231–237, before the forwarding section is reached).In practice this means: if an admin configures
authorization*in the header-filter allowlist (newly valid under this change), any API caller can inject an arbitraryAuthorizationheader and Bifrost will forward it to the upstream provider — overriding Bifrost's own credential management.The original validation that rejected wildcard patterns matching security headers was the correct guard. If the intent is to allow
authorization*for non-security custom headers,authorizationshould first be added to thesecurityDenylistinctx.goso the runtime actually enforces the strip unconditionally.