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

   ### What problem does this PR solve?
   
   `SHOW DATABASES` could call an external catalog's metadata service before 
checking whether the caller could see that catalog. A caller with no privileges 
could trigger remote initialization and receive connection errors.
   
   Check catalog visibility before listing databases or planning the `WHERE` 
form. Reuse the existing `SHOW` predicate, which includes database, table and 
column grants and honors the configured authorization controller. Keep the 
existing per-database filtering and internal-catalog behavior.
   
   ### Release note
   
   Check external catalog visibility before accessing metadata for `SHOW 
DATABASES`.
   
   ### Validation
   
   - Compiled the changed command and test against cached master dependencies; 
all 6 `ShowDatabasesCommandTest` tests passed.
   - Confirmed the new unauthorized-access test failed on the original command 
before applying the fix.
   - FE Checkstyle passed with zero violations.
   - No live Ranger integration test or full FE test suite was run locally.
   
   ### Check List (For Author)
   
   - Test: Unit Test
   - Behavior changed: Yes. Callers without external catalog visibility receive 
access denied before remote metadata access.
   - Does this need documentation? No.
   


-- 
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