[SQL][CONNECT] SparkConnectClient may drop metadata (auth headers) on retried/reattached RPCs if metadata is a non-list iterable
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Iniziare in python/pyspark/sql/connect/client/reattach.py, in corrispondenza dell'assegnazione dei metadati di SparkConnectClient, quindi tracciare il modo in cui _metadata viene riutilizzato da ReattachExecute, ReleaseExecute e dagli RPC ExecutePlan ritentati. Verificare che un iterable utilizzabile una sola volta rimanga disponibile per ogni chiamata e che i metadati vengano preservati tra i tentativi e i ricollegamenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In python/pyspark/sql/connect/client/reattach.py, SparkConnectClient
stores the gRPC metadata as-is:
self._metadata = metadata
If the caller passes a one-shot iterable (e.g. a generator or an
iterator) rather than a list/tuple, this metadata gets consumed the
first time it's iterated. Since the same self._metadata is reused
across multiple RPCs on the same client (ReattachExecute,
ReleaseExecute, and retries of ExecutePlan), any RPC after the first
would silently send empty metadata, which would drop auth-related
headers (e.g. bearer tokens) on those subsequent calls without any
visible error.
This doesn't currently cause a problem for callers that already pass
a list/tuple for metadata, since those remain safely re-iterable.
But it's a latent correctness/robustness issue: nothing enforces that
metadata is passed as a re-iterable type, and the failure mode
(silently missing headers) is easy to miss in testing.
Proposed fix: convert metadata to a list at assignment time
(self._metadata = list(metadata)), so it is guaranteed to be
re-iterable across all RPCs regardless of what type of iterable is
passed in.
This is not an authentication bypass in itself; no existing caller
is currently affected, but it removes a class of accidental-metadata-
loss bugs that could otherwise mask missing auth headers on retry/
reattach paths.
- Lingua principale
- Scala
- Stelle
- 44.3k
- Fork
- 29.5k
- Merge medio
- 8h 43m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/spark
-
[BUILD] Bump Ivy up to 2.6.0Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 2 giorni
-
[CORE] bug report: collision of resource profile idForse già presa @ybapat l’ha presa 90 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
apache/spark#57498 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[BUILD] Drop oro dependencyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/spark#57209 · 7 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Merge spark PR script hard blocks on JIRAForse già presa @holdenk l’ha presa 4 giorni fa. Aperta
apache/spark#59693 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
apache/spark#59659 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/spark
Issue simili
-
area:verification status:backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
KD5UJC-XYZ/scarab#459 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
scalacenter/scaladex#1834 ·
-
PlatformSpecific.hasGreenThreads incorrectly returns false for JDK updates and non-GA versionsForse già presa @hearnadam l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
zio/zio#11303 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
Disabled tools can still be called by the agentForse già presa @shaynhornik l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
apache/texera#9122 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno