Manage Access Policies (ACLs)
A guide on how to manage Omni ACLs.
This guide will show how to give the user support@example.com
full access to the staging
cluster but limited access to the production
cluster.
The default without RBAC is to grant Kubernetes admin-level access for users with write permissions on the Omni side.
Create an AccessPolicy resource
Create a local file acl.yaml
:
As an Omni admin, apply this ACL using omnictl:
When users interact with Omni API or UI, they will be assigned to the role specified in the ACL.
When users access the Kubernetes cluster through Omni, they will have the groups specified in the ACL.
Kubernetes RBAC then can be used to grant permissions to these groups.
Only the users who have the Omni role Admin
can manage ACLs. Users who have the Omni role Operator
or above are assigned to the Kubernetes role system:masters
by default, in addition to the ACLs.
Create Kubernetes RBAC resources
Locally, create rbac.yaml
with a Namespace
called my-app
, and a Role
& RoleBinding
to give access to the my-app-read-only
group:
As the cluster admin, apply the manifests to the Kubernetes cluster production
:
Test the access
Try to access the cluster with a kubeconfig
generated by the user support@example.com
:
The user should be able to list pods in the my-app
namespace because of the Role
and RoleBinding
created above.
Try to list pods in another namespace:
The user should not be able to list pods in namespace default
.
If the user support@example.com
has the Omni role Operator
or above assigned, they will have system:masters
role in Kubernetes as well as the my-app-read-only
role.
Therefore, they will still be able to list pods in all namespaces.
Last updated