Gabriel39 opened a new pull request, #70705:
URL: https://github.com/apache/doris/pull/70705

   ### Background
   
   Connector and filesystem providers declare sensitive catalog property names, 
which the FE registers for catalog rendering and audit SQL rewriting. 
Filesystem property annotations also drive diagnostic `toString()` masking.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: #70338 (provider-owned catalog masking and ALTER CATALOG audit 
coverage)
   PR Type: Bugfix
   
   Problem Summary:
   
   Catalog properties containing `mc.session_token` or `ozone.access_key` can 
still appear in clear text because their providers do not declare them 
sensitive. Ozone's diagnostic property rendering also exposes its access key. 
This PR declares the retained MaxCompute token in the connector security 
surface and marks the Ozone access-key field sensitive, preserving the raw 
values used by connections. Most of the diff extends coverage for provider 
metadata, rendering, and audit outputs.
   
   ### Details
   
   - **Frequency:** Whenever these properties are present and rendered through 
the affected paths.
   - **Root cause:** MaxCompute declares only its access-key pair; its retained 
session-token property is outside the current authentication binder. Ozone 
marks its secret key and session token sensitive, but omits the access-key 
field and its aliases.
   - **Why existing tests missed it:** MaxCompute's test pinned only two keys, 
while Ozone tests explicitly expected the access key to remain visible.
   - **Fix:** Extend the existing provider-owned declarations. Add coverage for 
case-insensitive registration, catalog property rendering, CREATE/ALTER audit 
rewriting, and unchanged raw connection properties; extend the SQL audit 
regression suite.
   - **Other paths and branches:** The declarations feed the shared 
catalog/audit masking registry, and the Ozone annotation also protects 
diagnostic rendering. This PR targets master only. Generic URI parsing, 
arbitrary SDK/Hadoop pass-through properties, custom-name rules, and free-text 
secret detection are outside its scope.
   - **Behavior change:** These two catalog properties render as `*XXX`; 
Ozone's diagnostic access key renders as `***`. Existing S3 access-key aliases 
on that field inherit the same sensitive annotation.
   
   ### Testing
   
   - Before the fix, the MaxCompute provider test fails because its token is 
missing; the Ozone provider and diagnostic-rendering tests fail because the 
access key is exposed.
   - After the fix, the repository FE unit-test runner passes all 41 tests in 
`DatasourcePrintableMapTest`, `MaxComputeConnectorProviderSecuritySurfaceTest`, 
`OzoneFileSystemProviderTest`, and `OzoneFileSystemPropertiesTest` locally.
   - FE Maven Checkstyle validation passes for the affected modules and their 
reactor dependencies.
   - `git diff --check` passes.
   - Extended `test_external_catalog_credential_masking` to assert SHOW 
CATALOG, SHOW CREATE CATALOG, and persisted CREATE/ALTER audit masking. This 
SQL regression suite was not executed locally.
   
   ### Release note
   
   Mask MaxCompute session tokens and Ozone access keys in catalog property 
display and audit SQL, and mask Ozone access keys in diagnostic property 
rendering.
   
   ### Check List (For Author)
   
   - Behavior changed: Yes (see Details).
   - Does this need documentation: No.
   - Pre-submission status: Partially verified: targeted FE unit tests and 
Checkstyle pass; the SQL regression suite awaits CI execution.
   
   ### AI Disclosure
   
   - Tool: Codex (GPT-6).
   - Generated: Production changes, tests, and this description.
   - Human review: Not performed; the changes received an agent self-review.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to