Skip to content

Commit

Permalink
add apparmor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
achrefbensaad committed Nov 8, 2022
1 parent e2fe22f commit 23ddab6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions getting-started/kubearmor_apparmor_implementation_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# KubeArmor AppArmor implementation overview

Kubearmor support enforcing policies on systems running apparmor.

## Implementation overview

![Action Conflict](./resources/kubearmor-Apparmor-internals.png)

Upon the detection of a new Pod or a new policy, KubeArmor will launch a policy matching process that works as follow:

- If a new pod is detected, KubeArmor will only search for policies that matches that perticular pod.
- If a new policy is detected, KubeArmor will search for all pods that the policy include.

When all policies areidentified , KubeArmor combine all policies into a single policy, if two policies are conflicting KubeArmor will resolve this conflict.

Once we have a single policy, KubeArmor will generate and load the corresponding AppArmor profile(s).


## AppArmor profile domain transition

KubeArmor makes a heavy use of apparmor domain transition in order to honor `fromSource` rules.

The domain transion is made possible using the `px` permission in apparmor.

![Action Conflict](./resources/Apparmor-domain-transition.png)

The above figure illustrate how we decide that we need to perform a domain transition for a certain binary.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 23ddab6

Please sign in to comment.