K8s Audit Log Role Bindings To Cluster Admin
his alert occurs when Lacework detects a user on your Kubernetes cluster successfully created a role binding to bind the user to a Kubernetes cluster admin role.
Why this alert is important
Cluster admins are super-user with access to perform any action on any resource. When used in a role binding, the cluster admin role gives full control over every resource in the cluster and in all namespaces.
Investigation
Follow these steps to investigate the alert:
- Check the Kubernetes audit logs to identify when and by whom the role binding was created.
- Identify the user or group that was granted the admin privileges. You can find this information in the
subjectsfield of theRoleBindingobject. - Determine if the user or group is authorized to have admin privileges.
- Review the Kubernetes audit logs for any other unauthorized changes to the cluster that may have been made by the user or group in question.
Resolution
Follow these steps to resolve the alert:
- If the role binding was created maliciously or in error, remove it immediately to prevent further unauthorized access or activity.
- Change the credentials of any users who may have been involved in creating the unauthorized role binding, and revoke their access if necessary.
- Review all users' permissions and access levels and ensure they are appropriate for their job functions. Remove any excessive permissions that could lead to potential security breaches.
- Conduct a thorough security audit of the affected cluster to identify other security vulnerabilities or suspicious activity.
- Implement additional security measures such as multi-factor authentication, network segmentation, and regular security training for users to prevent future security incidents.