You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/tasks/debug-application-cluster/audit.md
+3-103Lines changed: 3 additions & 103 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -489,111 +489,11 @@ Note that in addition to file output plugin, logstash has a variety of outputs t
489
489
let users route data where they want. For example, users can emit audit events to elasticsearch
490
490
plugin which supports full-text search and analytics.
491
491
492
-
## Webhook Collector Examples
493
492
494
-
### Use Falco to collect audit events
495
-
496
-
[Falco][falco_website] is an open source project for intrusion and abnormality detection for Cloud Native platforms.
497
-
This section describes how to set up Falco, how to send audit events to the Kubernetes Audit endpoint exposed by Falco, and how Falco applies a set of rules to automatically detect suspicious behavior.
498
-
499
-
#### Install Falco
500
-
501
-
Install Falco by using one of the following methods:
502
-
503
-
- [Standalone Falco][falco_installation]
504
-
- [Kubernetes DaemonSet][falco_installation]
505
-
- [Falco Helm Chart][falco_helm_chart]
506
-
507
-
Once Falco is installed make sure it is configured to expose the Audit webhook. To do so, use the following configuration:
508
-
509
-
```yaml
510
-
webserver:
511
-
enabled: true
512
-
listen_port: 8765
513
-
k8s_audit_endpoint: /k8s_audit
514
-
ssl_enabled: false
515
-
ssl_certificate: /etc/falco/falco.pem
516
-
```
517
-
518
-
This configuration is typically found in the `/etc/falco/falco.yaml` file. If Falco is installed as a Kubernetes DaemonSet, edit the `falco-config` ConfigMap and add this configuration.
519
-
520
-
#### Configure Kubernetes Audit
521
-
522
-
1. Create a [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) for the [kube-apiserver][kube-apiserver] webhook audit backend.
Rules devoted to Kubernetes Audit Events can be found in [k8s_audit_rules.yaml][falco_k8s_audit_rules]. If Audit Rules is installed as a native package or using the official Docker images, Falco copies the rules file to `/etc/falco/`, so they are available for use.
550
-
551
-
There are three classes of rules.
552
-
553
-
The first class of rules looks for suspicious or exceptional activities, such as:
554
-
555
-
- Any activity by an unauthorized or anonymous user.
556
-
- Creating a pod with an unknown or disallowed image.
557
-
- Creating a privileged pod, a pod mounting a sensitive filesystem from the host, or a pod using host networking.
558
-
- Creating a NodePort service.
559
-
- Creating a ConfigMap containing private credentials, such as passwords and cloud provider secrets.
560
-
- Attaching to or executing a command on a running pod.
561
-
- Creating a namespace external to a set of allowed namespaces.
562
-
- Creating a pod or service account in the kube-system or kube-public namespaces.
563
-
- Trying to modify or delete a system ClusterRole.
564
-
- Creating a ClusterRoleBinding to the cluster-admin role.
565
-
- Creating a ClusterRole with wildcarded verbs or resources. For example, overly permissive.
566
-
- Creating a ClusterRole with write permissions or a ClusterRole that can execute commands on pods.
567
-
568
-
A second class of rules tracks resources being created or destroyed, including:
569
-
570
-
- Deployments
571
-
- Services
572
-
- ConfigMaps
573
-
- Namespaces
574
-
- Service accounts
575
-
- Role/ClusterRoles
576
-
- Role/ClusterRoleBindings
577
-
578
-
The final class of rules simply displays any Audit Event received by Falco. This rule is disabled by default, as it can be quite noisy.
579
-
580
-
For further details, see [Kubernetes Audit Events][falco_ka_docs] in the Falco documentation.
[Falco](https://falco.org/) is an open source project for intrusion and abnormality detection for Cloud Native platforms.
14
+
This section describes how to set up Falco, how to send audit events to the Kubernetes Audit endpoint exposed by Falco, and how Falco applies a set of rules to automatically detect suspicious behavior.
15
+
16
+
{{% /capture %}}
17
+
18
+
{{% capture body %}}
19
+
20
+
21
+
#### Install Falco
22
+
23
+
Install Falco by using one of the following methods:
24
+
25
+
-[Standalone Falco][falco_installation]
26
+
-[Kubernetes DaemonSet][falco_installation]
27
+
-[Falco Helm Chart][falco_helm_chart]
28
+
29
+
Once Falco is installed make sure it is configured to expose the Audit webhook. To do so, use the following configuration:
30
+
31
+
```yaml
32
+
webserver:
33
+
enabled: true
34
+
listen_port: 8765
35
+
k8s_audit_endpoint: /k8s_audit
36
+
ssl_enabled: false
37
+
ssl_certificate: /etc/falco/falco.pem
38
+
```
39
+
40
+
This configuration is typically found in the `/etc/falco/falco.yaml` file. If Falco is installed as a Kubernetes DaemonSet, edit the `falco-config` ConfigMap and add this configuration.
41
+
42
+
#### Configure Kubernetes Audit
43
+
44
+
1. Create a [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) for the [kube-apiserver][kube-apiserver] webhook audit backend.
Rules devoted to Kubernetes Audit Events can be found in [k8s_audit_rules.yaml][falco_k8s_audit_rules]. If Audit Rules is installed as a native package or using the official Docker images, Falco copies the rules file to `/etc/falco/`, so they are available for use.
72
+
73
+
There are three classes of rules.
74
+
75
+
The first class of rules looks for suspicious or exceptional activities, such as:
76
+
77
+
- Any activity by an unauthorized or anonymous user.
78
+
- Creating a pod with an unknown or disallowed image.
79
+
- Creating a privileged pod, a pod mounting a sensitive filesystem from the host, or a pod using host networking.
80
+
- Creating a NodePort service.
81
+
- Creating a ConfigMap containing private credentials, such as passwords and cloud provider secrets.
82
+
- Attaching to or executing a command on a running pod.
83
+
- Creating a namespace external to a set of allowed namespaces.
84
+
- Creating a pod or service account in the kube-system or kube-public namespaces.
85
+
- Trying to modify or delete a system ClusterRole.
86
+
- Creating a ClusterRoleBinding to the cluster-admin role.
87
+
- Creating a ClusterRole with wildcarded verbs or resources. For example, overly permissive.
88
+
- Creating a ClusterRole with write permissions or a ClusterRole that can execute commands on pods.
89
+
90
+
A second class of rules tracks resources being created or destroyed, including:
91
+
92
+
- Deployments
93
+
- Services
94
+
- ConfigMaps
95
+
- Namespaces
96
+
- Service accounts
97
+
- Role/ClusterRoles
98
+
- Role/ClusterRoleBindings
99
+
100
+
The final class of rules simply displays any Audit Event received by Falco. This rule is disabled by default, as it can be quite noisy.
101
+
102
+
For further details, see [Kubernetes Audit Events][falco_ka_docs] in the Falco documentation.
0 commit comments