Skip to content

fix: redact Parquet key configuration Debug output - #26510

Open
autoCAT6 wants to merge 1 commit into
apache:mainfrom
autoCAT6:fix/parquet-key-config-debug
Open

autoCAT6 wants to merge 1 commit into
apache:mainfrom
autoCAT6:fix/parquet-key-config-debug

Conversation

@autoCAT6

Copy link
Copy Markdown

Which issue does this PR close?

Related to #25662; this addresses the typed Parquet configuration diagnostic boundary.

Rationale for this change

Formatting Parquet encryption or decryption configuration with Debug currently includes footer and column key material. Nested configuration and ParquetFormat diagnostics can expose the same keys.

What changes are included in this PR?

  • Redact key fields in ConfigFileEncryptionProperties, ConfigFileDecryptionProperties, ColumnEncryptionProperties, and ColumnDecryptionProperties.
  • Preserve diagnostic context such as metadata, AAD, column names and flags, and retain existing configuration access and conversion behavior.
  • Add public configuration regressions and a DataFrame encrypted-file roundtrip test.

What is the testing strategy for this PR?

The configuration tests cover compact and pretty formatting, direct and nested types, unchanged raw configuration values, ordinary column options, and feature-enabled conversion. The DataFrame test writes an encrypted file, verifies exact values and nulls with the correct keys, and rejects wrong-column-key and missing-key reads.

Validation against the updated main branch:

  • cargo fmt --all --check
  • cargo clippy --locked --profile ci --all-targets --all-features -- -D warnings
  • cargo test --locked --profile ci -p datafusion-common --test encryption_config_debug (7 passed), and with --features parquet_encryption (8 passed).
  • cargo test --locked --profile ci -p datafusion-common --features parquet_encryption (664 unit tests, 8 regression tests and 81 doctests passed; 5 doctests ignored).
  • The targeted parquet_integration encrypted-file roundtrip test passed.
  • The required workspace extended suite passed: RUST_BACKTRACE=1 cargo test --locked --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption.

As a regression check, running the new default-feature tests with the original config.rs produces five assertion failures; restoring the fix makes all seven pass.

Are there any user-facing changes?

Debug output replaces footer and column key contents with <REDACTED>. Public configuration fields, explicit configuration enumeration and encryption/decryption behavior are unchanged.

@github-actions github-actions Bot added core Core DataFusion crate common Related to common crate labels Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant