Skip to content

Robots are unable to rotate secrets of other robots #23299

@0xC4DE

Description

@0xC4DE

Expected behavior and actual behavior:
According to https://github.com/goharbor/harbor/blob/main/src/server/v2.0/handler/robot.go#L263

A user/robot needs the "rbac.ActionUpdate" permission in order to update the security of a robot. (error seems to originate from this section of code:

resource := system.NewNamespace().Resource(subresource...)
if !secCtx.Can(ctx, action, resource) {
return errors.ForbiddenError(nil).WithMessage(secCtx.GetUsername())
}
)

Image However, robots cannot be granted that robots.ActionUpdate permission per this menu inside of the edit robots permission.

Steps to reproduce the problem:
Create two system-level robots, one with every system permission, the other with none
Query the API with PATCH https://{harbor}/api/v2.0/robots/{robot_id}/ log-in should be bot with all permissions
Recieve a FORBIDDEN with "message": "{logged-in account name}"

  • harbor version: v2.14.4

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions