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

未关闭 适合新手
#7,558 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
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 小时
30 天内合并 PR
228

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/datafusion-comet 的其他 Issue

查看 apache/datafusion-comet 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。