-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Role-Based Authentication for Repository Management (#1060)
Motivation: To address the migration of mirroring configurations from projects to repositories and to simplify access management, we decided to: - Hide the meta repository. - Replace permission-based authentication with a role-based system using `RepositoryRole` (`READ`, `WRITE`, `ADMIN`). The `ADMIN` role has access to the configurations. This change resolves the issue where users with `WRITE` permission for the meta repository were only allowed to creating mirroring configurations. With `RepositoryRole`, access becomes more structured and extensible for future enhancements (e.g., introducing custom roles). While permission-based authentication is replaced here, this does not preclude the future coexistence of role-based and permission-based systems. Modifications: - Added `RepositoryRole` with hierarchical roles (`READ`, `WRITE`, `ADMIN`). - Replaced `RequiresPermission` annotations with `RequiresRepositoryRole`. - Renamed `RequiresRole` to `RequiresProjectRole`. - Updated it to accept a single `ProjectRole`, utilizing the hierarchical model to avoid redundant role specifications. - Removed APIs for managing permissions, replacing them with role management APIs. Result: - Role-based access simplifies management and aligns with repository-specific mirroring configurations. - (Breaking) APIs for managing permissions are removed. To-do: - Update the documentation to reflect the new systme, including updated screenshots Migration plan: - Deploy [PR](#1061), which supports deserialization of both legacy and new metadata format. - Deploy intermediate commit supporting both permission and role APIs, ensuring metadata is stored in the new format. - The commit also migrate the legacy format to new format. - Deploy this commit, which exclusively supports role-based APIs.
- Loading branch information
Showing
58 changed files
with
1,408 additions
and
1,282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.