Repository navigation
Conversation
### Background Catalog display commands render stored connection properties through a shared sensitive-key set. ### What problem does this PR solve? Issue Number: None Related PR: apache#61094 (introduced Paimon JDBC support) PR Type: Bugfix Problem Summary: Catalog readers can see unmasked metastore credentials and credential-bearing connection strings when stored properties use aliases missing from the shared masking set. Register the omitted password, DLF and JDBC/REST URI keys so all catalog display paths mask them without changing connection properties. ### Details - **Frequency:** Always when omitted properties are stored and displayed. - **Root cause:** Sensitive metastore aliases are absent from display masking. - **Why existing tests missed it:** They cover generic passwords and existing storage/OAuth keys, without metastore aliases or SELECT-only display access. - **Fix:** Extend the existing case-insensitive display set. Mask complete URIs, including endpoints without embedded credentials. - **Other paths and branches:** SHOW CREATE CATALOG, SHOW CATALOG and catalogs() share this behavior. Release branches require separate adaptation to their legacy PrintableMap implementation and have not been tested here. - **Behavior change:** The listed connection URI properties display as *XXX. ### Testing Three regression tests fail on the baseline and pass with the fix. All 26 selected FE tests pass with zero failures, errors or skips, including four catalog property fixtures under real SELECT-only and denied privilege checks. Checkstyle and git diff --check pass. Verification uses embedded FE command and metadata paths, without a live external metastore or full FE/BE cluster. ### Release note Mask metastore JDBC passwords, Paimon DLF credentials and JDBC/REST connection URIs in catalog displays. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex - Generated: Code, tests and this message - Human review: Pending
新增四类真实 Catalog 的 SQL 回归,用假凭证检查 SHOW CREATE CATALOG、 SHOW CATALOG 和 catalogs() 的脱敏,并核对仅 SELECT 授权及无授权行为。 验证:隔离 1 FE + 3 BE,P0 定向 test_catalog_credential_masking 通过。
### Background Catalog 保存原始 metastore 属性,三个展示入口共用敏感键集合。插件属性上的 sensitive 声明此前只供日志使用,未接入展示层。 ### What problem does this PR solve? Issue Number: None Related PR: apache#61094 (Paimon JDBC credential aliases) PR Type: Bugfix Problem Summary: 仅有 Catalog SELECT 权限的用户可能读取未列入静态集合的敏感属性。通过公共插件契约在启动时注册 metastore 的全部敏感别名,并补齐 Iceberg JDBC 的密码导出。两个 HMS keytab 路径随声明自动参与脱敏。 ### Details - **Change map:** 生产代码增加 71 行、删除 7 行;测试增加 381 行、删除 39 行;接口记录增加 1 行;开发文档改动 7 行,API 版本配置改动 2 行。主要改动用于验证自动发现、插件注册、权限和重放。 - **Frequency:** Always;已保存的敏感键仅由 metastore provider 导出、未进入展示集合时发生。 - **Root cause:** ConnectorPluginManager 没有接收 metastore 的敏感键;Iceberg JDBC provider 继承默认空导出。 - **Why existing tests missed it:** 展示类测试和此前的四类 SQL 回归只覆盖已列出的静态键,没有新敏感别名或 HMS keytab 路径。注册器测试没有覆盖敏感键传递。 - **Fix:** MetaStoreProviders 汇总当前插件类加载器发现的后端别名;Hive、Hudi、Iceberg、Paimon provider 通过公共 SPI 导出。FE 在发布 provider 前注册敏感键,展示时复用已有集合。导出失败的目录插件被拒绝,且不占用类型名。 - **Other paths and branches:** 同时覆盖 SHOW CREATE CATALOG、SHOW CATALOG 和 catalogs()。本次目标为 master;发布分支的旧展示及插件架构未执行回补验证。 - **Behavior change:** provider 声明的敏感属性及别名在三个展示入口统一掩码,包括两个 HMS keytab 路径。权限判断、属性原值和普通选项保持原样。 - **Compatibility:** Connector 插件 API 从 31.0 升为 32.0,插件需按新版本重新构建。元数据存储格式不变;注册只读取属性声明,不绑定 Catalog 或访问外部服务。 ### Testing - 未修复代码上的两个新增测试分别因敏感键未掩码、Iceberg JDBC 导出为空而失败;均为目标断言失败。 - 最终 226 项定向测试通过,0 失败、0 错误、0 跳过。包含完整 SPI 套件,以及自动别名、类加载器、注册故障隔离和 FE 展示测试。 - 原生 P0 回归在隔离 1 FE + 3 BE 中通过:七组 Catalog 配置、30 个正向入口检查、15 个无授权检查;覆盖新建和 ALTER。 - JDBC 独立 SQL 探针的三个展示入口通过。三个 HMS Catalog 和原 SELECT 账号在集群重启后继续通过九个入口检查,未重建元数据。 - 实际 BE numbers 扫描求和为 499500。联合构建、Checkstyle、接口基线及补丁检查通过。 - 定向验证未替代全量 P0、社区 CI 或外部 metastore 读写测试。 ### Notes for Reviewers 敏感键通过插件接口传递,fe-core 不依赖具体 metastore 实现。两份接口基线均从实际编译类重新生成,只有 provider 新方法改变;metadata 基线内容保持一致。 ### Release note Catalog 展示自动掩码 metastore provider 声明的敏感属性和别名,包括 HMS keytab 路径。Connector 插件 API 升至 32.0。 ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No;开发指南已同步插件敏感键导出规则。 - Pre-submission status: Ready ### AI Disclosure - Tool: Codex - Generated: 修复、测试和说明。 - Human review: 待作者审阅。
### Background Catalogs store JDBC and REST connection URIs, which can include credentials without a separate password property. Connector providers export sensitive property names and aliases at FE startup; catalog displays use the shared registry to mask their values. ### What problem does this PR solve? Issue Number: None Related PR: apache#70338 (added connector-declared masking and metastore registration) PR Type: Bugfix Problem Summary: Catalog readers with SELECT can still see credentials embedded in JDBC and REST URI properties because those properties are not declared sensitive. Mark the five URI fields sensitive so the existing registration chain covers their aliases, including the legacy JDBC prefix. Most of the change adds checks for aliases, preserved connection values, and SELECT-only display access. ### Details - **Frequency:** Always when an affected URI contains credentials and a catalog reader displays its properties. - **Root cause:** The JDBC and Iceberg/Paimon JDBC/REST URI annotations omit `sensitive=true`, so their names never reach the provider's masking surface. - **Why existing tests missed it:** Property tests covered binding and standalone passwords; provider tests omitted URI keys, and the Iceberg dispatch test explicitly expected `uri` to remain unmasked. The existing audit regression checks standalone passwords and audit text, without SELECT-only URI alias checks. - **Fix:** Declare URI sensitivity in the property holders and reuse the existing alias expansion, metastore union, and provider registration. Mask complete URI values because JDBC and REST support different credential encodings. - **Other paths and branches:** Covers `SHOW CREATE CATALOG`, `SHOW CATALOG <name>`, and `catalogs()`, plus annotation-based property masking. Both `jdbc_url` and `jdbc.jdbc_url` are covered. Only master was verified; release-branch applicability and the earliest introducing changes remain unconfirmed. - **Behavior change:** These URI values are masked even without embedded credentials. The shared `uri` alias is masked wherever the common registry is used. Stored connection values and ordinary properties retain their behavior; keytab paths follow the upstream visibility policy. ### Testing - `IcebergJdbcMetaStorePropertiesTest#uriAliasesAreMaskedWithoutChangingConnectionValues`: fails its credential-rendering assertion before the URI fix and passes afterward. - Local targeted FE/connector tests: 277 passed, zero failures, errors, or skips; all 50 required XML reports were fresh. Includes the full connector SPI suite and the affected properties, provider surfaces, metastore dispatch, registration, display, and audit tests. - Local isolated 1 FE + 3 BE, ASAN: `query_p0/show/test_catalog_credential_masking.groovy` passed CREATE/ALTER checks across four metastore configurations: 24 display checks and nine unauthorized checks. Callback-external SQL counters confirmed execution; the runner's verdict remains `PASS_WITH_COVERAGE_CAVEATS`. - Ordinary JDBC SQL probe: 12 display checks passed for `jdbc_url` and `jdbc.jdbc_url` after CREATE and ALTER, including an address without credentials, using local MySQL Connector/J 8.0.33. - Fake credentials and `test_connection=false` avoid external services. These are targeted local runs, without external metastore I/O, real Kerberos authentication, full P0, or community CI. ### Notes for Reviewers The plugin SPI and API 32.0 remain unchanged. The committed regression requires no external driver fixture; ordinary JDBC SQL verification used a locally supplied driver. ### Release note Catalog displays mask full JDBC/REST URI values and their aliases, including addresses without embedded credentials. Connections continue to receive the original URI values. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, tests, verification scripts, and this description - Human review: not stated - Prompts: Asked to reuse upstream masking registration, keep keytab paths visible, and fix URI omissions with unit tests and SELECT-only checks through all three display paths in an isolated FE/BE cluster.
### Background The catalog credential masking suite checks three display paths with low-privilege users. The catalogs table-valued function executes a metadata scan on a backend. ### What problem does this PR solve? Issue Number: None Cloud P0 needs a compute group for each test user before it can execute the metadata scans. The catalog SELECT assertion also needs to isolate catalog privileges from execution resource grants. ### Details - **Failure:** The catalog masking suite's Cloud metadata scan requires a compute group. - **Cause:** The reader and ungranted user had no compute group usage. The earlier grant check combined object and execution resource privileges. - **Stability evidence:** The exact same suite passed on isolated Cloud and shared-nothing clusters. Each run executed 24 reader checks and 9 access-denied checks. The Cloud run verified USAGE for both users. ### Testing - Ran `test_catalog_credential_masking` under the native Cloud P0 and shared-nothing P0 profiles with one selected suite passing in each run. - Verified SELECT-only grants for all four target catalogs in both runs and compute group USAGE for both test users in Cloud. ### Release note None. ### Check List (For Author) - Behavior changed: No. - Does this need documentation: No. - Pre-submission status: Ready. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Regression suite update and commit description. - Human review: Pending.
Local pipeline review — ✅ PASSschema: doris-repo-review/v1
status: PASS
pr: apache/doris#70696
commit: a3bbe0d822e602557f0ad79d7bf7ac04b9c34007
base: e04a785e20a87ef910ec756ff6b4d269298addb6
reviewed_at: 2026-11-18T03:33+08:00
reviewer: OIiveirra
model: gpt-6-astra
effort: xhigh
findings: {blocker: 0, major: 0, minor: 0, nit: 0}
rounds: 1
converged: trueNotes for maintainers
Reviewed locally with the |
|
run buildall |
|
/review |
|
run buildall |
There was a problem hiding this comment.
Reviewed all 12 changed files at a3bbe0d. No new actionable findings or existing blocking inline findings were identified. The review converged after one round: both complete-scope reviewers and the independent risk reviewer returned NO_NEW_VALUABLE_FINDINGS, and the main-agent final sweep resolved all recorded risk questions.
The five sensitive annotations feed plugin-local alias reflection, metastore/provider declarations, startup registration, and the shared masking used by SHOW CREATE CATALOG, SHOW CATALOG, and catalogs(). Binding and client option assembly continue to use the original URI values. Both stored alias spellings are masked, including jdbc.jdbc_url; the shared uri name and addresses without credentials are intentionally masked globally.
| Required checkpoint | Static review conclusion |
|---|---|
| Goal and correctness | All five JDBC/REST fields and their accepted aliases reach the display registry; raw values remain available to clients. |
| Scope and reuse | Five annotation changes reuse existing masking machinery; supporting tests are focused. |
| Concurrency and locking | No new threads, shared runtime state, lock scopes, or lock order. |
| Lifecycle and initialization | Existing plugin-local discovery is retained; sensitive keys register before provider publication. No new lifetime management. |
| Configuration | No configuration items added. |
| Compatibility | No SPI, function-symbol, stored-property, or format changes. Expanded output masking is the intended user-visible change. Older FE binaries require upgrading to gain it. |
| Thrift/protobuf | No changes. |
| Parallel paths | Ordinary JDBC and Iceberg/Paimon JDBC/REST aliases, all three display entrances, and CREATE/ALTER property paths inspected. |
| Conditional checks and errors | No new production branches; test comparisons and expected-denial checks propagate failures. |
| Test coverage | Java assertions cover aliases, rendering, and preserved inputs. The SQL regression covers four metastore fixtures after CREATE/ALTER, three display entrances, SELECT-only grants, and denied users. |
| Test results | Assertions and independent SQL references inspected; ordered TVF comparisons need no new golden file. No tests were executed in this review. |
| Observability | Existing tagged failures identify fixture, phase, and display entrance; no new runtime operation requires metrics. |
| Persistence and transactions | Binding, raw properties, logging/replay, and transaction logic are unchanged. |
| Data writes and crash atomicity | No new data-write or crash-recovery logic. |
| FE/BE variables | None added; existing client/metadata interfaces retain their values and identity path. |
| Performance and memory | Small key-set growth within the existing registration/rendering mechanism; no new I/O or material hot-path allocation. BE memory and visibility invariants are unaffected. |
| Other concerns and risk recheck | Alias precedence, classloader identity, global uri consumers, TLS callbacks, completion counters, cloud grants, and alternate harness routing were checked without a substantiated defect. |
No additional user focus was supplied. Coverage is static only: no builds, tests, benchmarks, external metastore calls, real driver loading, Kerberos, or multi-FE execution were performed. The committed SQL regression omits an ordinary-JDBC driver fixture; its aliases and unchanged binding are covered by Java tests and source tracing. No unresolved code questions or uncovered changed-file scope remain.
Review converged after 1 round(s).
### 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.
…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.
…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
Catalogs store JDBC and REST connection URIs, which can include credentials without a separate password property. Connector providers export sensitive property names and aliases at FE startup; catalog displays use the shared registry to mask their values.
What problem does this PR solve?
Issue Number: None
Related PR: #70338 (added connector-declared masking and metastore registration)
PR Type: Bugfix
Problem Summary:
Catalog readers with SELECT can still see credentials embedded in JDBC and REST URI properties because those properties are not declared sensitive. Mark the five URI fields sensitive so the existing registration chain covers their aliases, including the legacy JDBC prefix. Most of the change adds checks for aliases, preserved connection values, and SELECT-only display access.
Details
sensitive=true, so their names never reach the provider's masking surface.urito remain unmasked. The existing audit regression checks standalone passwords and audit text, without SELECT-only URI alias checks.SHOW CREATE CATALOG,SHOW CATALOG <name>, andcatalogs(), plus annotation-based property masking. Bothjdbc_urlandjdbc.jdbc_urlare covered. Only master was verified; release-branch applicability and the earliest introducing changes remain unconfirmed.urialias is masked wherever the common registry is used. Stored connection values and ordinary properties retain their behavior; keytab paths follow the upstream visibility policy.Testing
IcebergJdbcMetaStorePropertiesTest#uriAliasesAreMaskedWithoutChangingConnectionValues: fails its credential-rendering assertion before the URI fix and passes afterward.query_p0/show/test_catalog_credential_masking.groovypassed CREATE/ALTER checks across four metastore configurations: 24 display checks and nine unauthorized checks. Callback-external SQL counters confirmed execution; the runner's verdict remainsPASS_WITH_COVERAGE_CAVEATS.jdbc_urlandjdbc.jdbc_urlafter CREATE and ALTER, including an address without credentials, using local MySQL Connector/J 8.0.33.test_connection=falseavoid external services. These are targeted local runs, without external metastore I/O, real Kerberos authentication, full P0, or community CI.Notes for Reviewers
The plugin SPI and API 32.0 remain unchanged. The committed regression requires no external driver fixture; ordinary JDBC SQL verification used a locally supplied driver.
Release note
Catalog displays mask full JDBC/REST URI values and their aliases, including addresses without embedded credentials. Connections continue to receive the original URI values.
Check List (For Author)
AI Disclosure