Gabriel39 opened a new pull request, #71011: URL: https://github.com/apache/doris/pull/71011
### Background Iceberg PME reads use the SDK to decrypt metadata and prepare independent file keys, then send the keys over protected private RPC to the native Parquet reader. REST encrypted metadata and native HMS V3 execution are already available on master. The final admission check still rejects REST execution. ### What problem does this PR solve? Issue Number: close #71009 Related PR: #70343 (merged REST metadata prerequisite), #70697 (merged native read prerequisite and round-robin regression) PR Type: Feature Problem Summary: Enable explicitly configured REST V3 encrypted reads through the existing native execution path. Most changes extend real REST unit tests, shared physical fixtures and SQL regression coverage. Also give each round-robin scan an independent starting backend while preserving the statement's selected candidate membership, fixing the single-backend hotspot reported in #70697. Encrypted reads remain disabled by default; the scheduling fix also applies to plaintext external scans. ### Details - **Scope:** Standard-encrypted Iceberg V3 Parquet AES_GCM_V1 through HMS and REST, including independent data, position-delete and equality-delete keys and SDK-encrypted manifests/lists. V4 encryption, encrypted writes/maintenance, encrypted ORC/Puffin and JNI metadata-table execution remain outside this read capability. - **Design:** Remove the final HMS-only restriction after the existing common admission checks. Reuse the current descriptors, native readers and authenticated private transport. A separate REST encryption reader or wire contract would duplicate the same file scheme. Proposed in #71009, opened with this PR; prior community approval is not asserted. - **Usage:** Configure KMS, storage credentials and private mutual TLS following the [planned 5.0 user guide](https://github.com/apache/doris-website/pull/4721). Set `enable_encryption_read=true` in every FE's `plugins/connector/iceberg/iceberg.conf` and restart the FEs. Ordinary queries then work through the existing REST catalog; the integration fixture's encrypted V3 table returns `4` for: ```sql SELECT COUNT(*) FROM rest_encryption_native_cache_true.iceberg_encryption_metadata_db.encrypted_v3; ``` - **Default behavior:** The plugin setting remains `false`; it is deployment configuration rather than a catalog/session option. Enabling it requires verified native readers and private transport on the selected live backends. - **Compatibility:** Reuse existing metadata and RPC representations, with no SPI version or storage-format change. Encrypted execution requires matching capable packages; missing capability or transport proof is rejected. Plaintext table formats retain their existing readers. - **Security and privileges:** Existing catalog/KMS/storage authentication and table SELECT privileges apply. A SELECT-only REST reader and an ungranted namespace are tested separately. KMS failures propagate even after warm successful queries. - **Behavior change:** Round-robin external scans choose a per-scan starting cursor within the statement's selected candidate set. This restores spreading for queries with many one-split plaintext scans. Explicit load ordering continues to reset its cursor to the chosen first backend. ### Testing - Local Iceberg unit tests: 1,944 passed, 10 existing skips across 111 suites. The focused REST tests fail on the original HMS-only restriction and pass after the admission change. - Local scheduler, load-selection and backend-capability tests: 67 passed across four suites. Before the fix, the new deterministic 32-scan/eight-backend test sends every split to one backend; after the fix it preserves one membership selection and distributes the controlled offsets across all eight. - Local matching FE/BE with actual encrypted SDK/Spark fixtures and private mTLS: `test_iceberg_encryption_native_read_integration` and `test_iceberg_encryption_native_read_guards` passed both output generation and normal comparison. Coverage includes HMS/REST, all eight independent data/delete key modes, cache/batch/pruning/COUNT toggles, history, joins, SELECT-only privileges, encrypted-write/JNI refusal and warm KMS revocation/recovery. - Separate default-off deployment: encrypted HMS metadata, encrypted REST metadata, delete-reader and native-reader suites all passed. Every regression run reported zero skipped scripts. ### Notes for Reviewers The native-positive suite is opt-in and requires the documented deployment flag/private TLS setup. The default External pipeline continues to exercise default-off guards. Mock KMS denial is SDK-compatible fault injection; live-provider IAM and a cloud deployment are not claimed as locally accepted. ### Release note Allow opt-in native encrypted Iceberg V3 reads through REST catalogs, using the existing protected execution path. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes (https://github.com/apache/doris-website/pull/4721; planned support version 5.0) - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, tests, fixtures and this description. - Human review: not stated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
