Skip to content

v0.8 Release Blog

Rahul Jadhav edited this page Jan 2, 2023 · 27 revisions

Operator based install for KubeArmor

KubeArmor supports multiple modes of deployment today, including using manifests files, helm, and using karmor cli tool.

However, operator based installation was desired for KubeArmor for following reasons:

  1. To handle the scenario where the cluster contains multiple nodes supporting different LSM (Linux Security Modules). KubeArmor cannot set the AppArmor annotation in context to the workload deployed on the node not supporting apparmor.
  2. There are certain services such as Kubearmor relay whose resource utilization depends on the number of nodes operating within the cluster.

Operator based installation and subsequent monitoring simplies handling of such scenarios.

With this release, the karmor cli tool or the helm/manifests will install the operator and then the operator will install the relevant daemonset and services needed.

Consolidation of controllers

Multiple controllers such as policy-controller, host-policy-controller were separately installed. The new release consolidates multiple controllers into a single pod reducing the overall number of kubearmor pods deployed in the cluster.

Kernel audit for getting policy violations

KubeArmor uses eBPF for two purposes:

  1. Get visibility/observability events into the workloads.
  2. To get alerts in the context of the policies

The operations involved in point 1 are straight forward i.e, kubearmor get a events, matches the events with the process, container, pod, namespace information and annotates the events and sends the event out to the clients waiting on the stream.

The operations involved in point 2 are tricky. When kubearmor gets an event, it needs to check whether the event parameters matches any of the policy specification/rules and if it does, generate an alert accordingly. The challenge here is that the matching operation is a non-trivial operation. Assume that the user has set the policy to block execution of /usr/bin/sleep binary. Now when the event is generated, the kretprobe of the sys_execve syscall is going to return "Permission Denied" since the LSM will block the event. Currently, KubeArmor matches the binary name and other contextual information with the policy rules that it has internally stored and check whether the event was triggered due to a policy violation. This matching operation is non-trivial. Note that the access could be denied permission for reasons outside the scope of KubeArmor i.e, due to capability LSM or due to other access control settings. Thus it should not be inferred that a "Permission Denied" event will always be triggered due to KubeArmor enforced policy decisions only.

What has changed?

Traditional LSMs such as AppArmor, SELinux, use Kernel Audit mechanism to send the policy violation events. Kernel Audit is supported across most of the kernels. Note that this change does not depend on userspace components such as auditd.

kernel-audit

Performance implications

This has a drastic positive impact on the performance of kubearmor since there is no policy-matching code involved in every system call hook.

KubeArmor passes AWS Foundational Technical Review (FTR)

The Amazon Foundational Technical Review (FTR) is a framework that enables AWS Partners to detect and remediate issues in solutions and products. It focuses on quality, reliability, and safety and outlines the best practices to meet the set requirements.

KubeArmor applied for an AWS Foundational Technical Review and fulfilled all the set criteria. Changes had to be done in KubeArmor to fulfill the requirements, especially towards the security side of elements. FTR requires that the containers do not use privileged mode. KubeArmor had to be updated to fulfill this requirement.

One of the outcomes of this review was that KubeArmor is now listed as an official AWS Partner Solution.

Get visibility into use of server ports

karmor summary of bind/syscalls

Profile application behavior

karmor profile

Clone this wiki locally