ParquetWriterExec's derived Debug prints object store options, which can hold secret keys

オープン 初心者向け
#7,558 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
security

調査の方向性

native/core/src/execution/operators/parquet_writer.rsから始め、ParquetWriterExecの派生Debug実装と、#7127で追加されたヘルパーを調べます。オペレーターがoutput_pathとobject_store_optionsをどのようにフォーマットするかを確認し、デバッグ出力でパスの認証情報が省かれ、オプションのキーが値なしで含まれることを検証します。issueにはテストファイルの指定がないため、秘密のオプションを持つオペレーターのフォーマットに関するテストカバレッジを探すか追加します。

索引モデルが issue の本文から書いたものです。

説明

requires-triage
Describe the bug

Found while working on #7128. ParquetWriterExec in native/core/src/execution/operators/parquet_writer.rs derives Debug, so {:?} of the operator prints output_path and object_store_options as they are. The options come from NativeConfig.extractObjectStoreOptions and can hold credentials such as fs.s3a.secret.key or an Azure SAS token, and the path can carry a password or a SAS query.

Comet does not format the plan with {:?} today, so nothing leaks yet. A debug log, a dbg!, a test assertion or a DataFusion error that formats the plan with Debug would print the secrets.

Steps to reproduce

Format a ParquetWriterExec built with fs.s3a.secret.key in its options with {:?}. The key's value appears in the output.

Expected behavior

Debug for ParquetWriterExec prints the path without credentials (the helpers #7127 adds) and only the keys of object_store_options, not their values.

Additional context

The plan display (DisplayAs) and the writer's messages are handled in the #7128 pull requests; this is the remaining way the operator can print its options.

主要言語
Scala
スター
1.3k
フォーク
414
平均マージ
3日 5時間
マージ済み PR(30日)
228

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/datafusion-comet のほかの issue

apache/datafusion-comet の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。