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

   ### What changes were proposed in this pull request?
   
   Add Role CRUD operations and authorization data structures to the Python 
client SDK:
   
   - **DTOs**: `PrivilegeDTO`, `SecurableObjectDTO`, `RoleDTO` with JSON 
serialization support
   - **Role CRUD**: `create_role`, `get_role`, `delete_role`, `list_role_names` 
on `GravitinoMetalake` and `GravitinoClient`
   - **DTOConverters**: `to/from_privilege_dto` and 
`to/from_securable_object_dto` conversion methods
   - **Fix**: `GenericPrivilege.__eq__` now checks `isinstance(value, 
Privilege)` for `PrivilegeDTO` compatibility
   - **Tests**: Unit tests (DTO, response, client delegate, error handler) and 
integration tests against a live server
   
   ### Why are the changes needed?
   
   This is the Role authorization piece of issue #10782. User (#11058) and 
Group (#11094) management are already merged. Role CRUD is a prerequisite for 
Grant/Revoke operations, which will follow in a separate PR.
   
   Fix: #11095
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes — new public APIs on `GravitinoClient` and `GravitinoMetalake`:
   - `create_role(role_name, properties=None, securable_objects=None)`
   - `get_role(role_name)`
   - `delete_role(role_name) -> bool`
   - `list_role_names() -> list[str]`
   
   ### How was this patch tested?
   
   - Unit tests: 893 passed (including 8 DTO tests, 5 response tests, 12 client 
mock tests, 11 error handler assertions)
   - Integration tests: 4 passed against a live Gravitino server with 
authorization enabled
   - Linting: `ruff check` clean, `pylint` 10/10


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