Repository navigation
fix: use JWT-shaped bearer tokens in A2A request context tests - #7331
Merged
Merged
Conversation
Replace the scrubbed ***REMOVED*** placeholders with a JWT-shaped constant. _is_jwt_token() drops opaque tokens, so three tests received None. Build the token at runtime from three meaningless base64url segments. Signed-off-by: Jonathan Springer <jps@s390x.com>
jonpspri
requested review from
Lang-Akshay,
brian-hussey,
ja8zyjits and
msureshkumar88
as code owners
October 23, 2026 12:44
Encode the header, payload and sig placeholder words at runtime. Shorten the explanatory comment. Signed-off-by: Jonathan Springer <jps@s390x.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 23, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 23, 2026
Signed-off-by: Jonathan Springer <jps@s390x.com>
jonpspri
dismissed stale reviews from Lang-Akshay, brian-hussey, and prakhar-singh1928
via
October 23, 2026 14:57
bd7f6d4
This was referenced Oct 27, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Three tests in
TestRequestContextBearerTokenExtractionfailed withassert None == '***REMOVED***'.A secret scrub replaced the test tokens with the literal
***REMOVED***._is_jwt_token()rejects tokens that lack three base64url segments, so_extract_a2a_request_contextdropped the bearer token and returnedNone.Changes
JWT_SHAPED_TOKENconstant intests/unit/mcpgateway/test_a2a_jsonrpc_passthrough.py.***REMOVED***placeholders with the constant.# pragma: allowlist secretcomments, which no longer apply.No production code changes.