roryqi opened a new issue, #14765:
URL: https://github.com/apache/gravitino/issues/14765

   ### Version
   
   main branch, commit f68a26cc9d.
   
   ### Describe what's wrong
   
   Some Iceberg REST authorization and validation paths still produce 
inconsistent responses or audit records:
   
   | Request | Current behavior | Expected behavior |
   | --- | --- | --- |
   | Denied load-table or load-view request | Returns 403, but the Iceberg 
ForbiddenException bypasses authorization-denial event dispatch; the table 
target is also unresolved before the load handler runs | Record 
AUTHORIZATION_DENIAL with the requested object, method and expression |
   | Load through a prefix naming a non-Iceberg catalog | The load handler 
resolves the catalog before checking object privileges and can return a generic 
authorization 500 | Return 403 to callers without catalog visibility, and 400 
to an authorized caller |
   | Use a dotted, metalake-qualified prefix | Can fail inside metadata 
authorization as a generic 500 | Return 400 explaining that the prefix must be 
an unqualified catalog name |
   | Create or stage a table with a non-S3 location in an S3FileIO catalog | 
The location is not checked before backend dispatch; it may be accepted or fail 
later with a storage error | Reject the location with 400 before creating or 
staging the table |
   
   ### Error message and/or stacktrace
   
   ```text
   Authorization failed due to system internal error
   ```
   
   Denied load requests can be audited as UNKNOWN instead of 
AUTHORIZATION_DENIAL.
   
   ### How to reproduce
   
   Enable authorization and dynamic catalog configuration, then:
   
   1. Load an existing table or view as a metalake member without access and 
inspect its audit event.
   2. Call GET /iceberg/v1/{non-Iceberg-catalog}/namespaces/s/tables/t as an 
administrator and as a member without catalog access.
   3. Repeat a load with a prefix shaped like metalake.catalog.
   4. Against an S3FileIO catalog, send create-table requests with 
location=file:///tmp/table, including stage-create=true. Verify the response 
and that no table is created.
   
   ### Additional context
   
   Identified against the main-branch source; local regression tests cover 
these paths. No deployed-service retest was performed.
   
   Related role/privilege validation and assignment-audit work is already 
tracked in #14723 and fixed by the pending PR #14728. Those cases are not 
duplicated here.
   


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