Skip to content

Backport #133828 to 26.9: Mask the key of keyed SipHash functions in logged queries - #133883

Merged
clickhouse-gh[bot] merged 2 commits into
26.9from
backport/26.9/133828
Nov 24, 2026
Merged

clickhouse-gh[bot] merged 2 commits into
26.9from
backport/26.9/133828

Conversation

@robot-clickhouse

@robot-clickhouse robot-clickhouse commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Original pull-request #133828

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.9.39.7

@robot-clickhouse robot-clickhouse added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Nov 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [ed38937]

Summary: ✅

@rschu1ze

Copy link
Copy Markdown
Member

@groeneai Fix the merge conflict.

@groeneai

Copy link
Copy Markdown
Collaborator

I can't push to backport/26.9/133828 (my account has read-only access to this repository), so the fix is on my fork as one commit on top of this PR's head. Applying it is a fast-forward:

git fetch https://github.com/groeneai/ClickHouse groeneai/resolve-26.9-backport-133828
git push origin FETCH_HEAD:backport/26.9/133828

(head e93269360ca6e4a3672109abe00050335fe896b4)

There is no textual conflict. The build fails because SecretArgumentsSpec and the registerFunction overload that takes it come from #123364, which is not on 26.9 (a large refactor without a backport label). The commit keeps the 26.9 registrations in FunctionsHashingMisc.cpp and marks the first argument of sipHash64Keyed, sipHash128Keyed and sipHash128ReferenceKeyed as secret in FunctionSecretArgumentsFinder::findOrdinaryFunctionSecretArguments, next to HMAC, which is how 26.9 masks function arguments. The test is unchanged.

Validated on this tree with clang-22, debug build: 05871_keyed_siphash_key_masking passes 50 of 50 runs with randomized settings, and 11 existing secret-masking tests pass. The official 26.9.38.7 binary still prints the key in EXPLAIN SYNTAX.

The 26.3 and 26.8 backports (#133880, #133881) fail to build the same way; I can prepare the same change there if wanted.

@rschu1ze

Copy link
Copy Markdown
Member

The 26.3 and 26.8 backports (#133880, #133881) fail to build the same way; I can prepare the same change there if wanted.

Yes, do this.

@groeneai

Copy link
Copy Markdown
Collaborator

Done: the fast-forward commits are in #133881 (26.8, same change as here) and #133880 (26.3, where the test reference also had to follow 26.3's EXPLAIN SYNTAX output format).

@clickhouse-gh
clickhouse-gh Bot merged commit 5685c75 into 26.9 Nov 24, 2026
44 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.9/133828 branch November 24, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants