Authorize actions in control planes
For general RBAC in Upbound, read Upbound RBAC.
This guide explains how to authorize actions on resources in your control planes on Upbound. It uses the built-in Kubernetes role-based access control (RBAC) mechanism. This gives you fine-grained control over control plane access.
In a control plane on Upbound, Upbound RBAC and the control planes's Kubernetes RBAC are integrated to authorize users to perform actions. They must have enough permission according to either system. To authorize users with their Upbound account, you must configure kubectl to authenticate to Upbound before running any commands that require authorization.
Define permissions and assign roles
Because control planes in Upbound are based on Kubernetes, you can use ClusterRole and Role objects to define RBAC rules in your control planes. Assign those rules using ClusterRoleBinding and RoleBinding objects:
- Role: A namespace-scoped group of resources and allowed operations that you can assign to a user or a group of users using a RoleBinding.
- ClusterRole: A cluster-scoped group of resources and allowed operations that you can assign to a user or a group of users using a RoleBinding or ClusterRoleBinding.
- RoleBinding: A namespace-scoped assignment of a Role or ClusterRole to a user or group.
- ClusterRoleBinding: A cluster-scoped assignment of a Role or ClusterRole to a user or group.
If you plan to use namespaces in your control plane as an isolation mechanism between tenants, its recommended to use RoleBinding objects. If namespace-scoping isn't a priority, use ClusterRoleBinding objects instead.
Define permissions using Roles and ClusterRoles
Define permissions with a Role or ClusterRole object. A Role defines access to resources in a single namespace of your control plane. A ClusterRole defines access to resources in the entire control plane.
The example below demonstrates creating a sql-instance-viewer
cluster-scoped role. This role permits viewing sqlinstance
objects, a composite resource created with Crossplane.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sqlinstance-viewer
rules:
- apiGroups: ["aws.platform.upbound.io"]
resources: ["sqlinstances"]
verbs: ["get", "watch", "list"]
Assign roles
The example below demonstrates how to assign the role in the earlier section to an Upbound user, robot, and control plane group member:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: sqlinstance-viewer-binding
namespace: tenant1
subjects:
# An Upbound account user
- kind: User
name: upbound:user:${username-on-upbound}
# A robot on Upbound
- kind: User
name: upbound:robot:${robot-name}
apiGroup: rbac.authorization.k8s.io
# An Upbound control plane group member
- kind: Group
name: upbound:team:${team-uuid}
roleRef:
kind: ClusterRole
name: sqlinstance-viewer
apiGroup: rbac.authorization.k8s.io
RBAC manager
Each control plane in Upbound has a built-in Crossplane RBAC manager. This feature dynamically manages and binds RBAC roles. These roles grant subjects access to use the control plane as it gets extended by installing control plane software, such as providers, Crossplane composite resources, and more.
"Show example of RBAC manager roles"
kubectl get ClusterRoles -A
NAME CREATED AT
admin 2025-03-12T18:57:25Z
cluster-admin 2025-03-12T18:57:25Z
controlplane-admin 2025-03-12T18:57:56Z
controlplane-admin-spaces-extras 2025-03-12T18:57:56Z
controlplane-controller 2025-03-12T18:57:56Z
controlplane-controller-spaces-extras 2025-03-12T18:57:56Z
controlplane-edit 2025-03-12T18:57:56Z
controlplane-edit-controller-spaces-extras 2025-03-12T18:57:56Z
controlplane-edit-spaces-extras 2025-03-12T18:57:56Z
controlplane-view 2025-03-12T18:57:56Z
controlplane-view-spaces-extras 2025-03-12T18:57:56Z
crossplane 2025-03-12T18:57:54Z
crossplane-admin 2025-03-12T18:57:54Z
crossplane-browse 2025-03-12T18:57:54Z
crossplane-edit 2025-03-12T18:57:54Z
crossplane-rbac-manager 2025-03-12T18:57:54Z
crossplane-view 2025-03-12T18:57:54Z
crossplane:aggregate-to-admin 2025-03-12T18:57:54Z
crossplane:aggregate-to-browse 2025-03-12T18:57:54Z
crossplane:aggregate-to-edit 2025-03-12T18:57:54Z
crossplane:aggregate-to-view 2025-03-12T18:57:54Z
crossplane:allowed-provider-permissions 2025-03-12T18:57:54Z
crossplane:composite:xnetworks.azure.platform.upbound.io:aggregate-to-browse 2025-03-15T15:26:08Z
crossplane:composite:xnetworks.azure.platform.upbound.io:aggregate-to-crossplane 2025-03-15T15:26:08Z
crossplane:composite:xnetworks.azure.platform.upbound.io:aggregate-to-edit 2025-03-15T15:26:08Z
How Upbound RBAC works in a control plane
Predefined roles
Each control plane offers predefined ClusterRoles related to granting permissions for Crossplane objects:
- controlplane-view lets subjects have read-only access to all Crossplane resources.
- controlplane-edit lets subjects have full access to composite resources.
- controlplane-admin lets subjects have full access and the ability to grant others access by managing role bindings.
Whenever control plane software gets installed or uninstalled, the RBAC manager handles the lifecycle of ClusterRoles and ClusterRoleBindings to aggregate permissions up to these predefined roles.
controlplane-view
The controlplane-view
ClusterRole has the following permissions:
- read-only access to all Crossplane types
- read-only access to all namespaces and events (even those unrelated to Crossplane).
View the full RBAC policy by running the following command on your control plane:
kubectl describe clusterrole controlplane-view
controlplane-edit
The controlplane-edit
ClusterRole has the following permissions:
- full access to all Crossplane types
- full access to all secrets (even those unrelated to Crossplane)
- read-only access to all namespaces and events (even those unrelated to Crossplane).
View the full RBAC policy by running the following command on your control plane:
kubectl describe clusterrole controlplane-edit