Skip to content

Fix GCP bearer header construction - #13615

Open
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:gcp-bearer-header-length
Open

Fix GCP bearer header construction#13615
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:gcp-bearer-header-length

Conversation

@bneradt

@bneradt bneradt commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Build the GCP Authorization header dynamically so long bearer tokens do
not reuse the truncated stack buffer length. Add an end-to-end check
that verifies a token longer than the old buffer is forwarded intact.

Build the GCP Authorization header dynamically so long bearer tokens do
not reuse the truncated stack buffer length. Add an end-to-end check
that verifies a token longer than the old buffer is forwarded intact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 1, 2026 21:39
@bneradt bneradt added this to the 11.0.0 milestone Sep 1, 2026
@bneradt bneradt self-assigned this Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This pull request fixes GCP Authorization header construction in the origin_server_auth plugin so long bearer tokens are not truncated/mishandled, and adds an end-to-end gold test intended to validate forwarding of a token longer than the previous stack buffer.

Changes:

  • Replace fixed-size stack buffer + snprintf construction of the GCP Authorization: Bearer … header with dynamic construction.
  • Add a new gold test path intended to verify that a long GCP bearer token is forwarded intact via a Proxy Verifier replay.
File summaries
File Description
tests/gold_tests/pluginTest/origin_server_auth/origin_server_auth.test.py Adds a long-token GCP remap + verifier replay to validate bearer token forwarding beyond the old buffer size.
plugins/origin_server_auth/origin_server_auth.cc Builds the GCP Authorization header dynamically to avoid truncation/length mismatch issues for long tokens.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants