Skip to content

Cherry pick #123188 to 26.9: add a setting to allow disabling interserver mode over tcp_with_proxy interface - #125322

Merged
robot-ch-test-poll2 merged 8 commits into
backport/26.9/123188from
cherrypick/26.9/123188
Oct 22, 2026
Merged

robot-ch-test-poll2 merged 8 commits into
backport/26.9/123188from
cherrypick/26.9/123188

Conversation

@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Original pull-request #123188

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

chhetripradeep and others added 7 commits October 1, 2026 14:51
…o-disable-interserver-mode-over-tcp-with-proxy

# Conflicts:
#	src/Core/ServerSettings.cpp
- Declare `ServerSetting::tcp_with_proxy_allow_interserver_mode` in `TCPHandler.cpp`.
- Add `/// NOLINT` to the `throw exception;` to satisfy `cert-err09-cpp`.
- Document the setting with `false` in `config.xml` and mirror it in `config.yaml.example`.
- Add an instance relying on the default value to check interserver mode
  stays allowed on `tcp_with_proxy_port`.
- Assert the `LoginFailure` row in `system.session_log` for the rejection.
…tcp_with_proxy_port`

The reject path logged the `LoginFailure` against `socket().peerAddress()`, so with
`auth_use_forwarded_address` enabled `system.session_log` recorded the proxy instead
of the real client. Use `getClientAddress` like the empty default user reject path does,
and check `client_address` in the integration test.

Related: #123188

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…LED`-only

With `auth_use_forwarded_address` enabled, `getClientAddress` throws `INCORRECT_DATA`
for a non-IP PROXY source address. That skipped the `LoginFailure` row and the silent
close for interserver peers in `runImpl`, sending a serialized error to an unauthenticated
peer. Resolve the forwarded address without throwing in this path, and add a test with a
malformed PROXY source address.

Related: #123188

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…isable-interserver-mode-over-tcp-with-proxy

add a setting to allow disabling interserver mode over tcp_with_proxy interface
@robot-ch-test-poll3 robot-ch-test-poll3 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 labels Oct 12, 2026
@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Dear @tiandiwonder, @chhetripradeep, this cherry-pick PR has not been updated for 3d0h5m22s. Please resolve the conflicts to backport #123188, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity.

Resolve the conflict in `src/Core/ServerSettings.cpp`: add `tcp_with_proxy_allow_interserver_mode` and keep the release branch's own description of `handshake_timeout_milliseconds`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@robot-clickhouse

Copy link
Copy Markdown
Member

Dear @tiandiwonder, @chhetripradeep, this cherry-pick PR has not been updated for 7d0h4m37s. Closing automatically. If you still want to backport #123188, please resolve the conflicts and reopen this PR.

@robot-ch-test-poll2

Copy link
Copy Markdown
Contributor

Dear @tiandiwonder, @chhetripradeep, this PR is opened while #123188 was marked as backported. The pr-backports-created is removed, so the original PR can be processed again.

If the cherry-pick is not needed anymore, then just close this PR.

@robot-ch-test-poll2
robot-ch-test-poll2 merged commit 2a82b00 into backport/26.9/123188 Oct 22, 2026
1 check passed
@robot-ch-test-poll2
robot-ch-test-poll2 deleted the cherrypick/26.9/123188 branch October 22, 2026 08:30
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-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.

6 participants