fix rbac project subject for robot accounts#14753
Closed
phin1x wants to merge 4 commits intogoharbor:masterfrom
Closed
fix rbac project subject for robot accounts#14753phin1x wants to merge 4 commits intogoharbor:masterfrom
phin1x wants to merge 4 commits intogoharbor:masterfrom
Conversation
Signed-off-by: Fabian Weber <fabian.weber14@outlook.de>
Codecov Report
@@ Coverage Diff @@
## master #14753 +/- ##
==========================================
+ Coverage 66.19% 66.21% +0.01%
==========================================
Files 937 937
Lines 74601 74606 +5
Branches 2183 2183
==========================================
+ Hits 49383 49397 +14
+ Misses 21292 21283 -9
Partials 3926 3926
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c92380a to
e239f02
Compare
Signed-off-by: Fabian Weber <fabian.weber14@outlook.de>
…/github.com/phin1x/harbor into fix-rbac-project-subject-for-robot-accounts
Signed-off-by: Fabian Weber <fabian.weber14@outlook.de>
Contributor
Author
|
@steven-zou what means "pending on voting"? |
Contributor
Author
|
@heww @wy65701436 any updates on this pr? |
|
Any updates? This issue mostly breaks Helm OCI integration as you can't list manifests on a helm chart (If your using a floating target instead of a specific chart version) without both project level permissions and docker catalog permissions. So, it'd probably be good to fix this before removing chart museum |
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
as we began to use system level robot acocunt we could not list, delete or get projects from the api. we discoverd that the rbac subject for projects are wrong for robot accounts.
the the naming schema for subjects is:
if a robot account has premissions to list all projects, the allowed subject looks like this:
but harbor expects the following subject:
These two subjects never match, so a robot account may never manage projects. For users, the subjects are created correctly. We checked this by changing the expected subject for projects. Now robot accounts were allowed to interact with projects, but users were not.
this pr fixes this issue by omitting the subresouce for project rbac subjects.
Related issues: #14145 #14512