Skip to content

Commit

Permalink
rule(list allowed_k8s_users): Add vertical pod autoscaler as known k8…
Browse files Browse the repository at this point in the history
…s users

https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler

Example alert:
---
K8s Operation performed by user not in allowed list of
users (user=vpa-recommender target=vpa-recommender/endpoints verb=update
uri=core/v1/namespaces/kube-system/endpoints/vpa-recommender resp=200)

K8s Operation performed by user not in allowed list of
users (user=vpa-updater target=vpa-updater/endpoints verb=update
uri=core/v1/namespaces/kube-system/endpoints/vpa-updater resp=200)
---

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
  • Loading branch information
mstemm committed May 20, 2020
1 parent e47fc02 commit 048b33a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rules/k8s_audit_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@

# If you wish to restrict activity to a specific set of users, override/append to this list.
# users created by kops are included
- list: vertical_pod_autoscaler_users
items: ["vpa-recommender", "vpa-updater"]

- list: allowed_k8s_users
items: ["minikube", "minikube-user", "kubelet", "kops", "admin", "kube", "kube-proxy"]
items: [
"minikube", "minikube-user", "kubelet", "kops", "admin", "kube", "kube-proxy",
vertical_pod_autoscaler_users,
]

- rule: Disallowed K8s User
desc: Detect any k8s operation by users outside of an allowed set of users.
Expand Down

0 comments on commit 048b33a

Please sign in to comment.