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

   ### What would you like to be improved?
   
   ### What would you like to be improved?
   
   When Gravitino authorization fails, the error message currently shows only 
`NameIdentifier.name()` for the metadata object, which is the last segment of 
the identifier.
   
   For example, a `loadTable` authorization failure may return:
   
   ```text
   User 'space-account-dip-tenant-dave-base-level' is not authorized to perform 
operation 'loadTable' on metadata 'ods_vehicle_signal_message_xw_cn_rt'
   
   In production environments, different catalogs or schemas may contain tables 
with the same name. Showing only the table name makes it difficult to locate 
the exact resource that failed authorization.
   
   
   ### How should we improve?
   
   Show the full NameIdentifier in authorization denial messages generated by 
GravitinoInterceptionService.
   For example:
   User 'space-account-dip-tenant-dave-base-level' is not authorized to perform 
operation 'loadTable' on metadata 
'dip_metalake.paimon_catalog.ods.ods_vehicle_signal_message_xw_cn_rt'
   Expected message changes include:
   loadCatalog: catalog -> metalake.catalog
   loadSchema: schema -> metalake.catalog.schema
   loadTable: table -> metalake.catalog.schema.table
   loadFileset, loadTopic, loadModel, loadFunction, etc. should also show the 
full NameIdentifier instead of only the last segment.
   This should only change the diagnostic text in 403 error messages. It should 
not change authorization logic, HTTP status codes, error response structure, 
response fields, or user permissions.
   One possible implementation is to use accessMetadataName.toString() instead 
of accessMetadataName.name() when GravitinoInterceptionService builds the 
no-auth response.
   Compatibility note: tests, frontend logic, log alerts, or automation scripts 
that exactly match the old error message text may need to be updated.


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