<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tracing Policy on Tetragon - eBPF-based Security Observability and Runtime Enforcement</title>
    <link>/docs/concepts/tracing-policy/</link>
    <description>Recent content in Tracing Policy on Tetragon - eBPF-based Security Observability and Runtime Enforcement</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="/docs/concepts/tracing-policy/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Example</title>
      <link>/docs/concepts/tracing-policy/example/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/example/</guid>
      <description>To discover TracingPolicy, let&amp;rsquo;s understand via an example that will be explained, part by part, in this document:&#xA;Warning This policy is for illustration purposes only and should not be used to restrict access to certain files. It can be easily bypassed by, for example, using hard links. apiVersion: cilium.io/v1alpha1 kind: TracingPolicy metadata: name: &amp;#34;fd-install&amp;#34; spec: kprobes: - call: &amp;#34;fd_install&amp;#34; syscall: false args: - index: 0 type: &amp;#34;int&amp;#34; - index: 1 type: &amp;#34;file&amp;#34; selectors: - matchArgs: - index: 1 operator: &amp;#34;Equal&amp;#34; values: - &amp;#34;/tmp/tetragon&amp;#34; matchActions: - action: Sigkill The policy checks for file descriptors being created, and sends a SIGKILL signal to any process that creates a file descriptor to a file named /tmp/tetragon.</description>
    </item>
    <item>
      <title>Argument types</title>
      <link>/docs/concepts/tracing-policy/argument_types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/argument_types/</guid>
      <description>Each argument definition specifies data type to be retrieved from kernel argument. The list contains simple POD types and several complex kernel objects that are represented by extracted data type.&#xA;List of described data types:&#xA;sint8, int8 uint8 sint16, int16 uint16 int, sint32, int32 uint32 long, sint64, int64 ulong, uint64, size_t string skb sock char_buf char_iovec filename fd cred const_buf nop bpf_attr perf_event bpf_map bpf_prog user_namespace capability kiocb iov_iter load_info module syscall64 kernel_cap_t cap_inheritable cap_permitted cap_effective linux_binprm data_loc net_device sockaddr socket file dentry path Note All integer types (int8, uint8, int16, uint16, int32, uint32, int64, uint64) support Equal, NotEqual, GT, LT, and Mask operators in matchArgs or matchData.</description>
    </item>
    <item>
      <title>Hook points</title>
      <link>/docs/concepts/tracing-policy/hooks/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/hooks/</guid>
      <description>Tetragon can hook into the kernel using kprobes and tracepoints, as well as in user-space programs using uprobes. Users can configure these hook points using the correspodning sections of the TracingPolicy specification (.spec). These hook points include arguments and return values that can be specified using the args and returnArg fields as detailed in the following sections.&#xA;Warning Hooking a system call can introduce time-of-check to time-of-use (TOCTOU) races when the relevant argument is a pointer to user-space memory.</description>
    </item>
    <item>
      <title>Options</title>
      <link>/docs/concepts/tracing-policy/options/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/options/</guid>
      <description>It&amp;rsquo;s possible to pass options through spec file as an array of name and value pairs:&#xA;spec: options: - name: &amp;#34;option-1&amp;#34; value: &amp;#34;True&amp;#34; - name: &amp;#34;option-2&amp;#34; value: &amp;#34;10&amp;#34; Options array is passed and processed by each hook used in the spec file that supports options. At the moment it&amp;rsquo;s availabe for kprobe and uprobe hooks.&#xA;Kprobe Options: options for kprobe hooks. Uprobe Options: options for uprobe hooks. Kprobe options disable-kprobe-multi: disable kprobe multi link disable-kprobe-multi This option disables kprobe multi link interface for all the kprobes defined in the spec file.</description>
    </item>
    <item>
      <title>Selectors</title>
      <link>/docs/concepts/tracing-policy/selectors/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/selectors/</guid>
      <description>Selectors enable per-hook in-kernel BPF filtering and actions. Each selector defines a set of filters as well as a set of (optional) actions to be performed if the selector filters match. Each hook can contain up to 5 selectors. If no selectors are defined on a hook, the default action (Post, i.e., post an event) will be used.&#xA;Each selector comprises a set of filters:&#xA;matchArgs: filter on the value of arguments.</description>
    </item>
    <item>
      <title>Tags</title>
      <link>/docs/concepts/tracing-policy/tags/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/tags/</guid>
      <description>Tags are optional fields of a Tracing Policy that are used to categorize generated events.&#xA;Introduction Tags are specified in Tracing policies and will be part of the generated event.&#xA;apiVersion: cilium.io/v1alpha1 kind: TracingPolicy metadata: name: &amp;#34;file-monitoring-filtered&amp;#34; spec: kprobes: - call: &amp;#34;security_file_permission&amp;#34; message: &amp;#34;Sensitive file system write operation&amp;#34; syscall: false args: - index: 0 type: &amp;#34;file&amp;#34; # (struct file *) used for getting the path - index: 1 type: &amp;#34;int&amp;#34; # 0x04 is MAY_READ, 0x02 is MAY_WRITE selectors: - matchArgs: - index: 0 operator: &amp;#34;Prefix&amp;#34; values: - &amp;#34;/etc&amp;#34; # Writes to sensitive directories - &amp;#34;/boot&amp;#34; - &amp;#34;/lib&amp;#34; - &amp;#34;/lib64&amp;#34; - &amp;#34;/bin&amp;#34; - &amp;#34;/usr/lib&amp;#34; - &amp;#34;/usr/local/lib&amp;#34; - &amp;#34;/usr/local/sbin&amp;#34; - &amp;#34;/usr/local/bin&amp;#34; - &amp;#34;/usr/bin&amp;#34; - &amp;#34;/usr/sbin&amp;#34; - &amp;#34;/var/log&amp;#34; # Writes to logs - &amp;#34;/dev/log&amp;#34; - &amp;#34;/root/.</description>
    </item>
    <item>
      <title>Kubernetes Identity Aware Policies</title>
      <link>/docs/concepts/tracing-policy/k8s-filtering/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/k8s-filtering/</guid>
      <description>Motivation Tetragon is configured via TracingPolicies. Broadly speaking, TracingPolicies define what situations Tetragon should react to and how. The what can be, for example, specific system calls with specific argument values. The how defines what action the Tetragon agent should perform when the specified situation occurs. The most common action is generating an event, but there are others (e.g., returning an error without executing the function or killing the corresponding process).</description>
    </item>
    <item>
      <title>Enforcement Mode</title>
      <link>/docs/concepts/tracing-policy/mode/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/docs/concepts/tracing-policy/mode/</guid>
      <description>Beyond monitoring, Tetragon tracing policies include enforcement actions. Configuring the mode of a policy allows you to disable enforcement in a policy, without modifying the policy itself.&#xA;A tracing policy can be set in two modes:&#xA;monitoring: enforcement operations are elided enforcement: enforcement operations are respected and performed Using the tetra CLI, you can inspect the mode of each policy. For example:&#xA;tetra tracingpolicy list Will produce out similar to:</description>
    </item>
  </channel>
</rss>
