Skip to content

Commit

Permalink
Add User Project Scoping
Browse files Browse the repository at this point in the history
Organizations and projects are being moved into the identity service as
it's intrinsically linked to these via RBAC.  As a result the identity
service can resolve scoping rules and return them in the user info for
simpler integration of services.
  • Loading branch information
spjmurray committed Apr 9, 2024
1 parent c4a3e7d commit a94aef8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for deploying Unikorn Core

type: application

version: v0.1.21
appVersion: v0.1.21
version: v0.1.22
appVersion: v0.1.22

icon: https://assets.unikorn-cloud.org/images/logos/dark-on-light/icon.svg
14 changes: 14 additions & 0 deletions pkg/authorization/rbac/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,26 @@ type GroupPermissions struct {
Roles []string `json:"roles"`
}

// ProjectPermissions define projects the user hass access to
// and the roles that granted those permissions.
type ProjectPermissions struct {
// Name is the project name.
Name string `json:"name"`
// Roles are the privileges a user has within the project.
Roles []string `json:"roles"`
}

// OrganizationPermissions are privilege grants for an organization.
type OrganizationPermissions struct {
// Name is the name of the organization.
Name string `json:"name"`
// Groups are any groups the user belongs to in an organization.
// These define access control lists.
Groups []GroupPermissions `json:"groups,omitempty"`
// Projects are any projects the user belongs to in an organization
// via group inclusion. These define scoping rules when accessing
// resources.
Projects []ProjectPermissions `json:"projects,omitempty"`
}

// Permissions are privilege grants for the entire system.
Expand Down

0 comments on commit a94aef8

Please sign in to comment.