Repository navigation
Hide queue engine secrets written with the legacy s3queue_ prefix - #123060
Algunenano merged 1 commit into
Conversation
`S3Queue` and `AzureQueue` accept every setting with the legacy `s3queue_` prefix: `ObjectStorageQueueSettings::loadFromQuery` renames the setting through `adjustSettingName`, which strips the prefix from any name, and `alter()` does the same. The masking of a `SETTINGS` clause looks the rule up by the name as written, and every rule is keyed on the canonical name, so a secret written as `s3queue_after_processing_move_secret_access_key`, `s3queue_after_processing_move_connection_string` or `s3queue_format_avro_schema_registry_url` matched no rule and was printed in cleartext by `SHOW CREATE TABLE`, `system.tables` and, through `hasSecretParts`, `system.query_log` and the server log. `renderSecretChangeValue` now drops the prefix once and gives the unprefixed name to both the query-level rules and the engine rules. No key of any masking map starts with `s3queue_`, and the four query-level settings that do (`s3queue_default_zookeeper_path`, `s3queue_migrate_old_metadata_to_buckets`, `s3queue_enable_logging_to_s3queue_log`, `s3queue_keeper_fault_injection_probability`) strip to names no map holds, so the only changes that render differently are the `s3queue_`-prefixed spellings of a masked name. Requested in ClickHouse#122997 (comment) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings), plus my own review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20260930-105700 |
|
Workflow [PR], commit [b2fdac5] Summary: ❌
AI ReviewSummaryThis PR fixes secret masking for queue-engine Final VerdictStatus: ✅ Approve LLVM Coverage ReportMeasured on commit b2fdac5.
Changed lines: Changed C/C++ lines covered: 8/8 (100.00%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 8 s compile time in total, 7 of them have a recent master baseline. |
CI finish ledger - b2fdac5Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
146 of 146 check runs completed (106 passed, 39 not selected, 1 red: the job above), Session id: cron:our-pr-ci-monitor:20260930-160147 |
dc5b030
Backport #123060 to 26.8: Hide queue engine secrets written with the legacy `s3queue_` prefix
Backport #123060 to 26.7: Hide queue engine secrets written with the legacy `s3queue_` prefix
Backport #123060 to 26.3: Hide queue engine secrets written with the legacy `s3queue_` prefix
… with the legacy `s3queue_` prefix
… with the legacy `s3queue_` prefix
… with the legacy `s3queue_` prefix
Backport #123060 to 26.9: Hide queue engine secrets written with the legacy `s3queue_` prefix
… with the legacy `s3queue_` prefix
Related: #122997
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed secret settings of
S3QueueandAzureQueuetables written with the legacys3queue_prefix, such ass3queue_after_processing_move_secret_access_key, being shown in cleartext inSHOW CREATE TABLE,system.tables,system.query_logand the server log. They are now hidden as they are without the prefix.Description
On 26.8.15.10-lts, this statement is accepted and
SHOW CREATE TABLE,system.tablesandsystem.query_logshow the secret in cleartext, while the same statement withafter_processing_move_secret_access_keyshows'[HIDDEN]':The queue engines accept every setting with the documented legacy
s3queue_prefix, but the masking of aSETTINGSclause looks the rule up by the name as written, and every rule is keyed on the canonical name.s3queue_after_processing_move_connection_string(also onAzureQueue) ands3queue_format_avro_schema_registry_urlleak the same way, and so doesALTER TABLE ... MODIFY SETTING s3queue_...insystem.query_log.renderSecretChangeValuenow drops the prefix before both lookups. No masking rule is keyed on ans3queue_name, and the query-levels3queue_*settings strip to names no rule holds, so only the prefixed spelling of a masked name renders differently.The new test fails on master with the three legacy values in cleartext and passes with the fix (50/50 randomized runs).
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123060]
Version info
26.10.1.1093-master(included in26.10and later)26.9.9.18,26.8.15.23,26.7.20.7,26.3.39.6