Repository navigation
Add test that Remote/RemoteSecure storage engines respect remote_url_allow_hosts - #111140
PedroTadim merged 1 commit into
Conversation
…allow_hosts Follow-up to ClickHouse#106189. The Remote/RemoteSecure storage engines build a cluster on the fly from user-supplied addresses via the same parseRemoteFunctionArguments as the remote/remoteSecure table functions, which calls RemoteHostFilter::checkHostAndPort for every parsed host. For the engines this runs during CREATE, so a host outside <remote_url_allow_hosts> is rejected with UNACCEPTABLE_URL before the table is created. This adds a regression test that locks in that behavior for both Remote and RemoteSecure (disallowed bare host, glob expanding to a disallowed host, disallowed port; allowed host succeeds). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Validated locally: Session id: cron:clickhouse-author-slot-2:20260720-194300 |
Internal second-model review — adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 substantive finding;
Severity: ❌ blocker / Session id: cron:clickhouse-author-slot-2:20260720-194300 |
|
cc @alexey-milovidov — could you review? Follow-up to #106189 adding an integration test that the Remote/RemoteSecure engines reject a host outside |
|
Workflow [PR], commit [8c9dbc6] Summary: ✅ AI ReviewSummaryThis PR adds an integration regression test for the Final VerdictStatus: ✅ Approve |
…gine-allow-hosts-test Add test that Remote/RemoteSecure storage engines respect remote_url_allow_hosts
Related: #106189
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Follow-up to #106189 (Remote/RemoteSecure storage engines): add a regression test proving the engines honor
remote_url_allow_hosts, requested in that PR.The engines already enforce it:
registerStorageRemoteand theremote/remoteSecuretable functions shareparseRemoteFunctionArguments, whose ad-hoc-cluster branch callsgetRemoteHostFilter().checkHostAndPort(...)for every parsed host. For the engines this runs duringCREATE, so a disallowed host is rejected withUNACCEPTABLE_URLbefore the table is created. There was no test covering this, so this PR adds one.test_allowed_url_from_config/test.py::test_storage_engine_remotereuses the existingnode6(restrictiveremote_url_allow_hosts) and, for bothRemoteandRemoteSecure, asserts that a disallowed host, a glob expanding to a disallowed host, and a disallowed port are all rejected, while an allowed host creates the table. It is an integration test becauseremote_url_allow_hostsis a server-config setting and cannot be set per query.Version info
26.7.1.1268(included in26.7and later)