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

   ### Describe the subtask
   
   `JcasbinAuthorizationLookups.resolveMetadataId` builds the `metadataIdCache` 
key from the raw request name, while the loader `MetadataIdConverter.getID` 
normalizes the name by catalog capability before reading the store. For 
case-insensitive catalogs (Hive, Glue), `db.TBL` and `db.tbl` therefore cache 
the same ID under two keys.
   
   Delete and rename only evict the normalized key: the local hook receives the 
normalized identifier, and `entity_change_log.full_name` also holds the 
normalized name. A case-variant alias key stays until the cache TTL (default 
3600s). If the object is later recreated under the old name, requests that use 
the alias are authorized against the old object's ID.
   
   Affected types: SCHEMA, TABLE, COLUMN, and any other scope in 
`MetadataIdConverter.METADATA_SCOPE_MAPPING` that is case-insensitive.
   
   Proposed fix: normalize the name by catalog capability before building the 
cache key, so every spelling of the same object maps to one key. Add unit tests 
for both the local hook path and the peer change-log replay path.
   
   ### Parent issue
   
   #13303
   


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