Skip to content

Commit 4e319ef

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 6134a41 commit 4e319ef

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)