Skip to content

Commit a7ac8ce

Browse files
committed
Restrict access to K8s secret token
The most of the containerized workloads do not need to interact with the Kubernetes API server and they don't need to read the token that is associated with the ServiceAccount used to create the Pod. This path can be blocked /var/run/secrets/kubernetes.io Signed-off-by: Michal Jura <[email protected]>
1 parent 917dfaf commit a7ac8ce

File tree

4 files changed

+407
-2
lines changed

4 files changed

+407
-2
lines changed

contrib/etc/lockc/lockc.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,10 @@ allowed_paths_access_baseline = [
379379
denied_paths_access_restricted = [
380380
"/proc/acpi",
381381
"/proc/sys",
382+
"/var/run/secrets/kubernetes.io",
382383
]
383384

384385
denied_paths_access_baseline = [
385386
"/proc/acpi",
387+
"/var/run/secrets/kubernetes.io",
386388
]

0 commit comments

Comments
 (0)