forked from sieve-project/sieve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sieve-audit-policy.yaml
62 lines (62 loc) · 2.2 KB
/
sieve-audit-policy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: audit.k8s.io/v1 # This is required.
kind: Policy
rules:
# A catch-all rule to log all requests
- level: RequestResponse
# Long-running requests like watches that fall under this rule will not
# generate an audit event in RequestReceived.
omitStages:
- "RequestReceived"
# # Log pod changes at RequestResponse level
# - level: RequestResponse
# resources:
# - group: ""
# resources: ["pods"]
# - group: ""
# resources: ["pods/log", "pods/status"]
# - group: ""
# resources: ["configmaps"]
# resourceNames: ["controller-leader"]
#
# # Don't log watch requests by the "system:kube-proxy" on endpoints or services
# - level: None
# users: ["system:kube-proxy"]
# verbs: ["watch"]
# resources:
# - group: "" # core API group
# resources: ["endpoints", "services"]
#
# # Don't log authenticated requests to certain non-resource URL paths.
# - level: None
# userGroups: ["system:authenticated"]
# nonResourceURLs:
# - "/api*" # Wildcard matching.
# - "/version"
#
# # Log the request body of configmap changes in kube-system.
# - level: Request
# resources:
# - group: "" # core API group
# resources: ["configmaps"]
# # This rule only applies to resources in the "kube-system" namespace.
# # The empty string "" can be used to select non-namespaced resources.
# namespaces: ["kube-system"]
#
# # Log configmap and secret changes in all other namespaces at the Metadata level.
# - level: Metadata
# resources:
# - group: "" # core API group
# resources: ["secrets", "configmaps"]
#
# # Log all other resources in core and extensions at the Request level.
# - level: Request
# resources:
# - group: "" # core API group
# - group: "extensions" # Version of group should NOT be included.
#
# # A catch-all rule to log all other requests at the Metadata level.
# - level: Metadata
# # Long-running requests like watches that fall under this rule will not
# # generate an audit event in RequestReceived.
# omitStages:
# - "RequestReceived"