ethanlin01x opened a new issue, #3726:
URL: https://github.com/apache/iggy/issues/3726

   ### Description
   
   Follow-up to #3682, as scoped there. The Python SDK can now create, update, 
and delete users, but every user is created without permissions: create_user in 
foreign/python/src/client.rs hardcodes None for the permissions argument, and 
there is no way to grant or inspect permissions afterwards. update_permissions, 
change_password, and logout_user from the Rust UserClient trait 
(core/common/src/traits/user_client.rs) are also still unexposed, and 
UserInfoDetails returned by get_user has no permissions getter.
   
   This means Python still cannot provision non-root service accounts end to 
end. A deployment script can create a user but cannot give it access to 
anything.
   
   ### Affected area / component
   
   Python SDK
   
   ### Proposed solution
   
   Mirror the Rust domain types 
(core/common/src/types/permissions/permissions_global.rs) as PyO3 classes and 
complete the UserClient surface:
   
   - Expose Permissions, GlobalPermissions, StreamPermissions, and 
TopicPermissions as Python classes. All fields are booleans plus two nested 
dicts (streams: dict[int, StreamPermissions], topics: dict[int, 
TopicPermissions]), so the mapping is mechanical.
   - Add the optional permissions parameter to create_user, replacing the 
hardcoded None.
   - Add update_permissions(user_id, permissions), change_password(user_id, 
current_password, new_password), and logout_user() on IggyClient.
   - Add a permissions getter on UserInfoDetails so granted permissions 
round-trip through get_user.
   
   ### Alternatives considered
   
   _No response_
   
   ### Contribution
   
   - [x] I'm willing to submit a pull request to implement this feature
   
   ### Good first issue
   
   - [ ] I think this could be a good first issue for a new contributor


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