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

   ### What changes were proposed in this pull request?
   
   This PR adds bulk access control APIs for users, groups, and roles under a 
metalake:
   
   - `POST /api/bulk/metalakes/{metalake}/users/add`
   - `POST /api/bulk/metalakes/{metalake}/users/remove`
   - `POST /api/bulk/metalakes/{metalake}/groups/add`
   - `POST /api/bulk/metalakes/{metalake}/groups/remove`
   - `POST /api/bulk/metalakes/{metalake}/roles/add`
   - `POST /api/bulk/metalakes/{metalake}/roles/remove`
   
   The implementation includes:
   
   - New REST resources for bulk user, group, and role operations.
   - Request DTOs for user names, group names, role names, and bulk role 
creation.
   - A shared bulk operation response with `succeeded` and `failed` results.
   - Request validation for empty input and duplicated names.
   - OpenAPI documentation and examples for the new APIs.
   - Unit tests for request validation and REST behavior.
   
   ### Why are the changes needed?
   
   Currently, users need to call single-resource APIs repeatedly to add or 
remove multiple users, groups, or roles. These new APIs provide a batch 
operation interface for access control management and reduce repeated 
client-side API calls.
   
   This PR follows the behavior discussed in #10805:
   
   - Validate the whole request before processing.
   - Reject invalid requests, such as duplicated names, without processing any 
item.
   - After validation succeeds, process each item independently.
   - Return successful items in `succeeded` and per-item business failures in 
`failed`.
   
   Closes #10805.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. This PR introduces new REST APIs for bulk access control operations.
   
   ### How was this patch tested?
   
   ```bash
   
JAVA_HOME=/Users/hujie3/.gradle/jdks/amazon_com_inc_-17-x86_64-os_x/amazon-corretto-17.jdk/Contents/Home
 \
   ./gradlew :common:test --tests 
org.apache.gravitino.dto.requests.TestBulkRequests \
   :server:test --tests org.apache.gravitino.server.web.rest.TestBulkOperations 
\
   -PskipITs :docs:build


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