Repository navigation
[fix](catalog) Mask connector catalog secrets and the ALTER CATALOG audit text - #70338
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
|
Codex automated review failed and did not complete. Error: Review recovery stopped: shared time budget or helper timeout exhausted Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
TPC-H: Total hot run time: 28644 ms |
TPC-DS: Total hot run time: 154111 ms |
ClickBench: Total hot run time: 24.13 s |
FE UT Coverage ReportIncrement line coverage |
|
run buildall |
|
/review |
There was a problem hiding this comment.
Reviewed all 42 changed paths at b0bfd3c. One new P2 finding: eager security-surface discovery does not isolate nested metastore ServiceLoader failures, so one broken connector can prevent FE startup. No P0/P1 findings or existing blocking comments were confirmed.
Critical checkpoint conclusions:
| Checkpoint | Conclusion |
|---|---|
| Goal and proof | Connector declarations reach SHOW CREATE CATALOG, SHOW CATALOG, catalogs(), and CREATE/ALTER audit/log masking. Unit and audit regression coverage was inspected; execution was outside this static review. |
| Scope and reuse | Focused rendering change using existing annotations, the security surface, and NeedAuditEncryption; no connector property parsing added to generic engine paths. |
| Concurrency and locks | Normal registration runs before catalog replay/request access. New prefix reads use copy-on-write snapshots and immutable rules; no new threads, blocking IO under metadata locks, or lock-order changes. |
| Lifecycle and static initialization | Provider-owned loaders and normal package dependencies are consistent. The inline P2 covers uncaught ServiceConfigurationError during newly eager metastore initialization. |
| Configuration | No new configuration or dynamic-update requirement. |
| Compatibility | Connector API major 31.0 matches the resource, manifests and test; plugin surface baseline includes additions. Storage and FE/BE protocols are unchanged. |
| Thrift and protobuf | No changes. |
| Parallel paths | Reviewed exact aliases, metastore flavors, pass-through prefixes, all three catalog renderings, CREATE/ALTER audit, statement logging, forwarding and multi-statement dispatch. Legacy masking floor is preserved. |
| Conditional logic | Required ALTER property spans follow from grammar. Case-insensitive prefix/suffix rules match the declared behavior; keytab properties contain paths. |
| Test coverage | Positive/negative aliases, namespace matching, immutability, registration/isolation and persisted audit checks are present. The new exception fixture misses ServiceConfigurationError, as noted inline. |
| Changed expected results | No result files changed; added audit assertions use known placeholders and check masking plus retained nonsecret values. No generated test result is claimed. |
| Observability | Skip logs identify providers/plugins; the reported exception currently bypasses them. No additional metrics are needed for this startup/rendering change. |
| Transactions and persistence | Catalog journaling, replay, failover and persisted credential values are unchanged; startup registration also applies masking to historical catalogs. |
| Data writes and atomicity | Table writes, committed-data visibility, delete bitmaps and crash recovery are unaffected. |
| FE/BE variables | None added. |
| Performance | Exact-key lookup and a small startup-defined prefix scan remain outside row-processing hot paths; no material regression established. |
| Other concerns | No further substantiated issue after the final recheck. |
No additional user focus was supplied. Existing inline threads were empty and the finding was deduplicated across reviewers. The PR's disclosed limits for arbitrary SDK/re-keyed/fs.* options and secrets embedded in URLs remain outside its declared masking coverage. Review coverage is complete with no unresolved candidates. Review converged after two rounds.
Validation was static source, test, dependency and control-flow inspection only. No builds, tests, benchmarks, runtime plugin loading or source edits were performed.
Review converged after 2 round(s).
| ConnectorSecuritySurface securitySurface; | ||
| try { | ||
| securitySurface = provider.securitySurface(); | ||
| } catch (RuntimeException | LinkageError e) { |
There was a problem hiding this comment.
[P2] Catch ServiceConfigurationError during eager surface discovery
An otherwise valid connector directory with a stale metastore service descriptor, or a backend whose constructor fails, now prevents FE startup. Iceberg/Paimon/Hive securitySurface() calls MetaStoreProviders.sensitivePropertyKeys(), whose static initializer runs ServiceLoader; those lookup/instantiation failures throw ServiceConfigurationError, an Error outside both RuntimeException and LinkageError. It escapes this catch through Env.initConnectorPluginManager() before image loading, defeating the documented per-plugin skip behavior. Previously these nested backends were discovered during catalog validation/access rather than directory registration. Catch ServiceConfigurationError here and at the new builtin surface boundary, and cover a failing nested loader; the added IllegalStateException fixture does not exercise this case.
There was a problem hiding this comment.
Fixed in ae2cebe. Confirmed against the code: the Hive, Iceberg and Paimon surfaces call MetaStoreProviders.sensitivePropertyKeys(), whose static initializer iterates a ServiceLoader over the plugin's jars. A descriptor naming a backend that cannot be loaded throws ServiceConfigurationError, an Error a static initializer rethrows unwrapped, so it escaped this RuntimeException | LinkageError catch and the builtin path's RuntimeException catch, and Env.initConnectorPluginManager() catches nothing: a stale jar in a connector's lib/ stopped FE at startup, where before this PR only that connector's catalogs failed. Both catches now include ServiceConfigurationError (the builtin one matches the construction catch above it), so the provider is skipped and logged like any other surface failure.
ConnectorPluginManagerTest#pluginWhoseSecuritySurfaceFailsInItsOwnServiceLoaderIsSkippedNotFatal (a plugin directory whose lib/ jar names a missing backend; the plugin next to it still loads) and #classpathProviderWhoseSecuritySurfaceFailsInItsOwnServiceLoaderIsSkippedNotFatal fail on b0bfd3c with that error and pass now; dropping it from either catch fails only that path's case.
There was a problem hiding this comment.
Thanks. The mechanism is right, but it exists only on a broken test classpath, so I'm keeping the builtin catch as it is.
In production Hive, Iceberg and Paimon are never builtins: fe-core depends on them in test scope only, and FE loads them from plugins/connector/, one loader per plugin. MetaStoreProviders is not on FE's classpath (fe-core does not depend on fe-connector-metastore-spi), so each plugin defines its own copy, a failed static initializer cannot reach another provider, and the directory path's catch already includes LinkageError.
The two catches follow FileSystemPluginManager: its loadBuiltins catches RuntimeException around a provider's sensitivePropertyKeys(), and its directory path adds LinkageError. On the classpath, a descriptor naming a missing backend is a build defect, and a LinkageError there already stops startup elsewhere, for example from ServiceLoader's hasNext() when a provider class does not link. Here the first provider is skipped and logged, and the second stops startup with a NoClassDefFoundError naming the class whose initializer failed, which points at the defect.
TPC-H: Total hot run time: 28677 ms |
TPC-DS: Total hot run time: 153854 ms |
ClickBench: Total hot run time: 23.8 s |
|
run buildall |
|
/review |
There was a problem hiding this comment.
Reviewed all 43 changed paths at ae2cebe. One new P1 finding: the newly enabled ALTER CATALOG masking uses code-point token positions as UTF-16 substring offsets and leaves plaintext credential suffixes in audit and FE statement logs. This prevents the intended complete masking fix for accepted supplementary-Unicode SQL.
The inspected flow is:
provider -> securitySurface -> startup masking union -> SHOW CREATE / SHOW CATALOG / catalogs()
ALTER CATALOG -> NeedAuditEncryption -> property spans -> rewriteSql -> audit / FE logs
Critical checkpoint conclusions:
| Checkpoint | Conclusion |
|---|---|
| Goal and proof | Connector-declared secrets reach the three catalog renderings and CREATE/ALTER logging. The inline P1 identifies the Unicode gap in the new ALTER path. Added unit and audit regression cases cover ASCII behavior; no execution is claimed. |
| Scope, clarity and reuse | Focused masking change reusing property annotations, the existing security surface and NeedAuditEncryption. Generic engine paths gain no connector-specific property parsing. |
| Concurrency and locks | Production registration occurs before image/replay/catalog access. Prefix rules use copy-on-write snapshots and immutable descriptors. No new thread, metadata-lock IO, nested lock order or supported production read/write race was identified. |
| Lifecycle and static initialization | Metastore discovery explicitly uses the defining plugin loader. Directory failures discard/close handles before routing publication; providers and masking descriptors otherwise live for FE lifetime. Both startup ServiceConfigurationError boundaries now catch the failure reported in the existing thread. |
| Configuration and dynamic updates | No new configuration or dynamic-update requirement. |
| Compatibility and rolling upgrades | SPI major and test pin both move from 30.0 to 31.0; the plugin API baseline records the additions. Legacy masking floor is retained. No durable format or FE/BE protocol changes. |
| Thrift and protobuf | No changes. |
| Parallel paths | Checked aliases, metastore flavors, pass-through prefixes, all three catalog renderings, CREATE/ALTER audit, FE statement logging, forwarding and multi-statement dispatch. Shared rewrite index units cause the inline finding. |
| Conditional logic | ALTER property lists are mandatory in the grammar. Namespace matching is case-insensitive and checks only the suffix after the declared prefix. Keytab annotations removed here name paths; keytab-content masking remains. |
| Test coverage | Inspected positive/negative aliases, prefix boundaries, immutability, admitted/refused providers, ADBC discovery isolation, actual nested ServiceLoader failure fixtures and persisted audit assertions. Supplementary Unicode values/comments are missing. |
| Changed expected results | No golden result files changed. Added assertions match ASCII masking and retained nonsecret values; they do not establish Unicode correctness. Result generation and author-reported test runs were not verified by execution. |
| Observability | Skip logs identify provider/plugin failures. The Unicode leak is a successful string rewrite, so existing exception fallback cannot detect it. No additional metric is needed for this startup/rendering change. |
| Transactions and persistence | Catalog journaling/replay/failover and stored credentials are unchanged. Startup registration applies masks to historical catalogs. |
| Data writes and atomicity | Table writes, committed-data visibility, version consistency, delete bitmaps and crash recovery are unaffected. No BE allocation/ownership change. |
| FE/BE variables | None added. |
| Performance | Small startup-defined prefix scans and exact-key lookups run in rendering paths; no new IO or row-processing hot-path work. No material performance defect substantiated. |
| Other concerns | No further substantiated issue after full-scope and missed-case rechecks. |
Existing thread 4492689479 is independently confirmed addressed at this head: both relevant catches include ServiceConfigurationError, and the new classpath/directory fixtures exercise a missing nested backend. It is not duplicated. No existing P0/P1 comments remain to carry forward. No additional user review focus was supplied.
The PR's disclosed limits for arbitrary raw/re-keyed SDK options, fs.* options and secrets embedded in URLs remain outside its declared masking coverage. Static review coverage is complete with no unresolved candidates or risk questions. Review converged after two rounds.
Validation was static source, test, dependency and control-flow inspection, with a standalone character-index calculation for the inline example. No Doris builds/tests, benchmarks, runtime plugin loading, submodule initialization or source edits were performed.
Review converged after 2 round(s).
| public LogicalPlan visitAlterCatalogProperties(DorisParser.AlterCatalogPropertiesContext ctx) { | ||
| DorisParser.PropertyItemListContext properties = ctx.propertyItemList(); | ||
| encryptProperty(visitPropertyItemList(properties), properties.start.getStartIndex(), | ||
| properties.stop.getStopIndex()); |
There was a problem hiding this comment.
[P1] Convert code-point spans before slicing the original SQL
The new ALTER masking path passes ANTLR offsets directly to BaseViewInfo.rewriteSql, which slices a Java String using UTF-16 offsets. CaseInsensitiveStream.fromString uses a code-point stream whenever the SQL contains a supplementary character, so the replacement ends early and copies part of the original credential back into the result. For example, ALTER CATALOG ctl SET PROPERTIES("password"="😀😀😀😀😀😀😀secret") produces ALTER CATALOG ctl SET PROPERTIES("password" = "*XXX"secret"): the entire ASCII suffix remains in the audit and FE statement logs, without an exception to trigger their fallback. Supplementary characters in an earlier SQL comment can expose an otherwise ASCII password too. Convert both token boundaries to UTF-16 positions (including the exclusive end) before rewriting, and cover Unicode values/comments in the masking tests.
There was a problem hiding this comment.
Thanks, confirmed. This is a defect the engine already had, not one this PR introduces: when a statement contains a supplementary character, the parser's token positions count code points, while BaseViewInfo.rewriteSql cuts the Java string by UTF-16 offsets. Every masking visitor in LogicalPlanBuilderForEncryption shares it (CREATE CATALOG, repositories, SET PASSWORD and the rest), and so does the rewriting of view and MTMV definitions; the ALTER CATALOG masking added here goes through the same rewriteSql.
It is fixed separately in #70366, which converts the positions at all five places that cut the original SQL and adds cases with emoji in values, in comments before the masked span, and across several replacements in one statement. Once that is merged, the ALTER CATALOG path in this PR gets the fix without a change here.
TPC-H: Total hot run time: 28298 ms |
TPC-DS: Total hot run time: 153663 ms |
ClickBench: Total hot run time: 24.08 s |
FE UT Coverage ReportIncrement line coverage |
…n its own ServiceLoader ### Background FE reads every connector provider's security surface at startup, before it publishes the provider, and skips a provider whose surface throws, so that one broken plugin directory does not stop FE. The Hive, Iceberg and Paimon providers build theirs from their metastore backends' secret keys, which `MetaStoreProviders` collects in a static initializer that runs a `ServiceLoader` over the backends the plugin's jars register. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Bugfix Problem Summary: A `ServiceLoader` that cannot load a backend its descriptors name throws `ServiceConfigurationError`, an `Error` that is neither a `RuntimeException` nor a `LinkageError`, and a static initializer rethrows an `Error` as it is. The plugin directory path caught only those two and the classpath path only `RuntimeException`, so a descriptor naming a backend that is not there, such as one in a jar an earlier release left in a connector's `lib/`, stopped FE at startup; before the previous commit, which reads the surfaces at startup, it failed only that connector's catalogs. Both paths now skip the provider on a `ServiceConfigurationError` as well, and the plugins next to it still load. ### Release note None Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b1fcc69 to
9abe6cc
Compare
|
run buildall |
|
/review |
|
Codex automated review failed and did not complete. Error: Review setup stopped before context preparation ran; inspect the first failed or cancelled setup step. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
…udit text ### Background SHOW CREATE CATALOG, SHOW CATALOG, the `catalogs()` table function and the audit text of CREATE CATALOG replace a property value with `*XXX` when `DatasourcePrintableMap.isSensitiveKey` matches its key. Until now the keys came from a list in fe-core and from the keys filesystem plugins report at startup. A connector plugin marks its secret properties `sensitive = true`, but that mark only masks the connector's own log lines. A connector tells the engine about its security-relevant properties through `ConnectorProvider#securitySurface()`. ### What problem does this PR solve? Issue Number: None Related PR: apache#69588 (added the connector security surface this extends), apache#45164 (introduced the unmasked ALTER CATALOG audit text), apache#27115 (masked it for the statement apache#45164 replaced), apache#59502 (added `iceberg.jdbc.password`), apache#54523 (added the Paimon REST DLF keys), apache#65730 (branch-4.1's Lance catalog, whose REST secrets the Lance port will declare on this surface), apache#70366 (fixed the shared Unicode SQL rewrite used by this PR's ALTER masking), apache#70327 (added MongoDB credentials to the engine masking floor) PR Type: Bugfix Problem Summary: Catalog secrets that only a connector knows are on no masking list, so SHOW CREATE CATALOG and the other renderings print them in clear: `iceberg.jdbc.password`, `paimon.jdbc.password`, the Paimon REST DLF key pair, `mc.access_key`, and credentials passed through under `trino.` or `adbc.`. Separately, `ALTER CATALOG ... SET PROPERTIES` is written to the audit log unmasked, whatever the key. Each connector now declares its secrets on its security surface, taken from its `sensitive` marks, and the surface can also declare a namespace of secret keys for options passed through unread; Fluss's lake options were hard-coded in fe-core for that reason. The engine masks the union, with fe-core's own list kept as the floor. ALTER CATALOG is masked like CREATE CATALOG. ### Details - **Change map:** 45 files, +1205 −81 over four commits: production code +384 −51, tests +807 −26, the connector README +13 −3, the plugin API version in `fe/fe-connector/pom.xml` (31.0 to 32.0). The first commit adds secret keys to the surface (reviewed alone before). The second does the rest, the third keeps a surface that fails in the connector's own `ServiceLoader` from stopping FE, and the fourth aligns the newly added MongoDB provider and tests ALTER masking with supplementary characters: 1. Key namespaces on the SPI: `withSensitiveKeyPrefix` and `SensitiveKeyPrefix.covers`, which holds the matching rule; a collection form of `withSensitiveKeys` (`ConnectorSecuritySurface`). 2. Engine: `isSensitiveKey` matches registered namespaces, the Fluss rule becomes one of them; `ConnectorPluginManager` registers them and reads every surface before it publishes a provider, skipping a provider whose surface throws. 3. Connectors: every provider declares its secrets; `MetaStoreProviders.sensitivePropertyKeys()` gives the union of a plugin's metastore backends; `IcebergJdbcMetaStoreProvider` reports its keys like its siblings; the keytab paths lose their `sensitive` mark. MongoDB also declares its two annotated secrets, preserving its SSRF endpoint and the engine fallback. 4. ALTER CATALOG audit masking (+16). - **Frequency:** Always. Create or alter a catalog that sets one of the keys above, then run SHOW CREATE CATALOG, SHOW CATALOG `<name>` or `select * from catalogs()`, or read the audit log after an ALTER CATALOG ... SET PROPERTIES. - **Root cause:** `isSensitiveKey` consulted only fe-core's list and the filesystem providers' keys. A connector's `sensitive` marks fed only `toMaskedString`; `MetaStoreProvider.sensitivePropertyKeys()` existed for this, but nothing called it, and the Iceberg JDBC backend did not implement it. For ALTER CATALOG, `AlterCatalogPropertiesCommand` does not implement `NeedAuditEncryption` and `LogicalPlanBuilderForEncryption` has no `visitAlterCatalogProperties`, so `AuditLogHelper` records the original text; the statement it replaced in apache#45164 was masked by apache#27115. - **Why existing tests missed it:** Unit tests: `DatasourcePrintableMapTest` checks fe-core's own keys, the provider surface tests checked only the SSRF and driver_url keys, and `EncryptSQLTest` and `RepositoryAuditEncryptionTest` cover CREATE CATALOG, repositories and resources but not ALTER CATALOG. Regression: `audit/test_external_catalog_credential_masking` creates only Iceberg REST catalogs, whose keys are on fe-core's list, and never alters one. - **Fix:** The engine must not name a connector's properties, so the connectors declare their secrets, from the same `sensitive` marks that mask their logs; jdbc and es declare both spellings their legacy prefix allows, and trino and adbc declare the namespace they pass through, a key there being a secret when its rest names `key`, `secret`, `password`, `token` or `credential` (also `authorization` for ADBC). fe-core keeps the connector keys it lists, so a catalog whose plugin is not loaded masks what it masked before. A provider whose `securitySurface()` throws at startup is skipped, as a filesystem provider is, instead of stopping FE; that includes the `ServiceConfigurationError` a `ServiceLoader` throws when a descriptor names a backend it cannot load, which is how the Hive, Iceberg and Paimon surfaces fail, since they read their metastore backends' keys through one. - **Other paths and branches:** Fixed here: every rendering above and FE's statement logging, which share `isSensitiveKey` and `NeedAuditEncryption`. Not covered, since a key name cannot express them safely: raw Iceberg SDK keys copied through (`token`, `credential`), Paimon options re-keyed from `paimon.*`, Hadoop `fs.*` keys, and secrets inside otherwise unmarked URLs. The ALTER CATALOG gap is on branch-4.0, 4.1 and 4.2 (from apache#45164); branch-3.1 still uses the masked statement. branch-4.1 and 4.2 also print the connector keys above in clear; without the connector SPI their fix differs and is tracked separately. - **Behavior change:** The namespaces also mask non-secrets whose names carry those words, such as `trino.hive.s3.aws-access-key` or a keystore path. Keytab paths, which no release masks, are no longer masked in connector log lines: marked `sensitive`, `hadoop.kerberos.keytab` would be masked in every storage vault and resource. ### Testing The original local runs (macOS) used master `f5c993f2c94` plus this change: - Regression `audit/test_external_catalog_credential_masking`, extended with an Iceberg JDBC catalog: SHOW CREATE CATALOG masks `iceberg.jdbc.password`, and the audit texts of its CREATE CATALOG and of an ALTER CATALOG that sets the password and `s3.secret_key` hold only `*XXX`. Against the local cluster's FE without this change it fails at the first new check, SHOW CREATE CATALOG printing the password; with a FE built from this change it passes. - fe-connector-spi: all 160 tests, with the refreshed surface baseline (+4 lines); the metastore modules: all tests; ten connector modules: 29 classes, 511 tests, including each connector's surface test, which checks real key names. - fe-core: 26 classes, 341 tests, including `ConnectorPluginManagerTest`, `DatasourcePrintableMapTest`, `EncryptSQLTest` and the audit and plugin gate tests; 14 of them again after the last change to registration, and 7 classes, 76 tests, after the third commit. Its two new `ConnectorPluginManagerTest` cases, a plugin directory whose `lib/` holds a jar with a service descriptor naming a missing metastore-style backend (the plugin next to it must still load) and the same descriptor on the classpath, fail without the third commit with that `ServiceConfigurationError` escaping `loadPlugins` and `loadBuiltins`, and pass with it. - Twenty-two mutations, each caught by its test: for example, reverting either half of the ALTER CATALOG fix (`EncryptSQLTest` sees the statement in clear), matching a marker anywhere in the key, an empty metastore union, re-marking a keytab, or dropping `ServiceConfigurationError` from either startup catch (each fails only its own new case). Rebased onto master `93c16ee2ca1` on 2026-11-16. Post-rebase local verification: - `bash run-fe-ut.sh --run 'org.apache.doris.connector.spi.*Test,ConnectorPluginManagerTest,DatasourcePrintableMapTest,EncryptSQLTest'`, with `CUSTOM_MVN` appending `-Dcheckstyle.skip=false`: BUILD SUCCESS across all 90 reactor modules; all 141 selected tests passed across 22 classes, including the inherited supplementary-character audit cases. Checkstyle reported no violations. - `git diff --check upstream-apache/master...HEAD`: passed. `git range-diff` confirms the replayed patches are unchanged apart from adapting the connector API version and its test to 32.0. - Regression tests and a complete BE/FE build were not rerun locally after this rebase; `run buildall` is requested in CI. Follow-up local verification on the rebased branch plus the MongoDB declaration and audit tests (2026-11-16): - `run-fe-ut.sh --run 'org.apache.doris.connector.spi.*Test,org.apache.doris.connector.mongodb.*Test,ConnectorPluginManagerTest,DatasourcePrintableMapTest,EncryptSQLTest'`, with Checkstyle enabled: all 176 selected tests in 28 classes passed (SPI 93, MongoDB 35, fe-core 48), with no skipped tests; the 90-module reactor completed successfully. - The strengthened `MongoProviderTest` fails without the provider declaration (expected the two MongoDB secret keys, received an empty set), and passes with it. A separate targeted revert confirms the assertion catches the missing declaration. - The new ALTER CATALOG assertions cover supplementary characters within a secret, in a preceding SQL comment, and in a retained non-secret value, with two masked properties. `EncryptSQLTest#testEncryption` passes on the candidate and fails at the new ALTER assertion when only `BaseViewInfo.rewriteSql` is restored to its pre-apache#70366 implementation: the audit text has an extra trailing fragment. - Full cluster regression and a standalone FE/BE build were not rerun for this follow-up. ### Notes for Reviewers - `SensitiveKeyPrefix.covers` lives on the SPI so that a connector's test can check its declaration against real key names and the engine applies the same rule; the Fluss floor in fe-core uses it too. - The entries both fe-core and a connector declare are deliberate: the floor is frozen, as the comment in `DatasourcePrintableMap` says. MongoDB was already masked by apache#70327; its added declaration makes the provider follow the same contract as the other connectors. - The connector plugin API advances from 31.0 to 32.0 for the added security-surface methods. Third-party connector plugins built against 31.x must be rebuilt; the in-tree plugins are built with FE. Hudi declares nothing: it owns no catalog properties. - The base includes apache#70366, so ALTER CATALOG masking uses the shared rewrite that converts parser code-point spans to Java string offsets, including supplementary characters. ### Release note SHOW CREATE CATALOG, SHOW CATALOG, the `catalogs()` table function and the audit log now mask `iceberg.jdbc.password`, `paimon.jdbc.password`, `paimon.rest.dlf.access-key-id`, `paimon.rest.dlf.access-key-secret`, `mc.access_key`, and the `trino.*` and `adbc.*` properties whose names carry `key`, `secret`, `password`, `token` or `credential` (`authorization` too for `adbc.*`). ALTER CATALOG ... SET PROPERTIES statements are masked in the audit log like CREATE CATALOG. Third-party connector plugins built against API 31.x must be rebuilt for 32.0. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Claude Code (Claude Opus 5.5); OpenAI Codex - Generated: Claude Code wrote the original code, tests, and description. Codex rebased the commits, adapted the connector API version and its test, added the MongoDB declaration and ALTER CATALOG supplementary-character tests, and updated this description. - Human review: not stated - Prompts: The author requested a generic connector surface, prefix rules, declarations for every connector, and masking of their union with the engine floor. They removed sensitive marks from keytab paths, added ALTER CATALOG masking, and fixed startup failure from a connector's ServiceLoader. After review, they chose a separate shared Unicode fix, then requested MongoDB alignment and supplementary-character audit coverage here.
|
run buildall |
|
/review |
|
Codex automated review failed and did not complete. Error: Review setup stopped before context preparation ran; inspect the first failed or cancelled setup step. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
Local pipeline review — ✅ PASSschema: doris-repo-review/v1
status: PASS
pr: apache/doris#70338
commit: ab5d64aa529cf5d0a102cb2dfd56e2feba0fe592
base: 5e85976d4c58d5528cb49d3ef677d5e695c2a36d
reviewed_at: 2026-11-17T10:58+08:00
reviewer: morningman
model: gpt-6.1-sol
effort: xhigh
findings: {blocker: 0, major: 0, minor: 1, nit: 0}
rounds: 1
converged: trueNotes for maintainers
Reviewed locally with the |
924060929
left a comment
There was a problem hiding this comment.
Reviewed the FE changes and the related startup, catalog rendering, and audit SQL masking paths. No additional blocking issues found. No local builds or tests were run during this review. Compile, FE UT, P0, external, and nonconcurrent CI checks passed; the performance check is failing and its cause has not been verified.
### Background The spatial PR extends the connector SPI. Upstream master independently added secret-property declarations to that SPI and advanced the connector API to the same major. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032, apache#70338 (upstream connector API change) PR Type: Build/CI/Chore Problem Summary: Merge master 9b5352b into the spatial branch while retaining both SPI surfaces. Resolve the API-32 version collision by advancing the merged spatial contract to API 33 and checking that pre-spatial API-32 plugins are rejected. ### Details - **Change map:** Merge upstream master; manually reconcile only the connector parent POM, its recorded-surface version test, and the engine plugin-version wiring test. Other changes retain the upstream merge result. - **Affected:** Connector plugin API version declaration and its two version tests. - **Developer and release impact:** In-tree connectors share API 33; third-party connector plugins need the spatial API contract. Preserve both the spatial and upstream secret-property surface baselines. - **License and third-party:** No additional dependency or license change beyond the upstream merge. - **Rollback:** Revert this merge while retaining its first parent if necessary. ### Testing - The personal standard FE UT wrapper passed all 291 tests in 39 classes: the complete connector SPI suite, IcebergWritePlanProviderTest and PluginApiVersionWiringTest; zero failures, errors or skips. - The personal standard BE UT wrapper compiled the merged ASAN sources and passed all 292 tests in eight Iceberg, table-reader and cache suites; zero failures or skips. Local UT GLIBC_COMPATIBILITY=OFF; task-owned dependency adapter restored. - The initial BE run had three fixture-setup failures from inaccessible shared temporary directories. The same selection passed with a private TMPDIR, without source changes or changing those directories. - Clang-format16 checked 5145 files; build hygiene and full FE reactor CheckStyle passed. Code whitespace checks passed; generated regression golden formatting was preserved. - Complete product rebuild, SQL regression, full unit-test matrix and a new full PR review were not run for this merge. ### Release note None. ### Check List (For Author) - Behavior changed: Yes, connector API advances to 33 to distinguish the merged spatial contract from upstream API 32. - Does this need documentation: No - Pre-submission status: Partially verified: targeted merge checks passed; complete community CI remains separate. ### AI Disclosure - Tool: OpenAI Codex (GPT-6). - Generated: The merge conflict resolution, API-version test adjustments and this message. - Human review: Pending author review.
…VARBINARY_COLUMN ### What problem does this PR solve? Issue Number: None Related PR: apache#70338 (bumped the major to 32.0 for the catalog secret surface) PR Type: Build/CI/Chore Problem Summary: apache#70338 landed after this branch was written and also took the plugin API major from 31.0 to 32.0, for its own SPI change. Rebasing left SUPPORTS_VARBINARY_COLUMN sharing that major, and the merge conflict was in ConnectorPluginSurfaceTest. fe/fe-connector/pom.xml says every SPI surface change gets its own major, so this moves it to 33.0. It supersedes the "31.0 to 32.0" in the previous commit's description. ### Details - **Affected:** connector.plugin.api.version in fe/fe-connector/pom.xml and the matching assertion and comment in ConnectorPluginSurfaceTest. - **Developer and release impact:** connector plugins built against API 32.x need a rebuild. - **License and third-party:** None - **Rollback:** revert with the previous commit. ### Testing ConnectorPluginSurfaceTest passes locally in the apache/doris build-env container. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Claude Code (Claude Opus) - Generated: this commit and its description - Human review: pending
### Background External catalogs retain connection properties for connector use. Provider declarations feed the FE's masking registry; catalog display, catalog metadata, and audit SQL rendering use that registry. ### What problem does this PR solve? Issue Number: None Related PR: apache#70338 (provider-owned masking and ALTER CATALOG audit coverage) PR Type: Bugfix Problem Summary: Name-only matching exposes credentials in JDBC strings, URL components, SDK/Hadoop properties and custom names. Apply one value-aware display policy plus a dynamic FE-local name regex, without disabling permanent rules. The diff includes shared output routing, regex validation, diagnostic masking and tests. One exercised `uri` value illustrates the difference: | Before | After | |---|---| | `https://fixture:fixture-password@api.example.com/v1?region=east&token=fixture-token` | `https://api.example.com/v1?region=east&token=*XXX` | ### Details - **Change map:** Production code: +232/-18; tests: +445/-22; no generated output, docs, build files, or submodule pins. Most added lines are tests. The production parts are the shared name/value policy and output routing (about 200 added lines), validated dynamic configuration (about 20), and provider declarations/diagnostic masking (about 10). - **Frequency:** Always when a retained credential uses one of the uncovered names or connection formats; reproduced in property display and CREATE/ALTER audit rewriting. - **Root cause:** `DatasourcePrintableMap` and catalog metadata checked registered names without inspecting values. MaxCompute session tokens, Ozone access keys, and JDBC diagnostic URLs were also missing sensitive declarations. - **Why existing tests missed it:** `DatasourcePrintableMapTest` and `test_external_catalog_credential_masking` covered enumerated keys, missing URL, Hadoop and generic-name cases. Existing Ozone/prefix visibility assertions are updated. - **Fix:** Route catalog SHOW/TVF, audit properties and lineage through the same policy; retain provider metadata and protect typed JDBC diagnostics. - **Other paths and branches:** Shared output callers inherit the rules. Cached branch-3.1/4.0/4.1/4.2 retain the parsing gap; only master changes. No single introducing PR was identified. - **Configs and defaults:** `datasource_sensitive_property_pattern` is FE-local, mutable and case-insensitive, defaulting to `password|passwd|secret|token|credential|access[._-]?key|api[._-]?key`. Startup/custom-file/runtime validation rejects invalid stored expressions without replacing the previous value. `(?!)` disables only the supplement; empty matches every name. Configure all serving FEs consistently. - **Behavior change:** Stored properties and connections are unchanged. Display is more conservative: keyword matches can hide metadata, and URLs can lose userinfo/fragments or normalize query separators. The complete masking rules are: | Input | Output rule | |---|---| | Existing exact sensitive keys and provider prefixes | Remain masked, independently of the configurable pattern. Existing hidden-property rules still omit their entries. | | Recognizable JDBC property names | Names ending in a JDBC `url`/`uri` component, including `jdbc_url`, `jdbc.jdbc_url`, `iceberg.jdbc.uri`, and `paimon.jdbc.uri`, mask completely. `connectionString`, `connection_string`, `connection-string`, and `connection.string` suffixes also mask completely. | | JDBC values under any name | Any trimmed value beginning with `jdbc:`, case-insensitively, masks completely, including a bare `uri` alias and opaque/driver-specific JDBC syntax. | | Native SDK credentials | Bare or dot/underscore/hyphen-delimited final components `token`, `credential`, or `credentials` mask completely. Registered aliases and the configurable pattern add coverage. | | Hadoop credentials | The built-in families below mask completely, including dynamic bucket/account names and names prefixed before `fs.`; they do not depend on the configurable pattern. Other credential-like names receive the default pattern's protection. | | Custom names | A match against the configured regex masks the entire value. Matching is a search, so the default protects `custom.password`, `clientSecret`, and `custom.accessKey`. It is unioned with every permanent rule. | | Ordinary addresses | Hostnames, IPv4, bracketed IPv6, optional numeric ports in 0–65535, and comma-separated host lists remain visible. Empty address values stay empty. | | URL selection | Sanitize properties ending in a delimited `uri/url/host/endpoint/address` component, including plural forms, and hierarchical `scheme://` values under other names. A name already classified sensitive takes precedence and masks completely. | | Supported URL schemes | `http`, `https`, `thrift`, `hdfs`, `s3`, `s3a`, `s3n`, `oss`, `cos`, `cosn`, `obs`, `gs`, `abfs`, `abfss`, `wasb`, `wasbs`. Preserve the host, port, ordinary path, and non-sensitive query parameters; remove all userinfo and the entire fragment. | | URL query credentials | Decode parameter names, process duplicates and both `&`/`;` separators, and mask values whose names match permanent/configured rules or contain `password/passwd/pwd/secret/token/credential`, access/API/account/private/auth/app/application key variants, or `authorization`; exact `auth` and `key` are also protected. Query separators render as `&`; decoded names must use ASCII letters/digits, dot, underscore, tilde, or hyphen. | | Signed URLs | A decoded query name containing `signature`, or a delimited `sig`/`sas` component, masks the entire URL, including AWS/GCS/OSS/CloudFront signatures and Azure SAS. | | Unreliable address parsing | Unknown schemes, unsupported multi-host URL formats, opaque/invalid URLs, invalid host/port or escaping, unrecognized query names, matrix path parameters, repeated encoding, and nested connection strings in otherwise unclassified query values mask completely. No raw-value or parser-exception fallback is logged. | Permanent Hadoop families, matched case-insensitively: | Namespace | Credential fields | |---|---| | `fs.s3.` / `fs.s3a.` and optional `bucket.<bucket>.` | `access.key`, `secret.key`, `session.token`, `encryption.key`, `server-side-encryption.key`, `proxy.password`; dotted bucket names are supported. | | `fs.azure.` | `account.key`, `sas`, `sas.fixed.token`, `account.oauth2.client.secret`, `account.oauth2.refresh.token`, `encryption.encoded.client-provided.key`, including account/container suffixes. | | `fs.adl.oauth2.` | `credential`, `refresh.token`. | | `fs.oss.` | `accessKeyId`, `accessKeySecret`, `securityToken`. | | `fs.cosn.` with optional `userInfo.` | `secretId`, `secretKey`. | | `fs.obs.` | `access.key`, `secret.key`, `session.token`, `security.token`. | Masking uses `*XXX` in property output. Lineage continues omitting name-classified secrets and sanitizes other values. Non-empty Ozone access keys and JDBC URLs render as `***` in their typed diagnostic strings. The retained `mc.session_token` declaration does not add token authentication to the current binder. ### Testing - Before the policy change: 8 of 9 new property-policy tests fail because original credentials remain visible; the ordinary endpoint control passes. - Before the JDBC annotation: 2 of 18 JDBC tests fail on the URL declaration and diagnostic disclosure. - Configuration trimming: a targeted test reproduces accepting a regex that becomes invalid after storage trimming. - `run-fe-ut.sh` passes all 94 tests in 10 selected classes locally, including `DatasourcePropertyMaskingTest`, `LineageCatalogPropertyMaskingTest`, and `ConfigTest`. Coverage includes encoded/duplicate/signed URLs, 5,001-host lists, dynamic rules, provider diagnostics, and unchanged connection values. - Extended the P0/nonConcurrent SQL audit suite with SHOW, `catalogs()`, and persisted CREATE/ALTER assertions. It was not executed locally; the regular P0 configuration includes it, while cloud P0 skips nonConcurrent suites. ### Notes for Reviewers A shared `uri` alias requires value-aware handling to preserve REST endpoints. Arbitrary free-text secrets, SDK containers and unrelated logging are outside scope. Matching can conservatively hide keyword-bearing metadata and KMS IDs. ### Release note External data source displays and audit property output now mask JDBC connection strings, native SDK/Hadoop credentials, credential-like custom properties, and URL authentication components. The new FE configuration `datasource_sensitive_property_pattern` adjusts extra name matching without disabling permanent credential rules. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes (document the FE config and catalog-output rules in apache/doris-website; detailed rules are included above). - Pre-submission status: Partially verified: SQL regression suite not executed locally. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Production changes, tests, and this description. - Human review: not stated. - Prompts: First mask MaxCompute session tokens and Ozone access keys, then extend the same PR to JDBC strings, URL credentials, native SDK/Hadoop properties, and configurable name rules.
### Background External catalogs retain connector properties. Provider declarations feed the FE's masking registry; catalog display, catalog metadata, and audit SQL rendering use that registry. ### What problem does this PR solve? Issue Number: None Related PR: apache#70338 (provider-owned masking and ALTER CATALOG audit coverage), apache#70696 (overlapping metastore URI annotation fix) PR Type: Bugfix Problem Summary: Name-only matching exposes JDBC/URL and SDK/Hadoop credentials. Apply one display policy plus a dynamic FE-local name regex, preserving permanent rules. The diff also completes diagnostic annotations and tests. An exercised `uri` value: | Before | After | |---|---| | `https://fixture:fixture-password@api.example.com/v1?region=east&token=fixture-token` | `https://api.example.com/v1?region=east&token=*XXX` | ### Details - **Change map:** Production code: +274/-26; tests: +649/-50; no generated output, docs, build files, or submodule pins. Most added lines are tests. Production parts are shared name/value policy and output routing (about 210 added lines), validated dynamic configuration (about 20), and provider declarations/diagnostic masking (about 40). - **Frequency:** Always when a retained credential uses one of the uncovered names or connection formats; reproduced in property display and CREATE/ALTER audit rewriting. - **Root cause:** `DatasourcePrintableMap` and catalog metadata checked registered names without inspecting values. Credential declarations were incomplete; URI parsing also treated later endpoints in URL lists as ordinary path text. - **Why existing tests missed it:** `DatasourcePrintableMapTest` and `test_external_catalog_credential_masking` covered enumerated keys, missing URL, Hadoop and generic-name cases. Existing access-key/Ozone/prefix visibility assertions are updated; metastore URI diagnostics and multi-URL paths lacked coverage. - **Fix:** Route catalog SHOW/TVF, audit properties and lineage through one policy; complete credential annotations and separate typed URI diagnostic masking from unconditional name registration. - **Other paths and branches:** Shared output callers inherit the rules. Cached branch-3.1/4.0/4.1/4.2 retain the parsing gap; only master changes. No single introducing PR was identified. - **Configs and defaults:** `datasource_sensitive_property_pattern` is FE-local, mutable and case-insensitive, defaulting to `password|passwd|secret|token|credential|access[._-]?key|api[._-]?key`. Startup/custom-file/runtime validation rejects invalid stored expressions without replacing the previous value. `(?!)` disables only the supplement; empty matches every name. Configure all serving FEs consistently. - **Behavior change:** Stored properties and connections are unchanged. Display is more conservative: keyword matches can hide metadata, and URLs can lose userinfo/fragments or normalize query separators. The complete masking rules are: | Input | Output rule | |---|---| | Existing exact sensitive keys and provider prefixes | Remain masked, independently of the configurable pattern. Existing hidden-property rules still omit their entries. | | Recognizable JDBC property names | Names ending in a JDBC `url`/`uri` component, including `jdbc_url`, `jdbc.jdbc_url`, `iceberg.jdbc.uri`, and `paimon.jdbc.uri`, mask completely. `connectionString`, `connection_string`, `connection-string`, and `connection.string` suffixes also mask completely. | | JDBC values under any name | Any trimmed value beginning with `jdbc:`, case-insensitively, masks completely, including a bare `uri` alias and opaque/driver-specific JDBC syntax. | | Native SDK credentials | Bare or dot/underscore/hyphen-delimited final components `token`, `credential`, or `credentials` mask completely. Registered aliases and the configurable pattern add coverage. | | Hadoop credentials | The built-in families below mask completely, including dynamic bucket/account names and names prefixed before `fs.`; they do not depend on the configurable pattern. Other credential-like names receive the default pattern's protection. | | Custom names | A match against the configured regex masks the entire value. Matching is a search, so the default protects `custom.password`, `clientSecret`, and `custom.accessKey`. It is unioned with every permanent rule. | | Ordinary addresses | Hostnames, IPv4, bracketed IPv6, optional numeric ports in 0–65535, and comma-separated host lists remain visible. Empty address values stay empty. | | URL selection | Sanitize properties ending in a delimited `uri/url/host/endpoint/address` component, including plural forms, and hierarchical `scheme://` values under other names. A name already classified sensitive takes precedence and masks completely. | | Supported URL schemes | `http`, `https`, `thrift`, `hdfs`, `s3`, `s3a`, `s3n`, `oss`, `cos`, `cosn`, `obs`, `gs`, `abfs`, `abfss`, `wasb`, `wasbs`. Preserve the host, port, ordinary path, and non-sensitive query parameters; remove all userinfo and the entire fragment. | | URL query credentials | Decode parameter names, process duplicates and both `&`/`;` separators, and mask values whose names match permanent/configured rules or contain `password/passwd/pwd/secret/token/credential`, access/API/account/private/auth/app/application key variants, or `authorization`; exact `auth` and `key` are also protected. Query separators render as `&`; decoded names must use ASCII letters/digits, dot, underscore, tilde, or hyphen. | | Signed URLs | A decoded query name containing `signature`, or a delimited `sig`/`sas` component, masks the entire URL, including AWS/GCS/OSS/CloudFront signatures and Azure SAS. | | Unreliable address parsing | Unknown schemes, opaque/invalid URLs, invalid host/port or escaping, unrecognized query names, matrix path parameters, repeated encoding, and nested connection strings in otherwise unclassified query values mask completely. Any comma-containing URL masks completely, including ordinary query commas; decoded paths containing commas or nested `://` also mask completely. Valid plain host:port lists remain visible. No raw-value or parser-exception fallback is logged. | | Typed URI diagnostics | Iceberg/Paimon JDBC and REST URI fields, including the shared `uri` alias, use `sensitive=true, sensitiveInDiagnosticsOnly=true`: non-empty diagnostic values render as `***`, empty values as `<empty>`. They do not export URI aliases into the global secret-name registry; catalog output follows the value-aware rules above. | | Credential annotations | Access keys and every declared alias in S3, MinIO, GCS, OSS, COS, OBS, Iceberg Glue and Iceberg REST now join existing secret/token annotations; Ozone access keys and JDBC catalog URLs remain protected. These declarations mask typed diagnostics and contribute unconditional provider-sensitive names. Non-secret account names, OAuth modes/scopes and credential-file paths are unchanged. | Permanent Hadoop families, matched case-insensitively: | Namespace | Credential fields | |---|---| | `fs.s3.` / `fs.s3a.` and optional `bucket.<bucket>.` | `access.key`, `secret.key`, `session.token`, `encryption.key`, `server-side-encryption.key`, `proxy.password`; dotted bucket names are supported. | | `fs.azure.` | `account.key`, `sas`, `sas.fixed.token`, `account.oauth2.client.secret`, `account.oauth2.refresh.token`, `encryption.encoded.client-provided.key`, including account/container suffixes. | | `fs.adl.oauth2.` | `credential`, `refresh.token`. | | `fs.oss.` | `accessKeyId`, `accessKeySecret`, `securityToken`. | | `fs.cosn.` with optional `userInfo.` | `secretId`, `secretKey`. | | `fs.obs.` | `access.key`, `secret.key`, `session.token`, `security.token`. | Masking uses `*XXX` in property output. Lineage continues omitting name-classified secrets and sanitizes other values. Non-empty annotated credentials render as `***` in typed diagnostics. The retained `mc.session_token` declaration does not add token authentication to the current binder. ### Testing - Before the policy change: 8 of 9 new property-policy tests fail because original credentials remain visible; the ordinary endpoint control passes. - Before the JDBC annotation: 2 of 18 JDBC tests fail on the URL declaration and diagnostic disclosure. - Configuration trimming: a targeted test reproduces accepting a regex that becomes invalid after storage trimming. - Annotation follow-up baseline: S3 and Iceberg execute with 5 failures; Paimon executes separately with 2 URI diagnostic failures. The multi-URL case fails because its later password remains visible. - `run-fe-ut.sh` passes all 354 tests in 32 selected classes locally: masking/audit/lineage, configuration, metastore/filesystem holders, actual provider registration, security/metadata/plugin surfaces and dispatch. Coverage includes URL lists, encoded/duplicate/signed URLs, 5,001-host lists, dynamic rules and unchanged connection values. FE Checkstyle passes. - Extended the P0/nonConcurrent SQL audit suite with SHOW, `catalogs()`, and persisted CREATE/ALTER assertions. It was not executed locally; the regular P0 configuration includes it, while cloud P0 skips nonConcurrent suites. ### Notes for Reviewers The new defaulted `ConnectorProperty.sensitiveInDiagnosticsOnly` metadata prevents shared URI aliases from hiding every REST endpoint. Connector/metastore SPI signatures and baselines are unchanged. Free-text secrets, SDK containers and unrelated logging remain outside scope. ### Release note External data source displays and audit property output now mask JDBC connection strings, native SDK/Hadoop credentials, credential-like custom properties, and URL authentication components. The new FE configuration `datasource_sensitive_property_pattern` adjusts extra name matching without disabling permanent credential rules. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes (document the FE config and catalog-output rules in apache/doris-website; detailed rules are included above). - Pre-submission status: Partially verified: SQL regression suite not executed locally. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Production changes, tests, and this description. - Human review: not stated. - Prompts: Mask MaxCompute/Ozone credentials, extend shared JDBC/URL/SDK/Hadoop/custom-name rules, then complete sensitive annotations and address review findings.
### Background External catalogs retain connector properties. Provider declarations feed the FE's masking registry; catalog display, catalog metadata, and audit SQL rendering use that registry. ### What problem does this PR solve? Issue Number: None Related PR: apache#70338 (provider-owned masking and ALTER CATALOG audit coverage), apache#70696 (overlapping metastore URI annotation fix) PR Type: Bugfix Problem Summary: Name-only matching exposes JDBC/URL and SDK/Hadoop credentials. Apply one display policy plus a dynamic FE-local name regex, preserving permanent rules. The diff also completes diagnostic annotations and tests. An exercised `uri` value: | Before | After | |---|---| | `https://fixture:fixture-password@api.example.com/v1?region=east&token=fixture-token` | `https://api.example.com/v1?region=east&token=*XXX` | ### Details - **Change map:** Production code: +274/-26; tests: +649/-50; CI config: +9/-0; no generated/docs/submodule changes. Most added lines are tests. Production parts are shared name/value policy and output routing (about 210 added lines), validated dynamic configuration (about 20), and provider declarations/diagnostic masking (about 40). - **Frequency:** Always when a retained credential uses one of the uncovered names or connection formats; reproduced in property display and CREATE/ALTER audit rewriting. - **Root cause:** `DatasourcePrintableMap` and catalog metadata checked registered names without inspecting values. Credential declarations were incomplete; URI parsing also treated later endpoints in URL lists as ordinary path text. - **Why existing tests missed it:** `DatasourcePrintableMapTest` and `test_external_catalog_credential_masking` covered enumerated keys, missing URL, Hadoop and generic-name cases. Existing access-key/Ozone/prefix visibility assertions are updated; metastore URI diagnostics and multi-URL paths lacked coverage. - **Fix:** Route catalog SHOW/TVF, audit properties and lineage through one policy; complete credential annotations and separate typed URI diagnostic masking from unconditional name registration. - **Other paths and branches:** Shared output callers inherit the rules. Cached branch-3.1/4.0/4.1/4.2 retain the parsing gap; only master changes. No single introducing PR was identified. - **Configs and defaults:** `datasource_sensitive_property_pattern` is FE-local, mutable and case-insensitive, defaulting to `password|passwd|secret|token|credential|access[._-]?key|api[._-]?key`. Startup/custom-file/runtime validation rejects invalid stored expressions without replacing the previous value. `(?!)` disables only the supplement; empty matches every name. Configure all serving FEs consistently. - **Behavior change:** Stored properties and connections are unchanged. Display is more conservative: keyword matches can hide metadata, and URLs can lose userinfo/fragments or normalize query separators. The complete masking rules are: | Input | Output rule | |---|---| | Existing exact sensitive keys and provider prefixes | Remain masked, independently of the configurable pattern. Existing hidden-property rules still omit their entries. | | Recognizable JDBC property names | Names ending in a JDBC `url`/`uri` component, including `jdbc_url`, `jdbc.jdbc_url`, `iceberg.jdbc.uri`, and `paimon.jdbc.uri`, mask completely. `connectionString`, `connection_string`, `connection-string`, and `connection.string` suffixes also mask completely. | | JDBC values under any name | Any trimmed value beginning with `jdbc:`, case-insensitively, masks completely, including a bare `uri` alias and opaque/driver-specific JDBC syntax. | | Native SDK credentials | Bare or dot/underscore/hyphen-delimited final components `token`, `credential`, or `credentials` mask completely. Registered aliases and the configurable pattern add coverage. | | Hadoop credentials | The built-in families below mask completely, including dynamic bucket/account names and names prefixed before `fs.`; they do not depend on the configurable pattern. Other credential-like names receive the default pattern's protection. | | Custom names | A match against the configured regex masks the entire value. Matching is a search, so the default protects `custom.password`, `clientSecret`, and `custom.accessKey`. It is unioned with every permanent rule. | | Ordinary addresses | Hostnames, IPv4, bracketed IPv6, optional numeric ports in 0–65535, and comma-separated host lists remain visible. Empty address values stay empty. | | URL selection | Sanitize properties ending in a delimited `uri/url/host/endpoint/address` component, including plural forms, and hierarchical `scheme://` values under other names. A name already classified sensitive takes precedence and masks completely. | | Supported URL schemes | `http`, `https`, `thrift`, `hdfs`, `s3`, `s3a`, `s3n`, `oss`, `cos`, `cosn`, `obs`, `gs`, `abfs`, `abfss`, `wasb`, `wasbs`. Preserve the host, port, ordinary path, and non-sensitive query parameters; remove all userinfo and the entire fragment. | | URL query credentials | Decode parameter names, process duplicates and both `&`/`;` separators, and mask values whose names match permanent/configured rules or contain `password/passwd/pwd/secret/token/credential`, access/API/account/private/auth/app/application key variants, or `authorization`; exact `auth` and `key` are also protected. Query separators render as `&`; decoded names must use ASCII letters/digits, dot, underscore, tilde, or hyphen. | | Signed URLs | A decoded query name containing `signature`, or a delimited `sig`/`sas` component, masks the entire URL, including AWS/GCS/OSS/CloudFront signatures and Azure SAS. | | Unreliable address parsing | Unknown schemes, opaque/invalid URLs, invalid host/port or escaping, unrecognized query names, matrix path parameters, repeated encoding, and nested connection strings in otherwise unclassified query values mask completely. Any comma-containing URL masks completely, including ordinary query commas; decoded paths containing commas or nested `://` also mask completely. Valid plain host:port lists remain visible. No raw-value or parser-exception fallback is logged. | | Typed URI diagnostics | Iceberg/Paimon JDBC and REST URI fields, including the shared `uri` alias, use `sensitive=true, sensitiveInDiagnosticsOnly=true`: non-empty diagnostic values render as `***`, empty values as `<empty>`. They do not export URI aliases into the global secret-name registry; catalog output follows the value-aware rules above. | | Credential annotations | Access keys and every declared alias in S3, MinIO, GCS, OSS, COS, OBS, Iceberg Glue and Iceberg REST now join existing secret/token annotations; Ozone access keys and JDBC catalog URLs remain protected. These declarations mask typed diagnostics and contribute unconditional provider-sensitive names. Non-secret account names, OAuth modes/scopes and credential-file paths are unchanged. | Permanent Hadoop families, matched case-insensitively: | Namespace | Credential fields | |---|---| | `fs.s3.` / `fs.s3a.` and optional `bucket.<bucket>.` | `access.key`, `secret.key`, `session.token`, `encryption.key`, `server-side-encryption.key`, `proxy.password`; dotted bucket names are supported. | | `fs.azure.` | `account.key`, `sas`, `sas.fixed.token`, `account.oauth2.client.secret`, `account.oauth2.refresh.token`, `encryption.encoded.client-provided.key`, including account/container suffixes. | | `fs.adl.oauth2.` | `credential`, `refresh.token`. | | `fs.oss.` | `accessKeyId`, `accessKeySecret`, `securityToken`. | | `fs.cosn.` with optional `userInfo.` | `secretId`, `secretKey`. | | `fs.obs.` | `access.key`, `secret.key`, `session.token`, `security.token`. | Masking uses `*XXX` in property output. Lineage continues omitting name-classified secrets and sanitizes other values. Non-empty annotated credentials render as `***` in typed diagnostics. The retained `mc.session_token` declaration does not add token authentication to the current binder. ### Testing - Before the policy change: 8 of 9 new property-policy tests fail because original credentials remain visible; the ordinary endpoint control passes. - Before the JDBC annotation: 2 of 18 JDBC tests fail on the URL declaration and diagnostic disclosure. - Configuration trimming: a targeted test reproduces accepting a regex that becomes invalid after storage trimming. - Annotation follow-up baseline: S3 and Iceberg execute with 5 failures; Paimon executes separately with 2 URI diagnostic failures. The multi-URL case fails because its later password remains visible. - `run-fe-ut.sh` passes all 354 tests in 32 selected classes locally: masking/audit/lineage, configuration, metastore/filesystem holders, actual provider registration, security/metadata/plugin surfaces and dispatch. Coverage includes URL lists, encoded/duplicate/signed URLs, 5,001-host lists, dynamic rules and unchanged connection values. FE Checkstyle passes. - Extended the P0/nonConcurrent SQL audit suite with SHOW, `catalogs()`, and persisted CREATE/ALTER assertions. It was not executed locally; the regular P0 configuration includes it, while cloud P0 skips nonConcurrent suites. | CI check | Evidence | |---|---| | Gitleaks 8.30.0 | The linked failing job scans the full PR commit range and misclassifies two adjacent Hadoop property-name literals as API-key values. The same scan reproduces 2 findings before the config fix and 0 after it. A generic-api-key exception requires both the exact test path and one of two exact synthetic property names. | | Exception boundaries | Two fixture-name occurrences in another file and an unrelated synthetic API-key value in the allowed file remain detected; only the two intended occurrences are ignored. FE source/tests are unchanged by this CI-only fix. | ### Notes for Reviewers The new defaulted `ConnectorProperty.sensitiveInDiagnosticsOnly` metadata prevents shared URI aliases from hiding every REST endpoint. Connector/metastore SPI signatures and baselines are unchanged. Free-text secrets, SDK containers and unrelated logging remain outside scope. ### Release note External data source displays and audit property output now mask JDBC connection strings, native SDK/Hadoop credentials, credential-like custom properties, and URL authentication components. The new FE configuration `datasource_sensitive_property_pattern` adjusts extra name matching without disabling permanent credential rules. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes (document the FE config and catalog-output rules in apache/doris-website; detailed rules are included above). - Pre-submission status: Partially verified: SQL regression suite not executed locally. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Production changes, tests, and this description. - Human review: not stated. - Prompts: Mask MaxCompute/Ozone credentials, extend shared JDBC/URL/SDK/Hadoop/custom-name rules, then complete sensitive annotations and address review findings.
### Background External catalogs retain connector properties. Provider declarations feed the FE's masking registry; catalog display, catalog metadata, and audit SQL rendering use that registry. ### What problem does this PR solve? Issue Number: None Related PR: apache#70338 (provider-owned masking and ALTER CATALOG audit coverage), apache#70696 (overlapping metastore URI annotation fix), apache#55016 (all-FE configuration forwarding) PR Type: Bugfix Problem Summary: Name-only matching exposes JDBC/URL and SDK/Hadoop credentials. Apply one display policy plus a dynamic FE-local name regex, preserving permanent rules. The diff also completes diagnostic annotations and tests. An exercised `uri` value: | Before | After | |---|---| | `https://fixture:fixture-password@api.example.com/v1?region=east&token=fixture-token` | `https://api.example.com/v1?region=east&token=*XXX` | ### Details - **Change map:** Production code: +279/-28; tests: +710/-50; CI config: +9/-0; no generated/docs/submodule changes. Most added lines are tests. Production parts are shared name/value policy and output routing (about 210 added lines), validated configuration and SQL forwarding (about 30), and provider declarations/diagnostic masking (about 40). - **Frequency:** Always when a retained credential uses one of the uncovered names or connection formats; reproduced in property display and CREATE/ALTER audit rewriting. - **Root cause:** `DatasourcePrintableMap` checked names without inspecting values; credential declarations were incomplete. URI parsing accepted later endpoints as path text, and forwarded config SQL embedded decoded strings without escaping. - **Why existing tests missed it:** Property tests missed URL/Hadoop/custom-name cases; access-key assertions expected disclosure. Metastore URI diagnostics lacked coverage. Admin config and manager regression tests used numeric values, missing SQL escaping. - **Fix:** Share catalog/audit/lineage masking, complete credential annotations and distinguish diagnostic URIs; quote forwarded config strings using the session SQL mode. - **Other paths and branches:** Shared output callers inherit the rules. Cached branch-3.1/4.0/4.1/4.2 retain the parsing gap; only master changes. No single introducing PR was identified. - **Configs and defaults:** `datasource_sensitive_property_pattern` is FE-local, mutable and case-insensitive, defaulting to `password|passwd|secret|token|credential|access[._-]?key|api[._-]?key`. Startup/custom-file/runtime validation rejects invalid stored expressions without replacing the previous value. `(?!)` disables only the supplement; empty matches every name. Configure all serving FEs consistently. - **Behavior change:** Stored properties and connections are unchanged. Display is more conservative: keyword matches can hide metadata, and URLs can lose userinfo/fragments or normalize query separators. The complete masking rules are: | Input | Output rule | |---|---| | Existing exact sensitive keys and provider prefixes | Remain masked, independently of the configurable pattern. Existing hidden-property rules still omit their entries. | | Recognizable JDBC property names | Names ending in a JDBC `url`/`uri` component, including `jdbc_url`, `jdbc.jdbc_url`, `iceberg.jdbc.uri`, and `paimon.jdbc.uri`, mask completely. `connectionString`, `connection_string`, `connection-string`, and `connection.string` suffixes also mask completely. | | JDBC values under any name | Any trimmed value beginning with `jdbc:`, case-insensitively, masks completely, including a bare `uri` alias and opaque/driver-specific JDBC syntax. | | Native SDK credentials | Bare or dot/underscore/hyphen-delimited final components `token`, `credential`, or `credentials` mask completely. Registered aliases and the configurable pattern add coverage. | | Hadoop credentials | The built-in families below mask completely, including dynamic bucket/account names and names prefixed before `fs.`; they do not depend on the configurable pattern. Other credential-like names receive the default pattern's protection. | | Custom names | A match against the configured regex masks the entire value. Matching is a search, so the default protects `custom.password`, `clientSecret`, and `custom.accessKey`. It is unioned with every permanent rule. | | Ordinary addresses | Hostnames, IPv4, bracketed IPv6, optional numeric ports in 0–65535, and comma-separated host lists remain visible. Empty address values stay empty. | | URL selection | Sanitize properties ending in a delimited `uri/url/host/endpoint/address` component, including plural forms, and hierarchical `scheme://` values under other names. A name already classified sensitive takes precedence and masks completely. | | Supported URL schemes | `http`, `https`, `thrift`, `hdfs`, `s3`, `s3a`, `s3n`, `oss`, `cos`, `cosn`, `obs`, `gs`, `abfs`, `abfss`, `wasb`, `wasbs`. Preserve the host, port, ordinary path, and non-sensitive query parameters; remove all userinfo and the entire fragment. | | URL query credentials | Decode parameter names, process duplicates and both `&`/`;` separators, and mask values whose names match permanent/configured rules or contain `password/passwd/pwd/secret/token/credential`, access/API/account/private/auth/app/application key variants, or `authorization`; exact `auth` and `key` are also protected. Query separators render as `&`; decoded names must use ASCII letters/digits, dot, underscore, tilde, or hyphen. | | Signed URLs | A decoded query name containing `signature`, or a delimited `sig`/`sas` component, masks the entire URL, including AWS/GCS/OSS/CloudFront signatures and Azure SAS. | | Unreliable address parsing | Unknown schemes, opaque/invalid URLs, invalid host/port or escaping, unrecognized query names, matrix path parameters, repeated encoding, and nested connection strings in otherwise unclassified query values mask completely. Any comma-containing URL masks completely, including ordinary query commas; decoded paths containing commas or nested `://` also mask completely. Valid plain host:port lists remain visible. No raw-value or parser-exception fallback is logged. | | All-FE configuration SQL | `ADMIN SET ALL FRONTENDS CONFIG` quotes decoded names and values according to the forwarded `sql_mode`; regex backslashes and quotes survive peer reparsing in default and `NO_BACKSLASH_ESCAPES` modes. | | Typed URI diagnostics | Iceberg/Paimon JDBC and REST URI fields, including the shared `uri` alias, use `sensitive=true, sensitiveInDiagnosticsOnly=true`: non-empty diagnostic values render as `***`, empty values as `<empty>`. They do not export URI aliases into the global secret-name registry; catalog output follows the value-aware rules above. | | Credential annotations | Access keys and every declared alias in S3, MinIO, GCS, OSS, COS, OBS, Iceberg Glue and Iceberg REST now join existing secret/token annotations; Ozone access keys and JDBC catalog URLs remain protected. These declarations mask typed diagnostics and contribute unconditional provider-sensitive names. Non-secret account names, OAuth modes/scopes and credential-file paths are unchanged. | Permanent Hadoop families, matched case-insensitively: | Namespace | Credential fields | |---|---| | `fs.s3.` / `fs.s3a.` and optional `bucket.<bucket>.` | `access.key`, `secret.key`, `session.token`, `encryption.key`, `server-side-encryption.key`, `proxy.password`; dotted bucket names are supported. | | `fs.azure.` | `account.key`, `sas`, `sas.fixed.token`, `account.oauth2.client.secret`, `account.oauth2.refresh.token`, `encryption.encoded.client-provided.key`, including account/container suffixes. | | `fs.adl.oauth2.` | `credential`, `refresh.token`. | | `fs.oss.` | `accessKeyId`, `accessKeySecret`, `securityToken`. | | `fs.cosn.` with optional `userInfo.` | `secretId`, `secretKey`. | | `fs.obs.` | `access.key`, `secret.key`, `session.token`, `security.token`. | Masking uses `*XXX` in property output. Lineage continues omitting name-classified secrets and sanitizes other values. Non-empty annotated credentials render as `***` in typed diagnostics. The retained `mc.session_token` declaration does not add token authentication to the current binder. ### Testing - Before the policy change: 8 of 9 new property-policy tests fail because original credentials remain visible; the ordinary endpoint control passes. - Before the JDBC annotation: 2 of 18 JDBC tests fail on the URL declaration and diagnostic disclosure. - Configuration trimming: a targeted test reproduces accepting a regex that becomes invalid after storage trimming. - Annotation follow-up baseline: S3 and Iceberg execute with 5 failures; Paimon executes separately with 2 URI diagnostic failures. The multi-URL case fails because its later password remains visible. - `run-fe-ut.sh` passes all 367 tests in 35 selected classes locally: masking/audit/lineage, configuration, metastore/filesystem holders, actual provider registration, security/metadata/plugin surfaces, dispatch and config SQL roundtrips. Coverage includes URL lists, encoded/duplicate/signed URLs, 5,001-host lists, dynamic rules and unchanged connection values. FE Checkstyle passes. - Extended the P0/nonConcurrent SQL audit suite with SHOW, `catalogs()`, and persisted CREATE/ALTER assertions. It was not executed locally; the regular P0 configuration includes it, while cloud P0 skips nonConcurrent suites. | CI check | Evidence | |---|---| | Gitleaks 8.30.0 | The Gitleaks job scans the full PR commit range and misclassifies two adjacent Hadoop property-name literals as API-key values. The same scan reproduces 2 findings before the config fix and 0 after it. A generic-api-key exception requires both the exact test path and one of two exact synthetic property names. | | All-FE regex forwarding | Before the serializer fix, 2 of 9 admin-config tests fail: the peer exposes `custom.pin1`, and the regex loses its backslash. After the fix, all 9 pass; actual parser/serializer/Env application plus masking and a literal matrix cover both SQL modes and command scopes. Peer application is simulated in-process, without multi-FE RPC. | | Exception boundaries | Two fixture-name occurrences in another file and an unrelated synthetic API-key value in the allowed file remain detected; only the two intended occurrences are ignored. | ### Notes for Reviewers The new defaulted `ConnectorProperty.sensitiveInDiagnosticsOnly` metadata prevents shared URI aliases from hiding every REST endpoint. Connector/metastore SPI signatures and baselines are unchanged. Free-text secrets, SDK containers and unrelated logging remain outside scope. ### Release note External data source displays and audit property output now mask JDBC connection strings, native SDK/Hadoop credentials, credential-like custom properties, and URL authentication components. The new FE configuration `datasource_sensitive_property_pattern` adjusts extra name matching without disabling permanent credential rules. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes (document the FE config and catalog-output rules in apache/doris-website; detailed rules are included above). - Pre-submission status: Partially verified: SQL regression and multi-FE RPC not executed locally. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Production changes, tests, and this description. - Human review: not stated. - Prompts: Mask MaxCompute/Ozone credentials, extend shared JDBC/URL/SDK/Hadoop/custom-name rules, then complete sensitive annotations and address review findings.
…ogs and basic reads (#70681) ### Background Lance datasets store schemas, versions and fragment lists in manifests. FE reads those manifests to plan a query, and BE reads the fragments through lance-c. Doris 4.1/4.2 provide Lance catalogs in fe-core; master uses connector plugins and already has the BE reader (#69581) and legacy image migration (#69575). ### What problem does this PR solve? Issue Number: #70680 Related PR: #65730, #66581, #66597, #66805 (source read-path changes); #70338 (secret masking), #70351 (TIMEV2 precision), #69581 (BE reader), #69575 (legacy images) PR Type: Feature Problem Summary: Master has no plugin serving the `lance` catalog type, so users cannot query Lance catalogs after upgrading from 4.1/4.2. This ports the first part of that read path: filesystem catalogs, static S3 credentials, Arrow type mapping, basic scans and main-chain time travel. The plugin also needs JNI packaging and resource management; other catalog types keep their existing behavior. ### Details - **Change map:** 57 files, +6732/-2: production code +3377, tests +2974, generated test output +75, build/CI +306/-2. Production has four parts: property binding and namespace lifetime; schema and version resolution; S3 storage-option translation shared by FE/BE; fragment scan planning. Tests cover those contracts, native datasets and a regression suite. Packaging registers the module, plugin distribution, JNI replacement and MinIO fixture. - **Scope:** Local/file and S3 filesystem catalogs; `SHOW DATABASES/TABLES`, `DESC`, `SELECT`, `FOR VERSION AS OF n`, and `FOR TIME AS OF 'yyyy-MM-dd HH:mm:ss[.SSS]'`. REST catalogs fail explicitly until the next PR, including first access to replayed REST catalogs. Tags, branches, OSS warehouses, pushdown and writes are outside this PR. S3 access without static AK/SK, including anonymous and credential-chain access, fails explicitly. AssumeRole is also rejected, even when source AK/SK are provided. - **Design:** Follow the existing connector plugins, rather than add Lance catalog classes to fe-core. The plugin opts into MVCC and memoizes metadata per statement, so schema, fragments, statistics and BE ranges use one immutable dataset version. Ordinary query pins retain their schema across the engine schema-cache boundary; historical statistics also apply the snapshot to unpinned handles. Time travel compares manifest commit times at their original precision in the session time zone. The final S3 endpoint fills both native endpoint coordinates after namespace options are merged, preventing ambient AWS endpoint overrides while preserving namespace service-endpoint precedence. Each fragment becomes one scan range. An in-flight call count delays native resource disposal after catalog retirement. Proposed in #70680, opened with this PR; no community design discussion has taken place yet. - **Usage:** ```sql CREATE CATALOG lance_s3 PROPERTIES ( "type" = "lance", "warehouse" = "s3://warehouse/lance", "s3.endpoint" = "http://127.0.0.1:9000", "s3.access_key" = "admin", "s3.secret_key" = "password", "s3.region" = "us-east-1", "use_path_style" = "true" ); SELECT count(*) FROM lance_s3.`default`.all_types FOR VERSION AS OF 1; SELECT count(*) FROM lance_s3.`default`.all_types FOR TIME AS OF '2026-07-30 10:11:50'; ``` - **Default behavior:** Enabled by creating a Lance catalog. `lance.conf` contains the optional `lance_catalog_arrow_memory_limit_bytes`, default 256 MiB per catalog; changes require an FE restart. - **Compatibility:** Preserve the 4.1/4.2 property map and names. Legacy catalogs use the existing image migration. The Arrow memory setting moves from fe.conf to lance.conf; copy any customized value. `SHOW CREATE TABLE` uses `ENGINE=lance`, as other plugins do. No Thrift or persisted-metadata format changes. BE needs #69581; projecting Arrow Null, Duration, JSON or bfloat16 fences out smooth-upgrade source BEs. Newer catalog features remain unsupported during this staged port. Both cloud and shared-nothing use this planning path; a cloud deployment was not tested locally. - **Persistence and failure handling:** Catalog metadata uses the existing plugin catalog journal/image path; dataset contents are read-only. The namespace opens lazily, avoiding storage I/O and JNI loading during replay. Missing versions and unavailable native libraries fail explicitly. Statement cleanup releases its metadata memo; dropping or altering a catalog retires its client and closes resources after active calls finish. - **Security and privileges:** CREATE_PRIV permits catalog creation; ALTER_PRIV is required to change its properties. FE and BE make outbound HTTP requests to the configured S3 endpoint, an SSRF surface. The provider declares S3-compatible endpoint aliases for the existing CREATE/ALTER gate when `security_checker_class_name` is configured. REST credential keys are declared for masking even though REST reads are deferred. Build-time JNI replacement downloads fixed, checksum-pinned Lance JNI and Apache Arrow Java source assets. - **Follow-up plan:** REST/OSS and namespace-vended credentials; predicate/LIMIT/COUNT pushdown, fragment grouping and scalar indexes; then session/table caches and profile counters. Search TVFs, index operations and tag/branch/managed versioning follow separately under #70680. ### Testing - Storage/JNI fixes at `536982b`, macOS arm64/JDK 17: all 81 Lance tests in 14 classes passed, with no skips, through `run-fe-ut.sh --run` and a scoped `CUSTOM_MVN` wrapper. Checkstyle was enabled and Maven build cache disabled. Cases include role plus source keys, generic/service endpoint precedence, explicit HTTP policy, and native HTTP requests under unrelated AWS endpoint and credential variables. - On the unfixed `b62c94c`, the same targeted Java tests produced 5 assertion failures across 14 tests with no skips. The native child actually requested the unrelated endpoint at port 1. The real shell helper also failed with JAVA_HOME unset; all three JDK-selection cases pass with the fix. - Shell packaging tests cover JAVA_HOME, selected JAVA, PATH-only discovery, jar/platform isolation, checksum/version/runtime gates and failure atomicity. The real Arrow JNI helper compiled with JAVA_HOME unset, and the native HTTP test passed using that rebuilt library; JVM library logs confirmed its path. - External CI at `536982b` passed 809 of 810 tests. The AssumeRole negative case failed because its private endpoint selected the MinIO provider, whose HMAC-only validation ran before Lance. The fixture now sets `provider=S3` for that catalog and keeps the exact Lance exception assertion. - Provider fixture fix, macOS arm64/JDK 17: `run-fe-ut.sh --run` with a scoped `CUSTOM_MVN` wrapper passed 54 tests in `LanceStorageOptionsTest`, `S3FileSystemProviderTest`, `MinioFileSystemProviderTest` and `MinioFileSystemPropertiesTest`, with no skips, Checkstyle enabled and Maven build cache disabled. A probe extracted the baseline and candidate catalog properties from the Groovy suite and used freshly compiled production providers and Lance options: the baseline reproduced the MinIO rejection; the candidate retained the role and reached the exact Lance AssumeRole rejection. Groovy parsing and `git diff --check` passed. The complete SQL suite and full External rerun remain pending at the new head. - Earlier validation at `b62c94c` reported 78 Lance tests, 162 Connector SPI tests and 16 foundation binding tests passing. Initial feature validation reported 507 related FE tests, `build.sh --fe`, and the MinIO regression with this worktree's compatible BE `33d48fcf6da`. Those runs predate this follow-up and are not current cluster verification. A full External rerun, cloud, current-master BE and Linux/glibc 2.17 execution remain unverified at the new head. ### Notes for Reviewers - The BE Lance reader does not consume `history_schema_info`. Omitting it retains FileScannerV2's exact-name matching, which the reader tests exercise. - Native FE tests skip explicitly on hosts unable to load Lance or Arrow C Data JNI. The External pipeline enables the MinIO fixture and runs the new regression suite. Linux x86_64 deployment rebuilds Arrow C Data JNI with the Doris C++ toolchain, statically links its C++ runtimes and replaces only that jar entry. This build step needs a JDK, C++ compiler and `readelf`; it honors JAVA_HOME or discovers java.home from the JVM selected by env.sh, including PATH-only JDK installations; releases targeting glibc 2.17 must use the corresponding Doris build environment. Linux/CentOS 7 execution of this new build step remains untested locally.
…70705) ### Background External catalogs retain connector properties. Provider declarations feed the masking registry used by display, metadata and audit SQL. ### What problem does this PR solve? Issue Number: None Related PR: #70338 (provider-owned masking and ALTER CATALOG audit coverage), #70696 (overlapping metastore URI annotation fix), #55016 (all-FE configuration forwarding), #67489 (resolved streaming audit inputs) PR Type: Bugfix Problem Summary: Name-only matching exposes JDBC/URL and SDK/Hadoop credentials. Apply shared value-aware masking and a supplementary FE-local name regex, completing diagnostic annotations. An exercised `uri` value: | Before | After | |---|---| | `https://fixture:fixture-password@api.example.com/v1?region=east&token=fixture-token` | `https://api.example.com/v1?region=east&token=*XXX` | ### Details - **Change map:** Production: +514/-44 across 28 files; tests: +1237/-76 across 30; CI: +9/-0 in one. No generated/docs/submodule changes. Production covers shared masking, provider annotations, configuration forwarding and structured streaming audit rendering. - **Frequency:** Always when a retained credential uses one of the uncovered names or connection formats; reproduced in property display and CREATE/ALTER audit rewriting. - **Root cause:** `DatasourcePrintableMap` checked names without inspecting values; credential declarations were incomplete. Generic URI parsing also hid local files, ViewFS and resolved streaming batches; configuration forwarding lost SQL escapes. - **Why existing tests missed it:** Property tests missed format-specific locations; streaming assertions had accepted hidden final URIs. SQL audit tests missed these formats; existing ADBC metadata tests already require visible local paths. Admin tests missed string escaping. - **Fix:** Share catalog/audit/lineage masking, complete credential annotations and distinguish diagnostic URIs; preserve supported locations and independently sanitize selected streaming files at final audit emission; quote forwarded configuration strings correctly. - **Other paths and branches:** Shared output callers inherit the rules. Cached branch-3.1/4.0/4.1/4.2 retain the parsing gap; only master changes. No single introducing PR was identified. - **Configs and defaults:** `datasource_sensitive_property_pattern` is FE-local, mutable and case-insensitive, defaulting to `password|passwd|secret|token|credential|access[._-]?key|api[._-]?key`. Startup/custom-file/runtime validation rejects invalid stored expressions without replacing the previous value. `(?!)` disables only the supplement; empty matches every name. Configure all serving FEs consistently. - **Behavior change:** Stored properties and connections are unchanged. Display is more conservative: keyword matches can hide metadata, and URLs can lose userinfo/fragments or normalize query separators. The complete masking rules are: | Input | Output rule | |---|---| | Existing exact sensitive keys and provider prefixes | Remain masked, independently of the configurable pattern. Existing hidden-property rules still omit their entries. | | Recognizable JDBC property names | Names ending in a JDBC `url`/`uri` component, including `jdbc_url`, `jdbc.jdbc_url`, `iceberg.jdbc.uri`, and `paimon.jdbc.uri`, mask completely. `connectionString`, `connection_string`, `connection-string`, and `connection.string` suffixes also mask completely. | | JDBC values under any name | Any trimmed value beginning with `jdbc:`, case-insensitively, masks completely, including a bare `uri` alias and opaque/driver-specific JDBC syntax. | | Native SDK credentials | Bare or dot/underscore/hyphen-delimited final components `token`, `credential`, or `credentials` mask completely. Registered aliases and the configurable pattern add coverage. | | Hadoop credentials | The built-in families below mask completely, including dynamic bucket/account names and names prefixed before `fs.`; they do not depend on the configurable pattern. Other credential-like names receive the default pattern's protection. | | Custom names | A match against the configured regex masks the entire value. Matching is a search, so the default protects `custom.password`, `clientSecret`, and `custom.accessKey`. It is unioned with every permanent rule. | | Ordinary addresses | Hostnames, IPv4, bracketed IPv6, optional numeric ports in 0–65535, and comma-separated host lists remain visible. Empty address values stay empty. | | URL selection | Sanitize properties ending in a delimited `uri/url/host/endpoint/address` component, including plural forms, and hierarchical `scheme://` or `file:/`, `hdfs:/`, `viewfs:/` values under other names. A name already classified sensitive takes precedence and masks completely. | | Supported URL schemes | `http`, `https`, `thrift`, `hdfs`, `viewfs`, `file`, `s3`, `s3a`, `s3n`, `oss`, `cos`, `cosn`, `obs`, `gs`, `abfs`, `abfss`, `wasb`, `wasbs`. Preserve the host, port, ordinary path, and non-sensitive query parameters; remove authentication userinfo (Azure exception below) and the entire fragment. | | Local driver paths and file URIs | Recognized `driver_url` suffixes retain absolute POSIX paths, including spaces/Unicode; protocol-relative, control, query, fragment, userinfo, matrix or nested-URL syntax masks completely. Hierarchical `file:/absolute/path` and `file:///absolute/path` retain their spelling, require no authority, and use the common query/signature/fragment rules. Name/JDBC masking takes precedence. | | Native filesystem locations | `viewfs://mount-name/path` accepts validated ordinary-address authority syntax, including ASCII underscore mount names, with numeric-port checks; it names a logical mount table rather than requiring a DNS host. Hierarchical absolute `hdfs:/path`, `hdfs:///path` and `viewfs:///path` can omit authority and retain their slash form, using configured nameservice/default-mount semantics. GCS `gs://` authorities require 3–222 lowercase ASCII letters/digits/dots/underscores/hyphens, start/end with a letter/digit, and dot-separated components at most 63 characters; ports, escaping and other syntax mask completely. This accepts underscores rather than imposing DNS-host syntax; remove authentication userinfo and retain common query/path/signature checks. This is display-safety validation, not bucket-creation policy. HTTP/S3 host validation remains strict. [GCS naming rules](https://docs.cloud.google.com/storage/docs/buckets). | | Resolved S3 streaming audit inputs | Snapshot task-selected files; sanitize each singleton location independently, then assemble the existing escaped batch syntax. Preserve selected filenames in final success/failure/notification audit events, including tested literal commas, braces, brackets, backslashes, spaces, hashes, percent text and plus signs. Already-decoded selected keys treat `#` literally, including in query-shaped suffixes; temporary URI encoding is only for validation. Native path text is already decoded, so literal `%`, `%HH` and `+` are preserved without another decoding or URI-encoding-layer check. Native query-shaped suffixes preserve non-secret separator spelling, empty components and raw values. Whole-suffix temporary encoding is only for URI validation; names/signatures retain shared rules, while value inspection checks raw and at most three percent-decoded views (including form spaces) and masks residual encoding. Matrix/nested/list-shape path guards and unknown-name masking remain. Ordinary URL fragments still disappear. Query credentials/signatures retain their common policy. Any signed/unreliable location masks the entire batch. Apply current name rules and sanitize all other TVF properties at emission; execution inputs remain unchanged. Release temporary map/list snapshots on the worker after synchronous emission, including failure and early cancellation. This exception is internal and does not admit untrusted catalog/SQL URI-list strings. | | Azure storage locations | For `abfs`, `abfss`, `wasb`, and `wasbs` (case-insensitive), retain `container@host` after validating the raw container with the existing `AzureUri` grammar: one character for compatibility, or 3–63 lowercase ASCII letters/digits/hyphens, beginning and ending with a letter/digit. Missing, encoded, malformed or password-bearing containers mask the whole URI. Path/query checks and signed-URL masking still apply. | | URL query credentials | Decode parameter names, process duplicates and both `&`/`;` separators, and mask values whose names match permanent/configured rules or contain `password/passwd/pwd/secret/token/credential`, access/API/account/private/auth/app/application key variants, or `authorization`; exact `auth` and `key` are also protected. Ordinary URL query separators render as `&`; native selected-key suffixes retain their separators and empty components; decoded names must use ASCII letters/digits, dot, underscore, tilde, or hyphen. | | Signed URLs | A decoded query name containing `signature`, or a delimited `sig`/`sas` component, masks the entire URL, including AWS/GCS/OSS/CloudFront signatures and Azure SAS. | | Unreliable address parsing | For ordinary URL/address inputs, unknown schemes, opaque/invalid URLs, invalid host/port or escaping, unrecognized query names, matrix path parameters, repeated encoding, and nested connection strings in otherwise unclassified query values, including whitespace/form-space-prefixed JDBC, mask completely. Outside the structured streaming path above, any comma-containing URL masks completely, including ordinary query commas; decoded paths containing commas or nested `://` also mask completely. Valid plain host:port lists remain visible. No raw-value or parser-exception fallback is logged. | | All-FE configuration SQL | `ADMIN SET ALL FRONTENDS CONFIG` quotes decoded names and values according to the forwarded `sql_mode`; regex backslashes and quotes survive peer reparsing in default and `NO_BACKSLASH_ESCAPES` modes. | | Typed URI diagnostics | Iceberg/Paimon JDBC and REST URI fields, including the shared `uri` alias, use `sensitive=true, sensitiveInDiagnosticsOnly=true`: non-empty diagnostic values render as `***`, empty values as `<empty>`. They do not export URI aliases into the global secret-name registry; catalog output follows the value-aware rules above. | | Credential annotations | Access keys and every declared alias in S3, MinIO, GCS, OSS, COS, OBS, Iceberg Glue and Iceberg REST now join existing secret/token annotations; Ozone access keys and JDBC catalog URLs remain protected. These declarations mask typed diagnostics and contribute unconditional provider-sensitive names. These annotation additions do not reclassify account names, OAuth modes/scopes or credential-file paths; generic name rules can independently mask such names. | Permanent Hadoop families, matched case-insensitively: | Namespace | Credential fields | |---|---| | `fs.s3.` / `fs.s3a.` and optional `bucket.<bucket>.` | `access.key`, `secret.key`, `session.token`, `encryption.key`, `server-side-encryption.key`, `proxy.password`; dotted bucket names are supported. | | `fs.azure.` | `account.key`, `sas`, `sas.fixed.token`, `account.oauth2.client.secret`, `account.oauth2.refresh.token`, `encryption.encoded.client-provided.key`, including account/container suffixes. | | `fs.adl.oauth2.` | `credential`, `refresh.token`. | | `fs.oss.` | `accessKeyId`, `accessKeySecret`, `securityToken`. | | `fs.cosn.` with optional `userInfo.` | `secretId`, `secretKey`. | | `fs.obs.` | `access.key`, `secret.key`, `session.token`, `security.token`. | Masking uses `*XXX` in property output. Lineage continues omitting name-classified secrets and sanitizes other values. Non-empty annotated credentials render as `***` in typed diagnostics. The retained `mc.session_token` declaration does not add token authentication to the current binder. ### Testing - `run-fe-ut.sh` passes all 565 tests in 47 selected classes locally: masking/audit/lineage, configuration, metastore/filesystem holders, actual provider registration, security/metadata/plugin surfaces, dispatch, S3 offsets, ADBC paths, audit publication and config SQL roundtrips. Coverage includes URL lists, encoded/duplicate/signed URLs, 5,001-host lists, dynamic rules and unchanged connection values. FE Checkstyle passes. - Extended the P0/nonConcurrent SQL audit suite with SHOW, `catalogs()`, and persisted CREATE/ALTER assertions. It was not executed locally; the regular P0 configuration includes it, while cloud P0 skips nonConcurrent suites. | CI check | Evidence | |---|---| | Initial policy/annotation baselines | Before the policy change, 8 of 9 new tests expose credentials; the safe-endpoint control passes. Before the JDBC annotation, 2 of 18 tests fail. S3/Iceberg annotation tests reproduce 5 failures; Paimon separately reproduces 2. The multi-URL baseline exposes its later password. | | Configuration trimming | A targeted test reproduces a regex accepted before trimming that becomes invalid when stored. | | Azure container regression | Before the fix, 18 tests/2 classes reproduce 5 assertion failures: container loss in property display, token-query URLs, CREATE/ALTER audit and lineage, plus malformed authority passing through. New cases cover all four schemes, uppercase scheme, container length/character boundaries, encoded/password-bearing authority, query credentials and SAS signatures. The final expanded FE run passes all 565 tests/47 classes; the existing AzureUri parser suite is included. | | Existing FE integration tests | The previous head reproduces all 7 CI failures in 39 tests/4 classes. Provider fixtures use opaque names to prove admission independently of the generic regex. Final streaming audit assertions now require resolved batches, replacing the incomplete expectation that their URIs should be hidden. Malformed hosts and CREATE/ALTER JOB JDBC URLs remain masked. | | Location compatibility | Before this follow-up, 37 tests/3 classes reproduce 9 failures across final streaming events, local paths and lineage. A separate renderer probe reproduces literal-filename loss before its fix and passes afterward. Final tests cover one/multiple files, failed tasks, notifications, signed/embedded credentials, literal filenames, runtime rule changes, local/file URI rejection boundaries and ViewFS. | | Native locations and snapshot lifetime | Actual formatter probe reproduces three valid native locations masking; five focused methods reproduce five assertion failures in property/lineage and successful, failed and canceled task snapshot ownership. Added positive native audit/lineage cases, credential/signature/opaque/invalid-S3 controls and post-run release assertions. Final repository FE run passes 565 tests/47 classes; the same five focused methods and the actual native/literal renderer probes pass; Checkstyle passes. | | Literal hash identities | Before the fix, the actual final renderer collapses two selected hash keys to identical names. Before the fix, six focused methods execute: four expected hash/notification/credential/signature assertion failures and two existing controls pass. Tests require distinct hashes for one/multiple selected files on success/failure, notifications and query-shaped suffixes; ordinary URI fragment removal remains covered. Final FE run passes 565 tests/47 classes; Checkstyle and all original probes pass. Before its fix, a self-review probe initializes the pinned Hadoop ViewFileSystem with mount_table but observes MASK in display; named-ViewFS property/audit/lineage and malformed/encoded/port/signature controls now cover the repaired authority branch. | | Decoded native percent paths | Before the fix, the actual final renderer masks a batch containing100%.csv; four focused methods reproduce two percent failures with two existing controls passing. Tests add native percent/nonhex/%HH/repeated-looking/plus identities for one/multiple files, success/failure and notifications, with generic URI negative controls. Final repository FE run passes 565 tests/47 classes; the same percent renderer probe and four focused methods pass. Checkstyle passes. | | Independent local review | Qualified gpt-6-astra/xhigh lead and coverage reviewers approve exact head5a39cd98f66872ce9502f636d617bdae565ca5c5:59 changed files,17 checkpoints,0 findings/regressions,one-round convergence. [Commit-bound PASS receipt](#70705 (comment)). Static review is separate from the author-run tests above; cluster SQL/multi-FE RPC remain unverified. | | Native suffix spelling and inspection | Before repair, six focused methods produce four identity/credential/opaque-JDBC failures and two passing controls. Cases cover separator/empty-component identity, percent/space/plus/encoded-looking values, final success/failure/notification events, masked values with preserved non-secret syntax, and encoded/double/deep nested URLs beside malformed native percent text. A separate form-space JDBC guard fails before its repair. Final repository FE run passes 565 tests/47 classes; all seven focused identity/security/control methods and independent Checkstyle pass. | | GCP metadata | Identity roundtrips run with the supplementary pattern disabled using `(?!)`; permanent HMAC keys remain masked. A separate credential-keyword test checks that `gs.credential_provider_type` is masked, matching the default heuristic's conservative treatment of metadata names. The original pattern is restored after each test. | | Gitleaks 8.30.0 | The Gitleaks job scans the full PR commit range and misclassifies two adjacent Hadoop property-name literals as API-key values. The same scan reproduces 2 findings before the config fix and 0 after it. A generic-api-key exception requires both the exact test path and one of two exact synthetic property names. | | All-FE regex forwarding | Before the serializer fix, 2 of 9 admin-config tests fail: the peer exposes `custom.pin1`, and the regex loses its backslash. After the fix, all 9 pass; actual parser/serializer/Env application plus masking and a literal matrix cover both SQL modes and command scopes. Peer application is simulated in-process, without multi-FE RPC. | | Exception boundaries | Two fixture-name occurrences in another file and an unrelated synthetic API-key value in the allowed file remain detected; only the two intended occurrences are ignored. | ### Notes for Reviewers The new defaulted `ConnectorProperty.sensitiveInDiagnosticsOnly` metadata prevents shared URI aliases from hiding every REST endpoint. Connector/metastore SPI signatures and baselines are unchanged. Free-text secrets, SDK containers and unrelated logging remain outside scope. ### Release note External data source displays and audit property output now mask JDBC connection strings, native SDK/Hadoop credentials, credential-like custom properties, and URL authentication components. The new FE configuration `datasource_sensitive_property_pattern` adjusts extra name matching without disabling permanent credential rules. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes (document the FE config and catalog-output rules in apache/doris-website; detailed rules are included above). - Pre-submission status: Partially verified: SQL regression and multi-FE RPC not executed locally. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Production changes, tests, and this description. - Human review: not stated. - Prompts: Mask MaxCompute/Ozone credentials, extend shared JDBC/URL/SDK/Hadoop/custom-name rules, then complete sensitive annotations and address review findings.
…70725) ### Background Lance catalogs expose a namespace as Doris databases and tables. The FE reads dataset manifests through the Lance Java SDK and passes the pinned version and storage options to the BE's lance-c reader. Master now serves filesystem namespaces through the Lance connector plugin; released 4.1/4.2 versions also serve REST namespaces and OSS storage. ### What problem does this PR solve? Issue Number: #70680 Related PR: #70681 (filesystem plugin foundation), #66581 (REST namespace source), #66805 (vended storage options source), #67157 (OSS source), #70338 (property masking), #70364 (endpoint checks with default ports) PR Type: Feature Problem Summary: This ports REST namespaces, namespace-vended credentials and OSS support from branch-4.x to the master Lance plugin. Users can read tables through a namespace service without configuring static dataset credentials in Doris. The change also validates REST authentication and headers, declares the new endpoint and secrets, and adds the REST fixture and behavior tests. Filesystem catalogs keep their existing defaults and checks. Original authors: @zhangstar333 and @FANNG1. ### Details - **Change map:** Production code +585/-76 lines; tests and fixtures +2011/-48; generated regression output +20; pipeline configuration +3. Most changed lines are tests or fixture infrastructure. | Part | Purpose | Approximate changed production lines | | --- | --- | --- | | REST namespace access | Validate properties, select the namespace client, request table credentials, and sanitize errors | 330 | | OSS storage | Adapt OSS properties, refuse OSS-HDFS and unresolved AssumeRole, canonicalize options, and isolate explicit identities | 206 | | S3 option reconciliation | Validate merged credentials, reset a missing replacement token, and reconcile endpoint addressing using native boolean semantics | 125 | - **Scope:** REST authentication supports `none`, `bearer` and `api_key`, plus extra headers; ALTER can switch modes by clearing the inactive credential with `""`; namespace-vended options override catalog options for FE metadata and BE scans. OSS uses Lance's OpenDAL provider. Declared-only and namespace-managed-version tables fail explicitly; their version protocol belongs to a later phase. - **Design:** Reuse the namespace and storage-provider contracts from 4.1/4.2 inside the existing plugin, without adding Lance branches to the engine. The four-phase plan is tracked in #70680. Reading storage-latest for managed tables was rejected because the namespace may not have published that version; this phase refuses them instead. Credential validation follows the catalog/vended merge so an endpoint-only catalog can receive valid credentials. Reconcile inherited S3 endpoints with the final addressing mode using object_store's boolean vocabulary; a namespace value such as `on` must qualify the bucket just like `true`. - **Usage:** With the external regression namespace fixture: ```sql CREATE CATALOG lance_rest PROPERTIES ( "type" = "lance", "lance.catalog.type" = "rest", "lance.rest.uri" = "http://127.0.0.1:19102", "lance.rest.security.type" = "bearer", "lance.rest.bearer-token" = "doris-lance-rest-test-token", "s3.endpoint" = "http://127.0.0.1:19001", "s3.region" = "us-east-1", "use_path_style" = "true" ); SELECT count(*), sum(row_id) FROM lance_rest.`default`.all_types; ``` The committed fixture returns `12, 78` without a static access key or secret key in the catalog. - **Default behavior:** `lance.catalog.type` remains `filesystem`; REST authentication defaults to `none`. REST requires `lance.rest.uri` and rejects `warehouse`. No new FE configuration or session variable is introduced. - **Compatibility:** Preserve the 4.1/4.2 property names and raw catalog map. Catalog reconstruction and replay perform no native connection; first use opens the namespace. No shared SPI, Thrift, Protobuf or storage-format change; the plugin API stays at master's 34.0. Reads retain the foundation's FE/BE compatibility checks. A downgrade needs a version that already supports the chosen Lance namespace and storage provider. - **Security and privileges:** `lance.rest.uri` is a user-controlled outbound HTTP/SSRF surface. Catalog creation requires scoped `CREATE_PRIV`, endpoint changes require `ALTER_PRIV`, and reads require `SELECT_PRIV`. Declare REST alongside all existing S3-compatible endpoint aliases so the configured engine gate covers CREATE and ALTER. Mask bearer/API-key values and credential-bearing extra headers; strip them from provider errors. Existing engine audit handling is reused. - **Follow-up plan:** Predicate/LIMIT/COUNT pushdown and caches remain later phases of #70680; namespace-managed versioning remains a separate follow-up. ### Testing - With the review fixes, `run-fe-ut.sh --run 'org.apache.doris.connector.lance.*Test'` passed all 149 Lance tests locally on macOS aarch64/JDK 17.0.19, with zero failures, errors or skips. This includes pass-through credential redaction, merged OSS credential-pair validation, REST authentication/header checks and actual JNI REST/S3/OSS tests. - On unchanged production at `5471c9ebe0e`, the three new tests failed on the intended assertions: an echoed vended token remained visible and incomplete OSS identities were accepted. Zero errors or skips. The fixed cases also cover case variants, catalog-completed pairs and clearing just one credential. - At `ccbffd65cd3`, four control-byte tests ran through `run-fe-ut.sh`: both rejection tests failed on missing exceptions; both legal-value controls passed. Zero errors or skips. They cover CREATE/merged ALTER, leading/interior/trailing controls, extra headers and both credentials. - At `1365c0a4849`, 77 engine tests for catalog privileges, endpoint gating, plugin registration and 4.1.5 replay passed; thirteen SPI tests passed. Those engine and SPI paths have no later production changes in this PR. - At `1365c0a4849`, `test_lance_catalog_all_types` and `test_lance_rest_catalog` passed on freshly built FE/ASAN BE using the committed dataset and a local S3 substitute that validated SigV4. The runner generated the REST output, whose shared blocks matched branch-4.2; scoped CREATE/ALTER/SELECT privileges and SHOW CREATE masking were verified there. - The SQL regression now covers all six authentication transitions, conflicting header-name case variants, and SQL control escapes in extra headers and both credentials. These later SQL additions have not been run against a local cluster; expected-output files are unchanged. The External pipeline enables this suite and its fixture. ### Notes for Reviewers - Mask runtime credentials including Azure/GCS aliases; validate OSS pairs after merging and before authentication inference. - The SSRF gate checks literal CREATE/ALTER endpoint properties at statement time. Namespace-returned destinations remain trusted external metadata under `threat-model.md`; this port adds no runtime FE/BE egress policy. Both credential-handling defects also exist in the inspected 4.1/4.2 implementations and need separate adaptation. - Reject C0 controls except HTAB, and DEL, in headers and both credentials before Lance silently omits the header, potentially selecting a server default. Preserve valid values. The CR/LF-only 4.1/4.2 validators need separate adaptation. - Case-equivalent custom header names must agree; validation emits one lowercase SDK header while preserving raw catalog properties. ALTER can update the original spelling or all retained aliases together. - An empty inactive REST credential clears its value during ALTER; whitespace-only inactive credentials remain invalid. - Keep the filesystem AssumeRole rejection and all endpoint aliases added during the foundation review. Only the obsolete REST-rejection regression assertion is removed. - A complete vended S3 pair without a token clears the inherited catalog/environment token; an explicitly vended token is preserved. The 4.x maintainers need the same fix. - S3 reconciliation accepts the pinned object_store true/false spellings and case variants, preserves namespace option values, and rejects invalid booleans. OSS keeps its separate native grammar. - Docker cannot read cached image blobs here. Full MinIO/Compose, remote OSS and Linux runs are unverified; the External pipeline enables the fixture. Co-authored-by: zhangstar333 <zhangsida@selectdb.com> Co-authored-by: FANNG <fanng@apache.org>
…pache#70705) External catalogs retain connector properties. Provider declarations feed the masking registry used by display, metadata and audit SQL. Issue Number: None Related PR: apache#70338 (provider-owned masking and ALTER CATALOG audit coverage), apache#70696 (overlapping metastore URI annotation fix), apache#55016 (all-FE configuration forwarding), apache#67489 (resolved streaming audit inputs) PR Type: Bugfix Problem Summary: Name-only matching exposes JDBC/URL and SDK/Hadoop credentials. Apply shared value-aware masking and a supplementary FE-local name regex, completing diagnostic annotations. An exercised `uri` value: | Before | After | |---|---| | `https://fixture:fixture-password@api.example.com/v1?region=east&token=fixture-token` | `https://api.example.com/v1?region=east&token=*XXX` | - **Change map:** Production: +514/-44 across 28 files; tests: +1237/-76 across 30; CI: +9/-0 in one. No generated/docs/submodule changes. Production covers shared masking, provider annotations, configuration forwarding and structured streaming audit rendering. - **Frequency:** Always when a retained credential uses one of the uncovered names or connection formats; reproduced in property display and CREATE/ALTER audit rewriting. - **Root cause:** `DatasourcePrintableMap` checked names without inspecting values; credential declarations were incomplete. Generic URI parsing also hid local files, ViewFS and resolved streaming batches; configuration forwarding lost SQL escapes. - **Why existing tests missed it:** Property tests missed format-specific locations; streaming assertions had accepted hidden final URIs. SQL audit tests missed these formats; existing ADBC metadata tests already require visible local paths. Admin tests missed string escaping. - **Fix:** Share catalog/audit/lineage masking, complete credential annotations and distinguish diagnostic URIs; preserve supported locations and independently sanitize selected streaming files at final audit emission; quote forwarded configuration strings correctly. - **Other paths and branches:** Shared output callers inherit the rules. Cached branch-3.1/4.0/4.1/4.2 retain the parsing gap; only master changes. No single introducing PR was identified. - **Configs and defaults:** `datasource_sensitive_property_pattern` is FE-local, mutable and case-insensitive, defaulting to `password|passwd|secret|token|credential|access[._-]?key|api[._-]?key`. Startup/custom-file/runtime validation rejects invalid stored expressions without replacing the previous value. `(?!)` disables only the supplement; empty matches every name. Configure all serving FEs consistently. - **Behavior change:** Stored properties and connections are unchanged. Display is more conservative: keyword matches can hide metadata, and URLs can lose userinfo/fragments or normalize query separators. The complete masking rules are: | Input | Output rule | |---|---| | Existing exact sensitive keys and provider prefixes | Remain masked, independently of the configurable pattern. Existing hidden-property rules still omit their entries. | | Recognizable JDBC property names | Names ending in a JDBC `url`/`uri` component, including `jdbc_url`, `jdbc.jdbc_url`, `iceberg.jdbc.uri`, and `paimon.jdbc.uri`, mask completely. `connectionString`, `connection_string`, `connection-string`, and `connection.string` suffixes also mask completely. | | JDBC values under any name | Any trimmed value beginning with `jdbc:`, case-insensitively, masks completely, including a bare `uri` alias and opaque/driver-specific JDBC syntax. | | Native SDK credentials | Bare or dot/underscore/hyphen-delimited final components `token`, `credential`, or `credentials` mask completely. Registered aliases and the configurable pattern add coverage. | | Hadoop credentials | The built-in families below mask completely, including dynamic bucket/account names and names prefixed before `fs.`; they do not depend on the configurable pattern. Other credential-like names receive the default pattern's protection. | | Custom names | A match against the configured regex masks the entire value. Matching is a search, so the default protects `custom.password`, `clientSecret`, and `custom.accessKey`. It is unioned with every permanent rule. | | Ordinary addresses | Hostnames, IPv4, bracketed IPv6, optional numeric ports in 0–65535, and comma-separated host lists remain visible. Empty address values stay empty. | | URL selection | Sanitize properties ending in a delimited `uri/url/host/endpoint/address` component, including plural forms, and hierarchical `scheme://` or `file:/`, `hdfs:/`, `viewfs:/` values under other names. A name already classified sensitive takes precedence and masks completely. | | Supported URL schemes | `http`, `https`, `thrift`, `hdfs`, `viewfs`, `file`, `s3`, `s3a`, `s3n`, `oss`, `cos`, `cosn`, `obs`, `gs`, `abfs`, `abfss`, `wasb`, `wasbs`. Preserve the host, port, ordinary path, and non-sensitive query parameters; remove authentication userinfo (Azure exception below) and the entire fragment. | | Local driver paths and file URIs | Recognized `driver_url` suffixes retain absolute POSIX paths, including spaces/Unicode; protocol-relative, control, query, fragment, userinfo, matrix or nested-URL syntax masks completely. Hierarchical `file:/absolute/path` and `file:///absolute/path` retain their spelling, require no authority, and use the common query/signature/fragment rules. Name/JDBC masking takes precedence. | | Native filesystem locations | `viewfs://mount-name/path` accepts validated ordinary-address authority syntax, including ASCII underscore mount names, with numeric-port checks; it names a logical mount table rather than requiring a DNS host. Hierarchical absolute `hdfs:/path`, `hdfs:///path` and `viewfs:///path` can omit authority and retain their slash form, using configured nameservice/default-mount semantics. GCS `gs://` authorities require 3–222 lowercase ASCII letters/digits/dots/underscores/hyphens, start/end with a letter/digit, and dot-separated components at most 63 characters; ports, escaping and other syntax mask completely. This accepts underscores rather than imposing DNS-host syntax; remove authentication userinfo and retain common query/path/signature checks. This is display-safety validation, not bucket-creation policy. HTTP/S3 host validation remains strict. [GCS naming rules](https://docs.cloud.google.com/storage/docs/buckets). | | Resolved S3 streaming audit inputs | Snapshot task-selected files; sanitize each singleton location independently, then assemble the existing escaped batch syntax. Preserve selected filenames in final success/failure/notification audit events, including tested literal commas, braces, brackets, backslashes, spaces, hashes, percent text and plus signs. Already-decoded selected keys treat `#` literally, including in query-shaped suffixes; temporary URI encoding is only for validation. Native path text is already decoded, so literal `%`, `%HH` and `+` are preserved without another decoding or URI-encoding-layer check. Native query-shaped suffixes preserve non-secret separator spelling, empty components and raw values. Whole-suffix temporary encoding is only for URI validation; names/signatures retain shared rules, while value inspection checks raw and at most three percent-decoded views (including form spaces) and masks residual encoding. Matrix/nested/list-shape path guards and unknown-name masking remain. Ordinary URL fragments still disappear. Query credentials/signatures retain their common policy. Any signed/unreliable location masks the entire batch. Apply current name rules and sanitize all other TVF properties at emission; execution inputs remain unchanged. Release temporary map/list snapshots on the worker after synchronous emission, including failure and early cancellation. This exception is internal and does not admit untrusted catalog/SQL URI-list strings. | | Azure storage locations | For `abfs`, `abfss`, `wasb`, and `wasbs` (case-insensitive), retain `container@host` after validating the raw container with the existing `AzureUri` grammar: one character for compatibility, or 3–63 lowercase ASCII letters/digits/hyphens, beginning and ending with a letter/digit. Missing, encoded, malformed or password-bearing containers mask the whole URI. Path/query checks and signed-URL masking still apply. | | URL query credentials | Decode parameter names, process duplicates and both `&`/`;` separators, and mask values whose names match permanent/configured rules or contain `password/passwd/pwd/secret/token/credential`, access/API/account/private/auth/app/application key variants, or `authorization`; exact `auth` and `key` are also protected. Ordinary URL query separators render as `&`; native selected-key suffixes retain their separators and empty components; decoded names must use ASCII letters/digits, dot, underscore, tilde, or hyphen. | | Signed URLs | A decoded query name containing `signature`, or a delimited `sig`/`sas` component, masks the entire URL, including AWS/GCS/OSS/CloudFront signatures and Azure SAS. | | Unreliable address parsing | For ordinary URL/address inputs, unknown schemes, opaque/invalid URLs, invalid host/port or escaping, unrecognized query names, matrix path parameters, repeated encoding, and nested connection strings in otherwise unclassified query values, including whitespace/form-space-prefixed JDBC, mask completely. Outside the structured streaming path above, any comma-containing URL masks completely, including ordinary query commas; decoded paths containing commas or nested `://` also mask completely. Valid plain host:port lists remain visible. No raw-value or parser-exception fallback is logged. | | All-FE configuration SQL | `ADMIN SET ALL FRONTENDS CONFIG` quotes decoded names and values according to the forwarded `sql_mode`; regex backslashes and quotes survive peer reparsing in default and `NO_BACKSLASH_ESCAPES` modes. | | Typed URI diagnostics | Iceberg/Paimon JDBC and REST URI fields, including the shared `uri` alias, use `sensitive=true, sensitiveInDiagnosticsOnly=true`: non-empty diagnostic values render as `***`, empty values as `<empty>`. They do not export URI aliases into the global secret-name registry; catalog output follows the value-aware rules above. | | Credential annotations | Access keys and every declared alias in S3, MinIO, GCS, OSS, COS, OBS, Iceberg Glue and Iceberg REST now join existing secret/token annotations; Ozone access keys and JDBC catalog URLs remain protected. These declarations mask typed diagnostics and contribute unconditional provider-sensitive names. These annotation additions do not reclassify account names, OAuth modes/scopes or credential-file paths; generic name rules can independently mask such names. | Permanent Hadoop families, matched case-insensitively: | Namespace | Credential fields | |---|---| | `fs.s3.` / `fs.s3a.` and optional `bucket.<bucket>.` | `access.key`, `secret.key`, `session.token`, `encryption.key`, `server-side-encryption.key`, `proxy.password`; dotted bucket names are supported. | | `fs.azure.` | `account.key`, `sas`, `sas.fixed.token`, `account.oauth2.client.secret`, `account.oauth2.refresh.token`, `encryption.encoded.client-provided.key`, including account/container suffixes. | | `fs.adl.oauth2.` | `credential`, `refresh.token`. | | `fs.oss.` | `accessKeyId`, `accessKeySecret`, `securityToken`. | | `fs.cosn.` with optional `userInfo.` | `secretId`, `secretKey`. | | `fs.obs.` | `access.key`, `secret.key`, `session.token`, `security.token`. | Masking uses `*XXX` in property output. Lineage continues omitting name-classified secrets and sanitizes other values. Non-empty annotated credentials render as `***` in typed diagnostics. The retained `mc.session_token` declaration does not add token authentication to the current binder. - `run-fe-ut.sh` passes all 565 tests in 47 selected classes locally: masking/audit/lineage, configuration, metastore/filesystem holders, actual provider registration, security/metadata/plugin surfaces, dispatch, S3 offsets, ADBC paths, audit publication and config SQL roundtrips. Coverage includes URL lists, encoded/duplicate/signed URLs, 5,001-host lists, dynamic rules and unchanged connection values. FE Checkstyle passes. - Extended the P0/nonConcurrent SQL audit suite with SHOW, `catalogs()`, and persisted CREATE/ALTER assertions. It was not executed locally; the regular P0 configuration includes it, while cloud P0 skips nonConcurrent suites. | CI check | Evidence | |---|---| | Initial policy/annotation baselines | Before the policy change, 8 of 9 new tests expose credentials; the safe-endpoint control passes. Before the JDBC annotation, 2 of 18 tests fail. S3/Iceberg annotation tests reproduce 5 failures; Paimon separately reproduces 2. The multi-URL baseline exposes its later password. | | Configuration trimming | A targeted test reproduces a regex accepted before trimming that becomes invalid when stored. | | Azure container regression | Before the fix, 18 tests/2 classes reproduce 5 assertion failures: container loss in property display, token-query URLs, CREATE/ALTER audit and lineage, plus malformed authority passing through. New cases cover all four schemes, uppercase scheme, container length/character boundaries, encoded/password-bearing authority, query credentials and SAS signatures. The final expanded FE run passes all 565 tests/47 classes; the existing AzureUri parser suite is included. | | Existing FE integration tests | The previous head reproduces all 7 CI failures in 39 tests/4 classes. Provider fixtures use opaque names to prove admission independently of the generic regex. Final streaming audit assertions now require resolved batches, replacing the incomplete expectation that their URIs should be hidden. Malformed hosts and CREATE/ALTER JOB JDBC URLs remain masked. | | Location compatibility | Before this follow-up, 37 tests/3 classes reproduce 9 failures across final streaming events, local paths and lineage. A separate renderer probe reproduces literal-filename loss before its fix and passes afterward. Final tests cover one/multiple files, failed tasks, notifications, signed/embedded credentials, literal filenames, runtime rule changes, local/file URI rejection boundaries and ViewFS. | | Native locations and snapshot lifetime | Actual formatter probe reproduces three valid native locations masking; five focused methods reproduce five assertion failures in property/lineage and successful, failed and canceled task snapshot ownership. Added positive native audit/lineage cases, credential/signature/opaque/invalid-S3 controls and post-run release assertions. Final repository FE run passes 565 tests/47 classes; the same five focused methods and the actual native/literal renderer probes pass; Checkstyle passes. | | Literal hash identities | Before the fix, the actual final renderer collapses two selected hash keys to identical names. Before the fix, six focused methods execute: four expected hash/notification/credential/signature assertion failures and two existing controls pass. Tests require distinct hashes for one/multiple selected files on success/failure, notifications and query-shaped suffixes; ordinary URI fragment removal remains covered. Final FE run passes 565 tests/47 classes; Checkstyle and all original probes pass. Before its fix, a self-review probe initializes the pinned Hadoop ViewFileSystem with mount_table but observes MASK in display; named-ViewFS property/audit/lineage and malformed/encoded/port/signature controls now cover the repaired authority branch. | | Decoded native percent paths | Before the fix, the actual final renderer masks a batch containing100%.csv; four focused methods reproduce two percent failures with two existing controls passing. Tests add native percent/nonhex/%HH/repeated-looking/plus identities for one/multiple files, success/failure and notifications, with generic URI negative controls. Final repository FE run passes 565 tests/47 classes; the same percent renderer probe and four focused methods pass. Checkstyle passes. | | Independent local review | Qualified gpt-6-astra/xhigh lead and coverage reviewers approve exact head5a39cd98f66872ce9502f636d617bdae565ca5c5:59 changed files,17 checkpoints,0 findings/regressions,one-round convergence. [Commit-bound PASS receipt](apache#70705 (comment)). Static review is separate from the author-run tests above; cluster SQL/multi-FE RPC remain unverified. | | Native suffix spelling and inspection | Before repair, six focused methods produce four identity/credential/opaque-JDBC failures and two passing controls. Cases cover separator/empty-component identity, percent/space/plus/encoded-looking values, final success/failure/notification events, masked values with preserved non-secret syntax, and encoded/double/deep nested URLs beside malformed native percent text. A separate form-space JDBC guard fails before its repair. Final repository FE run passes 565 tests/47 classes; all seven focused identity/security/control methods and independent Checkstyle pass. | | GCP metadata | Identity roundtrips run with the supplementary pattern disabled using `(?!)`; permanent HMAC keys remain masked. A separate credential-keyword test checks that `gs.credential_provider_type` is masked, matching the default heuristic's conservative treatment of metadata names. The original pattern is restored after each test. | | Gitleaks 8.30.0 | The Gitleaks job scans the full PR commit range and misclassifies two adjacent Hadoop property-name literals as API-key values. The same scan reproduces 2 findings before the config fix and 0 after it. A generic-api-key exception requires both the exact test path and one of two exact synthetic property names. | | All-FE regex forwarding | Before the serializer fix, 2 of 9 admin-config tests fail: the peer exposes `custom.pin1`, and the regex loses its backslash. After the fix, all 9 pass; actual parser/serializer/Env application plus masking and a literal matrix cover both SQL modes and command scopes. Peer application is simulated in-process, without multi-FE RPC. | | Exception boundaries | Two fixture-name occurrences in another file and an unrelated synthetic API-key value in the allowed file remain detected; only the two intended occurrences are ignored. | The new defaulted `ConnectorProperty.sensitiveInDiagnosticsOnly` metadata prevents shared URI aliases from hiding every REST endpoint. Connector/metastore SPI signatures and baselines are unchanged. Free-text secrets, SDK containers and unrelated logging remain outside scope. External data source displays and audit property output now mask JDBC connection strings, native SDK/Hadoop credentials, credential-like custom properties, and URL authentication components. The new FE configuration `datasource_sensitive_property_pattern` adjusts extra name matching without disabling permanent credential rules. - Behavior changed: Yes (see Details). - Does this need documentation: Yes (document the FE config and catalog-output rules in apache/doris-website; detailed rules are included above). - Pre-submission status: Partially verified: SQL regression and multi-FE RPC not executed locally. - Tool: Codex (GPT-6). - Generated: Production changes, tests, and this description. - Human review: not stated. - Prompts: Mask MaxCompute/Ozone credentials, extend shared JDBC/URL/SDK/Hadoop/custom-name rules, then complete sensitive annotations and address review findings.
Background
SHOW CREATE CATALOG, SHOW CATALOG, the
catalogs()table function and the audit text of CREATE CATALOG replace a property value with*XXXwhenDatasourcePrintableMap.isSensitiveKeymatches its key. Until now the keys came from a list in fe-core and from the keys filesystem plugins report at startup. A connector plugin marks its secret propertiessensitive = true, but that mark only masks the connector's own log lines. A connector tells the engine about its security-relevant properties throughConnectorProvider#securitySurface().What problem does this PR solve?
Issue Number: None
Related PR: #69588 (added the connector security surface this extends), #45164 (introduced the unmasked ALTER CATALOG audit text), #27115 (masked it for the statement #45164 replaced), #59502 (added
iceberg.jdbc.password), #54523 (added the Paimon REST DLF keys), #65730 (branch-4.1's Lance catalog, whose REST secrets the Lance port will declare on this surface), #70366 (fixed the shared Unicode SQL rewrite used by this PR's ALTER masking), #70327 (added MongoDB credentials to the engine masking floor)PR Type: Bugfix
Problem Summary:
Catalog secrets that only a connector knows are on no masking list, so SHOW CREATE CATALOG and the other renderings print them in clear:
iceberg.jdbc.password,paimon.jdbc.password, the Paimon REST DLF key pair,mc.access_key, and credentials passed through undertrino.oradbc.. Separately,ALTER CATALOG ... SET PROPERTIESis written to the audit log unmasked, whatever the key. Each connector now declares its secrets on its security surface, taken from itssensitivemarks, and the surface can also declare a namespace of secret keys for options passed through unread; Fluss's lake options were hard-coded in fe-core for that reason. The engine masks the union, with fe-core's own list kept as the floor. ALTER CATALOG is masked like CREATE CATALOG.Details
fe/fe-connector/pom.xml(31.0 to 32.0). The first commit adds secret keys to the surface (reviewed alone before). The second does the rest, the third keeps a surface that fails in the connector's ownServiceLoaderfrom stopping FE, and the fourth aligns the newly added MongoDB provider and tests ALTER masking with supplementary characters:withSensitiveKeyPrefixandSensitiveKeyPrefix.covers, which holds the matching rule; a collection form ofwithSensitiveKeys(ConnectorSecuritySurface).isSensitiveKeymatches registered namespaces, the Fluss rule becomes one of them;ConnectorPluginManagerregisters them and reads every surface before it publishes a provider, skipping a provider whose surface throws.MetaStoreProviders.sensitivePropertyKeys()gives the union of a plugin's metastore backends;IcebergJdbcMetaStoreProviderreports its keys like its siblings; the keytab paths lose theirsensitivemark. MongoDB also declares its two annotated secrets, preserving its SSRF endpoint and the engine fallback.<name>orselect * from catalogs(), or read the audit log after an ALTER CATALOG ... SET PROPERTIES.isSensitiveKeyconsulted only fe-core's list and the filesystem providers' keys. A connector'ssensitivemarks fed onlytoMaskedString;MetaStoreProvider.sensitivePropertyKeys()existed for this, but nothing called it, and the Iceberg JDBC backend did not implement it. For ALTER CATALOG,AlterCatalogPropertiesCommanddoes not implementNeedAuditEncryptionandLogicalPlanBuilderForEncryptionhas novisitAlterCatalogProperties, soAuditLogHelperrecords the original text; the statement it replaced in [Enhancement] (nereids)implement alterCatalogPropertiesCommand in ner… #45164 was masked by [enhancement](audit) hide password and other sensitive information in log and audit log #27115.DatasourcePrintableMapTestchecks fe-core's own keys, the provider surface tests checked only the SSRF and driver_url keys, andEncryptSQLTestandRepositoryAuditEncryptionTestcover CREATE CATALOG, repositories and resources but not ALTER CATALOG. Regression:audit/test_external_catalog_credential_maskingcreates only Iceberg REST catalogs, whose keys are on fe-core's list, and never alters one.sensitivemarks that mask their logs; jdbc and es declare both spellings their legacy prefix allows, and trino and adbc declare the namespace they pass through, a key there being a secret when its rest nameskey,secret,password,tokenorcredential(alsoauthorizationfor ADBC). fe-core keeps the connector keys it lists, so a catalog whose plugin is not loaded masks what it masked before. A provider whosesecuritySurface()throws at startup is skipped, as a filesystem provider is, instead of stopping FE; that includes theServiceConfigurationErroraServiceLoaderthrows when a descriptor names a backend it cannot load, which is how the Hive, Iceberg and Paimon surfaces fail, since they read their metastore backends' keys through one.isSensitiveKeyandNeedAuditEncryption. Not covered, since a key name cannot express them safely: raw Iceberg SDK keys copied through (token,credential), Paimon options re-keyed frompaimon.*, Hadoopfs.*keys, and secrets inside otherwise unmarked URLs. The ALTER CATALOG gap is on branch-4.0, 4.1 and 4.2 (from [Enhancement] (nereids)implement alterCatalogPropertiesCommand in ner… #45164); branch-3.1 still uses the masked statement. branch-4.1 and 4.2 also print the connector keys above in clear; without the connector SPI their fix differs and is tracked separately.trino.hive.s3.aws-access-keyor a keystore path. Keytab paths, which no release masks, are no longer masked in connector log lines: markedsensitive,hadoop.kerberos.keytabwould be masked in every storage vault and resource.Testing
The original local runs (macOS) used master
f5c993f2c94plus this change:audit/test_external_catalog_credential_masking, extended with an Iceberg JDBC catalog: SHOW CREATE CATALOG masksiceberg.jdbc.password, and the audit texts of its CREATE CATALOG and of an ALTER CATALOG that sets the password ands3.secret_keyhold only*XXX. Against the local cluster's FE without this change it fails at the first new check, SHOW CREATE CATALOG printing the password; with a FE built from this change it passes.ConnectorPluginManagerTest,DatasourcePrintableMapTest,EncryptSQLTestand the audit and plugin gate tests; 14 of them again after the last change to registration, and 7 classes, 76 tests, after the third commit. Its two newConnectorPluginManagerTestcases, a plugin directory whoselib/holds a jar with a service descriptor naming a missing metastore-style backend (the plugin next to it must still load) and the same descriptor on the classpath, fail without the third commit with thatServiceConfigurationErrorescapingloadPluginsandloadBuiltins, and pass with it.EncryptSQLTestsees the statement in clear), matching a marker anywhere in the key, an empty metastore union, re-marking a keytab, or droppingServiceConfigurationErrorfrom either startup catch (each fails only its own new case).Rebased onto master
93c16ee2ca1on 2026-11-16. Post-rebase local verification:bash run-fe-ut.sh --run 'org.apache.doris.connector.spi.*Test,ConnectorPluginManagerTest,DatasourcePrintableMapTest,EncryptSQLTest', withCUSTOM_MVNappending-Dcheckstyle.skip=false: BUILD SUCCESS across all 90 reactor modules; all 141 selected tests passed across 22 classes, including the inherited supplementary-character audit cases. Checkstyle reported no violations.git diff --check upstream-apache/master...HEAD: passed.git range-diffconfirms the replayed patches are unchanged apart from adapting the connector API version and its test to 32.0.run buildallis requested in CI.Follow-up local verification on the rebased branch plus the MongoDB declaration and audit tests (2026-11-16):
run-fe-ut.sh --run 'org.apache.doris.connector.spi.*Test,org.apache.doris.connector.mongodb.*Test,ConnectorPluginManagerTest,DatasourcePrintableMapTest,EncryptSQLTest', with Checkstyle enabled: all 176 selected tests in 28 classes passed (SPI 93, MongoDB 35, fe-core 48), with no skipped tests; the 90-module reactor completed successfully.MongoProviderTestfails without the provider declaration (expected the two MongoDB secret keys, received an empty set), and passes with it. A separate targeted revert confirms the assertion catches the missing declaration.EncryptSQLTest#testEncryptionpasses on the candidate and fails at the new ALTER assertion when onlyBaseViewInfo.rewriteSqlis restored to its pre-[fix](nereids) Fix SQL masking and view rewrites after supplementary characters #70366 implementation: the audit text has an extra trailing fragment.Notes for Reviewers
SensitiveKeyPrefix.coverslives on the SPI so that a connector's test can check its declaration against real key names and the engine applies the same rule; the Fluss floor in fe-core uses it too.DatasourcePrintableMapsays. MongoDB was already masked by [feature](mongodb) Add native catalog, reader and BSON SerDe #70327; its added declaration makes the provider follow the same contract as the other connectors.Release note
SHOW CREATE CATALOG, SHOW CATALOG, the
catalogs()table function and the audit log now maskiceberg.jdbc.password,paimon.jdbc.password,paimon.rest.dlf.access-key-id,paimon.rest.dlf.access-key-secret,mc.access_key, and thetrino.*andadbc.*properties whose names carrykey,secret,password,tokenorcredential(authorizationtoo foradbc.*). ALTER CATALOG ... SET PROPERTIES statements are masked in the audit log like CREATE CATALOG. Third-party connector plugins built against API 31.x must be rebuilt for 32.0.Check List (For Author)
AI Disclosure