Skip to content

Cherry pick #129044 to 26.8: Fix identity of dynamic disks with server credential markers - #130453

Merged
robot-ch-test-poll2 merged 11 commits into
backport/26.8/129044from
cherrypick/26.8/129044
Nov 10, 2026
Merged

robot-ch-test-poll2 merged 11 commits into
backport/26.8/129044from
cherrypick/26.8/129044

Conversation

@robot-clickhouse

Copy link
Copy Markdown
Member

Original pull-request #129044

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

Algunenano and others added 10 commits November 3, 2026 17:25
A dynamic disk is named after a hash of its definition, which includes the
credential markers the server appends. The Azure marker is now added only when
the resolved disk uses the server's own Azure identity, and a definition that
matches no registered disk is also tried in the forms stored by older versions.
A short `ATTACH` keeps the stored markers. A session without
`s3_allow_server_credentials_in_user_queries` can no longer use a disk with
server credentials through a wrapper disk or a definition that resolves
differently since the disk was created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A session without `s3_allow_server_credentials_in_user_queries` could use a
disk with server credentials through its implicit `__<disk>` storage policy.
Refuse it on `CREATE`, user `ATTACH` and `ALTER ... MODIFY SETTING`.

A disk function now passes every registered disk it matches to the disk that
wraps it, so a wrapper declared by an older version is found even when the disk
of the newer form below it is registered too.

Move the paths of the `encrypted` disks in 05496 inside
`custom_local_disks_base_directory`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…LTER

`StorageFactory::Arguments::getDisk` and `getStoragePolicy` resolve a disk or a
storage policy named by a table definition and, unless the table is loaded from
existing metadata, refuse a custom disk with server credentials for a session
without `s3_allow_server_credentials_in_user_queries`. `Log`, `TinyLog`,
`StripeLog`, `Set`, `Join`, `Distributed` and the MergeTree `storage_policy`
setting use them. `ALTER ... MODIFY SETTING storage_policy` checks the policy
only when it changes.

In 05496, wrap local disks under `custom_local_disks_base_directory` and drop
every table right away, so that no table names a disk of another table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A forbidden `storage_policy` must be reported by the constraint check, not as an unknown policy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master now checks the effective storage policy before the per-setting loop, so the credentials check has to run there to be reported first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	src/Storages/MergeTree/MergeTreeSettings.cpp
Fix identity of dynamic disks with server credential markers
@robot-clickhouse robot-clickhouse added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Nov 10, 2026
The release has no Azure server credentials marker (#120343), so only the form without
`_server_credentials_allowed` is tried, and the Azure test is dropped. The `storage_policy`
check of `ALTER` runs in the per-setting loop of the release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@robot-ch-test-poll2
robot-ch-test-poll2 merged commit 568f6ae into backport/26.8/129044 Nov 10, 2026
2 checks passed
@robot-ch-test-poll2
robot-ch-test-poll2 deleted the cherrypick/26.8/129044 branch November 10, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants