Repository navigation
Hide legacy storage_* credential settings of DataLakeCatalog - #108470
alexey-milovidov merged 3 commits into
Conversation
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-1:20260625-120100 |
|
cc @kssenii @alesapin - could you review? Adds the four legacy |
|
Workflow [PR], commit [61a84bd] Summary: ✅
AI ReviewSummaryThis PR broadens DataLake secret redaction in Final VerdictStatus: ✅ Approve |
CI finish ledger — 4ca07baEvery failure below has an owner: a fixing PR (ours or external). Only
Session id: cron:our-pr-ci-monitor:20260625-180000 |
4ca07ba to
63d7f57
Compare
The DataLake credential-bearing settings (catalog_credential, auth_header, aws_access_key_id, aws_secret_access_key and their legacy storage_* aliases) are declared in DataLakeStorageSettings.h, which is shared by the DataLakeCatalog database engine AND the Iceberg*/Paimon*/DeltaLake* table engines via registerStorageObjectStorage. ASTSetQuery::formatImpl only redacted them when create_engine_name equalled 'DataLakeCatalog', so SHOW CREATE TABLE, system.tables.engine_full and the formatForLogging path printed the secret values verbatim for the table engines. Any user with the relevant SELECT/SHOW grant could read them. hasSecretParts() already treats these settings as secret without an engine gate, so the format path was inconsistent with it. Redact DataLake::SETTINGS_TO_HIDE settings regardless of engine name, matching hasSecretParts(). Extend the regression test to cover the IcebergLocal table engine in addition to the DataLakeCatalog database engine. Also adds storage_catalog_credential and storage_auth_header to the redaction map (storage_aws_* were already added on master by ClickHouse#96910). Co-Authored-By: Claude Opus 4.8 <[email protected]>
63d7f57 to
8968d7d
Compare
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-1:20260706-152500 |
|
Updating the branch to fix the |
CI finish ledger — 63c8c41Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
No PR-caused failure: this PR only adds DataLake Session id: cron:our-pr-ci-monitor:20260706-233000 |
|
@groeneai : unrelated fails in fasttest, could you please merge master again to rerun all tests |
…g-storage-credential-leak
|
@SmitaRKulkarni merged current master (into 61a84bd), pushed. CI re-running. |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 5/5 (100.00%) · Uncovered code |
|
@groeneai please merge master again to rerun ci |
Cherry pick #108470 to 25.8: Hide legacy storage_* credential settings of DataLakeCatalog
Cherry pick #108470 to 26.3: Hide legacy storage_* credential settings of DataLakeCatalog
Cherry pick #108470 to 26.5: Hide legacy storage_* credential settings of DataLakeCatalog
Cherry pick #108470 to 26.6: Hide legacy storage_* credential settings of DataLakeCatalog
Backport #108470 to 26.5: Hide legacy storage_* credential settings of DataLakeCatalog
Backport #108470 to 25.8: Hide legacy storage_* credential settings of DataLakeCatalog
Backport #108470 to 26.6: Hide legacy storage_* credential settings of DataLakeCatalog
Backport #108470 to 26.3: Hide legacy storage_* credential settings of DataLakeCatalog
…og-storage-credential-leak Hide legacy storage_* credential settings of DataLakeCatalog
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed a credential leak where the legacy
storage_aws_access_key_id,storage_aws_secret_access_key,storage_catalog_credential, andstorage_auth_headersettings of theDataLakeCatalogdatabase engine were shown in plaintext insystem.databases.engine_fullandSHOW CREATE DATABASE. They are now redacted as[HIDDEN].Closes: #104951
Description
DataLakeCatalogaccepts the legacystorage_*family of settings atCREATE DATABASE(originally added for the Glue catalog), but four credential-bearing ones were missing fromDataLake::SETTINGS_TO_HIDE. Their secret values leaked verbatim intosystem.databases.engine_fullandSHOW CREATE DATABASE, readable by any user withSELECTonsystem.databases. The canonicalaws_*/catalog_credential/auth_headernames were already redacted; only thestorage_*aliases leaked.engine_fullis built at format time via theSETTINGS_TO_HIDEmap insrc/Parsers/ASTSetQuery.cpp, which bypasses the runtimeSensitiveDataMasker(that masker only coverssystem.query_log). Adding the fourstorage_*aliases to the map fixes the leak forengine_full,SHOW CREATE DATABASE, and the formatted query in the server log.These four are the complete set of credential-bearing
storage_*settings declared insrc/Storages/ObjectStorage/DataLakes/DataLakeStorageSettings.h. The remainingstorage_*settings are non-secret (storage_auth_scope,storage_oauth_*,storage_warehouse,storage_region,storage_aws_role_arn,storage_aws_role_session_name,object_storage_endpoint,storage_catalog_url,disk).Regression test
04401_datalake_catalog_hide_storage_credentialsformats aCREATE DATABASE ... ENGINE = DataLakeCatalogquery carrying all fourstorage_*aliases and the four canonical names, and asserts each prints[HIDDEN]. It fails on master (thestorage_*values print verbatim) and passes with this fix.Version info
26.7.1.806(included in26.7and later)26.6.4.64,26.3.29.5,25.8.34.4