roryqi opened a new pull request, #12980:
URL: https://github.com/apache/gravitino/pull/12980

   ### What changes were proposed in this pull request?
   
   - Validate metadata object names before converting structured identifiers 
into dot-separated qualified names.
   - Return HTTP 400 for unsupported dotted metadata names instead of wrapping 
the validation failure as an internal authorization error.
   - Reject list results containing unrepresentable dotted metadata names 
explicitly instead of silently filtering them out during per-object 
authorization.
   - Add regression coverage for dotted table and topic names, list filtering, 
and authorization interception.
   
   ### Why are the changes needed?
   
   External systems such as Kafka and PostgreSQL may contain objects whose 
names include dots. Gravitino currently reserves `.` as the qualified-name 
separator and cannot represent these names.
   
   The existing behavior is misleading and inconsistent:
   
   - Loading an affected object may return HTTP 500 with an authorization 
failure message.
   - List authorization may silently remove the object, making the catalog 
appear complete.
   
   The proposed validation returns a clear error explaining the current naming 
limitation.
   
   Fix: #12977
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes.
   
   Requests involving unsupported dotted metadata object names now return HTTP 
400 with an explicit message such as:
   
   ```text
   The TOPIC name 'orders.created.v1' is unsupported because '.' is reserved as 
the qualified-name separator.
   ```
   
   List operations now report the unsupported name instead of silently omitting 
it.
   
   ### How was this patch tested?
   
   Added tests covering:
   
   - conversion of dotted table and topic identifiers;
   - filtering list results containing dotted external object names;
   - conversion of the validation failure into an HTTP 400 response by the 
authorization interceptor.
   
   ```bash
   ./gradlew \
     :core:test --tests org.apache.gravitino.utils.TestNameIdentifierUtil \
     :server-common:test --tests 
org.apache.gravitino.server.authorization.TestMetadataAuthzHelper \
     :server:test --tests 
org.apache.gravitino.server.web.filter.TestGravitinoInterceptionService \
     -PskipITs -PskipWeb=true
   ```
   
   All tests and Spotless checks passed.
   


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

Reply via email to