Repository navigation
More security validations for biglake catalog - #105117
Conversation
|
Workflow [PR], commit [61cbd2a] Summary: ❌
AI ReviewSummaryThis PR hardens BigLake auth flows by adding metadata-host allow-list checks and host filtering before outbound token requests. One security contract is still violated: configured ADC auth can still silently fall back to metadata-service auth on ADC exceptions. The PR also lacks focused regression coverage for the new allow-list behavior. Verdict: request changes. Findings❌ Blockers
Tests
Final Verdict
|
| const auto & context = getContext(); | ||
|
|
||
| const auto allowed_metadata_hosts = getAllowedBigLakeMetadataServiceHosts(context->getConfigRef()); | ||
| if (allowed_metadata_hosts.empty()) |
There was a problem hiding this comment.
retrieveGoogleCloudAccessToken still falls back to metadata-service auth on any retrieveGoogleCloudAccessTokenFromRefreshToken exception. That means explicitly configured ADC credentials can silently switch identity source (to instance metadata credentials) instead of failing closed.
Given this PR is hardening security boundaries, please avoid this implicit fallback when ADC settings are present: propagate the ADC exception (or gate fallback behind an explicit setting) so a bad/expired ADC config cannot transparently change the auth principal.
There was a problem hiding this comment.
Rechecked at current PR head: retrieveGoogleCloudAccessToken still catches any DB::Exception from retrieveGoogleCloudAccessTokenFromRefreshToken and then falls through to metadata-service auth.
That still violates fail-close behavior for explicitly configured ADC credentials: an ADC failure can silently switch the auth principal to metadata credentials. Please either propagate the ADC error when ADC settings are present, or guard this fallback behind an explicit setting disabled by default.
| "node1", | ||
| main_configs=["configs/merge_tree.xml"], | ||
| main_configs=["configs/merge_tree.xml", "configs/biglake_metadata_hosts.xml"], | ||
| user_configs=["configs/allow_experimental.xml"], |
There was a problem hiding this comment.
This change adds security-critical behavior (iceberg_biglake_metadata_service_hosts allow-list + host checks), but the test change only injects config into the cluster fixture. It does not validate the new contract.
Please add a focused regression test that proves at least:
- metadata requests are rejected when the allow-list is absent/empty;
google_metadata_servicevalues outside the allow-list are rejected;- an allowed host still works.
Without that, this hardening path can regress silently.
There was a problem hiding this comment.
Rechecked at current PR head: this test change still only injects config in the fixture and does not validate the new allow-list contract.
Please add focused integration coverage for the hardening behavior: metadata requests are rejected when iceberg_biglake_metadata_service_hosts is absent/empty, rejected for a disallowed google_metadata_service, and accepted for an allowed host.
|
This was fixed by #105146. Let's update the branch. |
grantholly-clickhouse
left a comment
There was a problem hiding this comment.
One small find by the bot, but otherwise LGTM
f8be8ec to
61cbd2a
Compare
LLVM Coverage Report
Changed lines: 2.70% (1/37) · Uncovered code |
4144204
Cherry pick #105117 to 26.3: More security validations for biglake catalog
Resolutions: - `src/Databases/DataLake/RestCatalog.cpp`: kept only the `Poco/Util/AbstractConfiguration.h` include the cherry-pick adds; `Common/FailPoint.h` is unrelated master drift and nothing in this file uses it on 26.3. - `tests/integration/test_e2e_catalogs/`: dropped the `test.py` edit and the new `configs/biglake_metadata_hosts.xml`. The whole test directory does not exist on 26.3, so there is nothing for the edit to apply to and the config would be unreferenced. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Backport #105117 to 26.3: More security validations for biglake catalog
Closes: https://github.com/ClickHouse/clickhouse-private/issues/52499
Closes: https://github.com/ClickHouse/clickhouse-private/issues/57919
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
More security validations for biglake catalog
Version info
26.5.1.828(included in26.5and later)26.3.33.100