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

   > Depends on #12404. This branch adds one commit on top of its current head.
   
   ### What changes were proposed in this pull request?
   
   - Preserve whether a `BaseCatalog` was configured with an authorization 
provider after `close()` clears its plugin.
   - Use a checked authorization-plugin lookup in `AuthorizationUtils` and 
`FutureGrantManager`.
   - Throw `AuthorizationPluginException` when a configured plugin is 
unexpectedly unavailable instead of silently skipping the authorization update.
   - Add coverage for closed catalogs, catalogs without authorization 
providers, privilege removal, and the future-grant path.
   
   ### Why are the changes needed?
   
   A catalog cache eviction can close the authorization plugin while a catalog 
reference is still in use. Silently treating the resulting null plugin as 
“authorization is disabled” can leave stale grants in the external 
authorization system.
   
   #12404 makes the authorization call paths lease-scoped. This patch also 
enforces the lifecycle invariant so a future regression fails visibly instead 
of losing authorization updates silently.
   
   Fix: #12405
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. If an authorization provider is configured but its plugin is 
unexpectedly unavailable, the operation now fails with 
`AuthorizationPluginException` instead of silently succeeding without updating 
the external authorization system.
   
   There are no REST API or configuration-key changes.
   
   ### How was this patch tested?
   
   ```bash
   ./gradlew :core:spotlessJavaCheck :core:test \
     --tests org.apache.gravitino.authorization.TestAuthorizationUtils \
     --tests org.apache.gravitino.authorization.TestFutureGrantManager \
     --tests org.apache.gravitino.connector.authorization.TestAuthorization \
     :core:javadoc -PskipITs
   ```
   


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