Role Based Access Control#
k0rdent provides the opportunity to use Role Based Access Control in order to try to use the principle of least privilege and only give users access to the objects and resources they absolutely have to have.
What roles do#
k0rdent leverages the Kubernetes RBAC system and provides a set of standard ClusterRole
objects with
associated permissions. These standard ClusterRole
objects are created as part of the k0rdent helm chart.
k0rdent roles are based on labels and aggregated permissions, meaning they automatically collect
rules from other ClusterRole
objects with specific labels.
The following table outlines the roles available in k0rdent, along with their respective read/write or read-only permissions:
Roles | Global Admin | Global Viewer | Namespace Admin | Namespace Editor | Namespace Viewer |
---|---|---|---|---|---|
Scope | Global | Global | Namespace | Namespace | Namespace |
k0rdent management | r/w | r/o | - | - | - |
Namespaces management | r/w | r/o | - | - | - |
Provider Templates | r/w | r/o | - | - | - |
Global Template Management | r/w | r/o | - | - | - |
Multi Cluster Service Management | r/w | r/o | - | - | - |
Template Chain Management | r/w | r/o | r/w | r/o | r/o |
Cluster and Service Templates | r/w | r/o | r/w | r/o | r/o |
Credentials | r/w | r/o | r/w | r/o | r/o |
Flux Helm objects | r/w | r/o | r/w | r/o | r/o |
Cluster Deployments | r/w | r/o | r/w | r/w | r/o |
This section provides an overview of all ClusterRole
objects available in k0rdent.
Roles summary#
Note
The names of the ClusterRole
objects may have different prefixes depending on the name of the k0rdent Helm chart.
The ClusterRole
object definitions below use the kcm
prefix, which is the default name of the k0rdent Helm chart.
Global Admin#
The Global Admin
role provides full administrative access across all the k0rdent system.
Name: kcm-global-admin-role
Aggregation Rule: Includes all ClusterRoles
with the labels:
k0rdent.mirantis.com/aggregate-to-global-admin: true
k0rdent.mirantis.com/aggregate-to-namespace-admin: true
k0rdent.mirantis.com/aggregate-to-namespace-editor: true
Permissions:
- Full access to the k0rdent API
- Full access to Flux Helm repositories and Helm charts
- Full access to Cluster API identities
- Full access to namespaces and secrets
Use case
A user with the Global Admin
role is authorized to perform the following actions:
- Manage the k0rdent configuration
- Manage namespaces in the management cluster
- Manage
ProviderTemplate
objects: add new templates or remove unneeded ones - Manage
ClusterTemplate
andServiceTemplate
objects in any namespace, including adding and removing templates - Manage Flux
HelmRepository
andHelmChart
objects in any namespace - Manage access rules for
ClusterTemplate
andServiceTemplate
objects, including distributing templates across namespaces usingTemplateChain
objects - Manage upgrade sequences for
ClusterTemplate
andServiceTemplate
objects - Manage and deploy Services across multiple clusters in any namespace by modifying
MultiClusterService
resources - Manage
ClusterDeployment
objects in any namespace - Manage
Credential
andSecret
objects in any namespace - Upgrade k0rdent
- Uninstall k0rdent
Global Viewer#
The Global Viewer
role grants read-only access across the k0rdent system. It does not permit any modifications,
including the creation of clusters.
Name: kcm-global-viewer-role
Aggregation Rule: Includes all ClusterRole
objects with the labels:
k0rdent.mirantis.com/aggregate-to-global-viewer: true
k0rdent.mirantis.com/aggregate-to-namespace-viewer: true
Permissions:
- Read access to k0rdent API
- Read access to Flux Helm repositories and Helm charts
- Read access to Cluster API identities
- Read access to namespaces and secrets
Use case
A user with the Global Viewer
role is authorized to perform the following actions:
- View the k0rdent configuration
- List namespaces available in the management cluster
- List and get the detailed information about available
ProviderTemplate
objects - List available
ClusterTemplate
andServiceTemplate
objects in any namespace - List and view detailed information about Flux
HelmRepository
andHelmChart
objects in any namespace - View access rules for
ClusterTemplate
andServiceTemplate
objects, includingTemplateChain
objects in any namespace - View full details about the created
MultiClusterService
objects - List and view detailed information about
ClusterDeployment
objects in any namespace - List and view detailed information about created
Credential
andSecret
objects in any namespace
Namespace Admin#
The Namespace Admin
role provides full administrative access within a namespace.
Name: kcm-namespace-admin-role
Aggregation Rule: Includes all ClusterRole
objects with the labels:
k0rdent.mirantis.com/aggregate-to-namespace-admin: true
k0rdent.mirantis.com/aggregate-to-namespace-editor: true
Permissions:
- Full access to
ClusterDeployment
,Credential
,ClusterTemplate
andServiceTemplate
objects in the namespace - Full access to
TemplateChain
objects in the namespace - Full access to Flux
HelmRepository
andHelmChart
objects in the namespace
Use case
A user with the Namespace Admin
role is authorized to perform the following actions within the namespace:
- Create and manage all
ClusterDeployment
objects in the namespace - Create and manage
ClusterTemplate
andServiceTemplate
objects in the namespace - Manage the distribution and upgrade sequences of Templates within the namespace
- Create and manage Flux
HelmRepository
andHelmChart
objects in the namespace - Manage
Credential
objects created by any user in the namespace
Namespace Editor#
The Namespace Editor
role allows users to create and modify ClusterDeployment
objects within namespace using predefined
Credential
and Template
objects.
Name: kcm-namespace-editor-role
Aggregation Rule: Includes all ClusterRole
objects with the labels:
k0rdent.mirantis.com/aggregate-to-namespace-editor: true
Permissions:
- Full access to
ClusterDeployment
objects in the allowed namespace - Read access to
Credential
,ClusterTemplate
andServiceTemplate
, andTemplateChain
objects in the namespace - Read access to Flux
HelmRepository
andHelmChart
objects in the namespace
Use case
A user with the Namespace Editor
role has the following permissions in the namespace:
- Can create and manage
ClusterDeployment
objects in the namespace using existingCredential
andTemplate
objects - Can list and view detailed information about the
Credential
objects available in the namespace - Can list and view detailed information about the available
ClusterTemplate
andServiceTemplate
objects and theTemplate
upgrade sequences - Can list and view detailed information about the Flux
HelmRepository
andHelmChart
objects
Namespace Viewer#
The Namespace Viewer
role grants read-only access to resources within a namespace.
Name: kcm-namespace-viewer-role
Aggregation Rule: Includes all ClusterRole
objects with the labels:
k0rdent.mirantis.com/aggregate-to-namespace-viewer: true
Permissions:
- Read access to
ClusterDeployment
objects in the namespace - Read access to
Credential
,ClusterTemplate
,ServiceTemplate
, andTemplateChain
objects in the namespace - Read access to Flux
HelmRepository
andHelmChart
objects in the namespace
Use case
A user with the Namespace Viewer
role has the following permissions in the namespace:
- Can list and view detailed information about all the
ClusterDeployment
objects in the allowed namespace - Can list and view detailed information about
Credential
objects available in the specific namespace - Can list and view detailed information about available
ClusterTemplate
andServiceTemplate
objects, andTemplate
upgrade sequences - Can list and view detailed information about Flux
HelmRepository
andHelmChart
objects