第 1 章 Security
Manage your security and role-based access control (RBAC) of Red Hat Advanced Cluster Management for Kubernetes components. Govern your cluster with defined policies and processes to identify and minimize risks. Use policies to define rules and set controls.
Prerequisite: You must configure authentication service requirements for Red Hat Advanced Cluster Management for Kubernetes to onboard workloads to Identity and Access Management (IAM). For more information see, Understanding authentication in OpenShift Container Platform documentation.
Review the following topics to learn more about securing your cluster:
1.1. Role-based access control 复制链接链接已复制到粘贴板!
Red Hat Advanced Cluster Management for Kubernetes supports role-based access control (RBAC). Your role determines the actions that you can perform. RBAC is based on the authorization mechanisms in Kubernetes, similar to OpenShift Container Platform. For more information about RBAC, see the OpenShift RBAC overview in the OpenShift Container Platform documentation.
View the following sections for details of supported RBAC by component:
1.1.1. Overview of roles 复制链接链接已复制到粘贴板!
Some product resources are cluster-scoped and some are namespace-scoped. View the table list of the following role definitions that are supported in Red Hat Advanced Cluster Management for Kubernetes:
| Role | Definition |
|---|---|
| cluster-admin |
A user with cluster-wide binding to the |
| open-cluster-management:cluster-manager-admin |
A user with cluster-wide binding to the |
| open-cluster-management:managed-cluster-x (admin) |
A user with cluster binding to the |
| open-cluster-management:managed-cluster-x (viewer) |
A user with cluster-wide binding to the |
| open-cluster-management:subscription-admin |
A user with the |
| admin, edit, view |
Admin, edit, and view are OpenShift Container Platform default roles. A user with a namespace-scoped binding to these roles has access to |
Important:
- Any user can create projects from OpenShift Container Platform, which gives administrator role permissions for the namespace.
-
If a user does not have role access to a cluster, the cluster name is not visible. The cluster name is displayed with the following symbol:
-.
1.1.2. RBAC implementation 复制链接链接已复制到粘贴板!
RBAC is validated at the API level. When an user attempts an action from the console, the API might be allowed or rejected based on access role permissions. View the following sections for more information on RBAC for specific lifecycles in the product.
1.1.2.1. Cluster lifecycle RBAC 复制链接链接已复制到粘贴板!
To perform cluster lifecycle operations, users must have access to the managedcluster namespace and custom resource. A user with cluster-wide binding to admin or view roles, has admin or view access to all management clusters and namespaces.
View the following examples:
To view
managedcluster xcluster information, the following roles are required:-
A cluster-wide binding to the
viewrole foropen-cluster-management. -
A namespace binding to the
viewrole for namespace "X".
-
A cluster-wide binding to the
To perform an upgrade to
managedcluster x, the following roles are required:-
A cluster-wide binding to the
adminrole foropen-cluster-management. -
A namespace binding to the
adminrole for namespace "X".
-
A cluster-wide binding to the
View the following console and API RBAC tables for Cluster lifecycle:
| Action | Admin | Edit | View |
|---|---|---|---|
| Clusters | read, update, delete | read, update | read |
| Provider connections | create, read, update, and delete | create, read, update, and delete | No access |
| Bare metal | Yes | read, update | read |
| API | Admin | Edit | View |
|---|---|---|---|
| klusterletaddonconfigs.agent.open-cluster-management.io | create, read, update, delete | read, update | read |
| manageclusters.cluster.open-cluster-management.io | create, read, update, delete | read, update | read |
| managedclusteractions.action.open-cluster-management.io | create, read, update, delete | read, update | read |
| managedclusterviews.view.open-cluster-management.io | create, read, update, delete | read, update | read |
| managedclusterinfos.internal.open-cluster-management.io | create, read, update, delete | read, update | read |
| manifestworks.work.open-cluster-management.io | create, read, update, delete | read, update | read |
1.1.2.2. Application lifecycle RBAC 复制链接链接已复制到粘贴板!
When you create an application, the subscription namespace is created and the configuration map is created in the subscription namespace. When you want to apply a subscription, you must be a subscription administrator. For more information on managing applications, see Creating and managing subscriptions.
To perform Application lifecycle tasks, users must have access to the namespace where the application is created and the managedcluster namespace. For example, the required access to create applications in namespace "N" is a namespace binding to the admin role for namespace "N".
View the following console and API RBAC tables for Application lifecycle:
| Action | Admin | Edit | View |
|---|---|---|---|
| Application | create, read, update, delete | create, read, update, delete | read |
| Channel | create, read, update, delete | create, read, update, delete | read |
| Subscription | create, read, update, delete | create, read, update, delete | read |
| Placement rule | create, read, update, delete | create, read, update, delete | read |
| API | Admin | Edit | View |
|---|---|---|---|
| applications.app.k8s.io | create, read, update, delete | create, read, update, delete | read |
| channels.apps.open-cluster-management.io | create, read, update, delete | create, read, update, delete | read |
| deployables.apps.open-cluster-management.io | create, read, update, delete | create, read, update, delete | read |
| helmreleases.apps.open-cluster-management.io | create, read, update, delete | create, read, update, delete | read |
| placementrules.apps.open-cluster-management.io | create, read, update, delete | create, read, update, delete | read |
| subscriptions.apps.open-cluster-management.io | create, read, update, delete | create, read, update, delete | read |
| configmaps | create, read, update, delete | create, read, update, delete | read |
| secrets | create, read, update, delete | create, read, update, delete | read |
| namespaces | create, read, update, delete | create, read, update, delete | read |
1.1.2.3. Governance lifecycle RBAC 复制链接链接已复制到粘贴板!
To perform Governance lifecycle operations, users must have access to the namespace where a policy is created, and access to the managedcluster namespace. A user with cluster-wide binding to admin or view access, also have write and read access to all policies and all management clusters on the hub cluster.
View the following examples:
To view policies in namespace "N" the following role is required:
-
A namespace binding to the
viewrole for namespace "X".
-
A namespace binding to the
To create a policy in namespace "N" and apply it on
managedcluster x, the following roles are required:-
A namespace binding to the
adminrole for namespace "N". -
A namespace binding to the
adminrole for namespace "X".
-
A namespace binding to the
View the following console and API RBAC tables for Governance lifecycle:
| Action | Admin | Edit | View |
|---|---|---|---|
| Policies | create, read, update, delete | read | read |
| PlacementBindings | create, read, update, delete | read | read |
| PlacementRules | create, read, update, delete | read | read |
| API | Admin | Edit | View |
|---|---|---|---|
| policies.policy.open-cluster-management.io | create, read, update, delete | read | read |
| placementbindings.policy.open-cluster-management.io | create, read, update, delete | read | read |
Continue to learn more about securing your cluster, see Security.