@W-23493263 Add JWT Bearer authentication to Arrow Flight - #665
Merged
jakeichikawasalesforce merged 10 commits intoAug 19, 2026
Conversation
Without it Tornado treats the 2MB body as form-urlencoded and newer Python parse_qsl rejects it with 400 before TabPy's 413 check runs.
Keep util.py unchanged so the pre-existing PBKDF2 hash stays out of this diff. Flight header parsing now lives in flight_headers.py.
jakeichikawasalesforce
marked this pull request as ready for review
August 18, 2026 21:09
Hold a per-URI fetch lock only around forced JWKS refreshes so a forged unknown kid cannot reject valid HTTP or Flight tokens. Flight still follows TABPY_TRANSFER_PROTOCOL, including http, matching the existing HTTP Basic/Bearer cleartext behavior.
Keep unknown-kid cooldown publication under refresh ownership and preserve opaque Flight sessions without cross-user capacity eviction.
Keep TabPy's parsed-key snapshot synchronized with PyJWT's cache and clarify the remaining cold-fetch availability tradeoff.
jmoens
approved these changes
Aug 19, 2026
jakeichikawasalesforce
deleted the
w-23493263-arrow-flight-jwt-middleware
branch
August 19, 2026 21:40
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
Adds JWT Bearer authentication to TabPy's Arrow Flight (gRPC) path so OAuth-configured clients can use Flight. Companion to #664, which covers HTTP JWT authentication.
JwtAuthServerMiddlewareFactory, reusingjwt_auth.validate_jwt; failures surface as gRPCUNAUTHENTICATED.kidshare the result, while other unknown kids fail without starting additional fetches.kidmatching and cooldown publication atomic and rate-limits repeated failed refreshes for 30 seconds.Authorizationvalues while accepting repeated copies of the same value.Testing
python -m pytest tests/unit -q: 196 passedFlightClienttransport coverage for valid JWTs, invalid JWTs, and required scopes: 3 passedflake8on all changed Python files: passedkidrefresh sharing, atomic cooldown publication, cooldown-expiry recovery, and warm-cache nonblocking behaviorGUS: W-23493263