iSparshP opened a new pull request, #7777:
URL: https://github.com/apache/datafusion-comet/pull/7777

   ## Which issue does this PR close?
   
   Closes #7558.
   
   ## Rationale for this change
   
   ParquetWriterExec derived Debug, so formatting it with {:?} printed 
output_path and object_store_options as is. the path can carry a password, an 
access key id or a sas query, and the options can hold things like 
fs.s3a.secret.key, so any debug log, dbg! or error that formats the plan with 
Debug would leak them.
   
   ## What changes are included in this PR?
   
   - swapped the derived Debug on ParquetWriterExec for a manual one that 
prints the same fields
   - output_path goes through the existing url_redaction::without_credentials 
helper, so the userinfo and query are dropped. a path that does not parse 
prints as `<unparseable>` since nothing can be stripped from it
   - object_store_options now shows its keys (sorted) with every value replaced 
by `<redacted>`, same placeholder IcebergScanExec already uses for its catalog 
properties
   
   the small RedactedOptions wrapper mirrors the private one in iceberg_scan.rs 
rather than sharing it, to keep this to one file. happy to pull both into a 
shared helper if preferred. the DisplayAs path is left alone since #7128 covers 
it.
   
   ## How are these changes tested?
   
   added `test_parquet_writer_debug_redacts_credentials`, which builds the exec 
with `s3a://AKIDEXAMPLE:s3cretpw@bucket/part-00000.parquet?sig=sastoken` and 
`fs.s3a.secret.key = supersecret`, and checks the debug string has the stripped 
path and the option key but none of the secrets. i checked it fails without the 
fix. the rest of the parquet_writer tests, cargo fmt and clippy (-D warnings) 
pass locally.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to