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

   ### What changes were proposed in this pull request?
   
   Adapt the authorization validation fixes from #14612 to branch-1.3:
   - Return HTTP 400 for invalid metadata object names and privileges.
   - Validate all privileges without short-circuiting.
   - Return HTTP 400 for null or invalid tag/policy association bodies.
   
   Preserve HTTP 500 for unexpected internal errors.
   
   ### Why are the changes needed?
   
   Invalid client inputs are incorrectly reported as authorization internal 
errors. Null tag/policy association bodies return 403 instead of 400.
   
   Fixes #14610
   
   ### Does this PR introduce _any_ user-facing change?
   
   Affected invalid requests return HTTP 400 with the validation error instead 
of HTTP 500 or 403.
   
   ### How was this patch tested?
   
   - Added regression coverage for tag/policy association bodies, invalid 
object names, and invalid privileges.
   - Confirmed empty association bodies returned 500 before the fix.
   - Passed 103 targeted authorization and REST tests.
   - Ran `./gradlew spotlessApply` and `git diff --check`.
   


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