feat: extend C box API with new user methods
Introduce new methods:
- box_user_id_by_name - get the user identifier by name;
- box_effective_user_id - get current effective user identifier;
- box_session_user_id - get current session user identifier;
- box_session_su - change current session user;
Current MR is a part of the task to provide authentication for the cluster-wide sql in picodata. Next steps: wrap current API with tarantool module and use inside sbroad rust code to check permissions.
See also:
Merge request reports
Activity
requested review from @rosik
assigned to @darthunix
added 1 commit
- 4ee33e2b - feat: extend C box API with new user methods
requested review from @funbringer and removed review request for @rosik
At the moment
box_session_user_id()
returns the current session user (that can be changed by thesu
orsetuid
). There is also an "effective" user that is binded to the fiber and can't be changed bysu
/setuid
. I think I should expose it as well (we extract it via Lua in storrage.rs of tarantool module).added 1 commit
- 8a152565 - feat: extend C box API with new user methods
- Resolved by Dmitry Ivanov
added 1 commit
- d8873d91 - feat: extend C box API with new user methods
requested review from @Gerold103 and removed review request for @funbringer
- Resolved by Denis Smirnov
@Gerold103 does
box_fiber_user_id
look like a good name, or I should rather change it tobox_effective_user_id
?Edited by Denis Smirnov