-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enforcer: implement CleanupEnforcerNotification
This allows to specify an action (CleanupEnforcerNotification) that checks whether the enforcer notification succeeded. For example, the following policy: ``` apiVersion: cilium.io/v1alpha1 kind: TracingPolicy metadata: name: "kill-syscalls" spec: enforcers: - calls: - "sys_swapoff" # - "sys_getcpu" tracepoints: - subsystem: "raw_syscalls" event: "sys_enter" args: - index: 4 type: "syscall64" selectors: - matchArgs: - index: 0 operator: "InMap" values: - 309 # getcpu - 168 # swapoff matchActions: - action: "NotifyEnforcer" argError: -1 argSig: 9 - subsystem: "raw_syscalls" event: "sys_exit" selectors: - matchActions: - action: "CleanupEnforcerNotification" - action: "NoPost" ``` Detects missing notifications by adding such a function in the raw_syscalls/sys_exit tracepoint. This means that missed enforcements can be detected even if there is no other notifcation for the same thread. The metric output in this case would be: tetragon_enforcer_missed_notifications_total{info="getcpu",policy="kill-syscalls",reason="no_action"} 3 Signed-off-by: Kornilios Kourtis <[email protected]>
- Loading branch information
Showing
6 changed files
with
81 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters