mssun opened a new pull request #588: URL: https://github.com/apache/incubator-teaclave/pull/588
## Description This PR contains several API changes and bug fixes: ### New APIs and API Updates I added the following APIs to help with function management and user management. **TeaclaveFrontend**: ``` service TeaclaveFrontend { rpc UpdateFunction (UpdateFunctionRequest) returns (UpdateFunctionResponse); rpc ListFunctions (ListFunctionsRequest) returns (ListFunctionsResponse); rpc DeleteFunction (DeleteFunctionRequest) returns (DeleteFunctionResponse); } ``` **TeaclaveAuthenticationApi**: ``` service TeaclaveAuthenticationApi { rpc UserUpdate(UserUpdateRequest) returns (UserUpdateResponse); } ``` **TeaclaveAuthenticationApi** ``` service TeaclaveAuthenticationApi { rpc UserRegister(UserRegisterRequest) returns (UserRegisterResponse); rpc UserUpdate(UserUpdateRequest) returns (UserUpdateResponse); } ``` `UserRegisterRequest` now contains role and attribute for role-based access control in user management. ### Role-based User Management We introduce four roles: ``` pub enum UserRole { PlatformAdmin, FunctionOwner, DataOwnerManager(String), // Manager of the data owner (attribute can be the organization name DataOwner(String), // Data owner (attribute are the organization name) Invalid, } ``` Different roles have different privileges to access API endpoints. ### User Management Since we have introduced the role-based user management, only "PlatformAdmin" and "DataOwnerManager" can register new users with certain privileges. As a result, `UserRegisterRequest` have two new fields: *role* and *attribute*. The role is an enum but string encoded. Possible roles are "PlatformAdmin", "FunctionOwner", "DataOwnerManager", "DataOwner". ### Bug fixes - Incorrect toolchain version in CI for Swift SDK - Change to multithreaded file service - Fix issue that re-build protobuf in each build ## Type of change (select or add applied and delete the others) - [x] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] API change with a documentation update ## How has this been tested? CI test. ## Checklist - [x] Fork the repo and create your branch from `master`. - [x] If you've added code that should be tested, add tests. - [x] If you've changed APIs, update the documentation. - [x] Ensure the tests pass (see CI results). - [x] Make sure your code lints/format. -- 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: notifications-unsubscr...@teaclave.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@teaclave.apache.org For additional commands, e-mail: notifications-h...@teaclave.apache.org