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
Good first issue
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_userin 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:
streams: dict[int, StreamPermissions], topics: dict[int, TopicPermissions]), so the mapping is mechanical.create_user, replacing the hardcoded None.update_permissions(user_id, permissions),change_password(user_id, current_password, new_password), andlogout_user()on IggyClient.Alternatives considered
No response
Contribution
Good first issue