Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/controlplane/internal/authz/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ var (
// Org Metrics
PolicyOrgMetricsRead = &Policy{ResourceOrgMetric, ActionList}
// Robot Account
PolicyRobotAccountList = &Policy{ResourceRobotAccount, ActionList}
PolicyRobotAccountList = &Policy{ResourceRobotAccount, ActionList}
PolicyRobotAccountCreate = &Policy{ResourceRobotAccount, ActionCreate}
// Workflow Contract
PolicyWorkflowContractList = &Policy{ResourceWorkflowContract, ActionList}
PolicyWorkflowContractRead = &Policy{ResourceWorkflowContract, ActionRead}
Expand Down Expand Up @@ -176,7 +177,8 @@ var ServerOperationsMap = map[string][]*Policy{
// Metrics
"/controlplane.v1.OrgMetricsService/.*": {PolicyOrgMetricsRead},
// Robot Account
"/controlplane.v1.RobotAccountService/List": {PolicyRobotAccountList},
"/controlplane.v1.RobotAccountService/List": {PolicyRobotAccountList},
"/controlplane.v1.RobotAccountService/Create": {PolicyRobotAccountCreate},
// Workflows
"/controlplane.v1.WorkflowService/List": {PolicyWorkflowList},
"/controlplane.v1.WorkflowService/View": {PolicyWorkflowRead},
Expand Down
2 changes: 2 additions & 0 deletions app/controlplane/internal/biz/apitoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func NewAPITokenUseCase(apiTokenRepo APITokenRepo, conf *conf.Auth, authzE *auth
// to download artifacts and list referrers
authz.PolicyArtifactDownload, authz.PolicyReferrerRead,
authz.PolicyOrganizationRead,
// to create robot accounts
authz.PolicyRobotAccountCreate,
},
}

Expand Down