linkerd2/cli
Aran Shavit 351cc68b10
Manually mount serviceAccount token (#13186)
Subject
Disables "automountServiceAccountToken", instead manually mounts it as a projected volume where necessary

Problem
By default, kubernetes enables "automountServiceAccountToken" for all pods.
This poses a security risk, as pods might get kube-api permissions unintentionally.
More specifically, this fails security compliance tests:
https://learn.microsoft.com/en-us/azure/governance/policy/samples/built-in-policies
https://www.azadvertizer.net/azpolicyadvertizer/kubernetes_block-automount-token.html

Solution
Disable  "automountServiceAccountToken", create projected volume for the token, and mount it on relevant containers

Validation
Linkerd pods are able to access k8s API, work as expected (same as before)

Fixes #13108 
---------

Signed-off-by: Aran Shavit <Aranshavit@gmail.com>
2024-10-22 13:55:01 -05:00
..
cmd Manually mount serviceAccount token (#13186) 2024-10-22 13:55:01 -05:00
flag Introduce LINKERD_DOCKER_REGISTRY and flexibilize CI workflows (#6782) 2021-09-01 13:39:05 -05:00
table Add viz stat-inbound and viz stat-outbound commands (#12994) 2024-08-29 12:31:16 -07:00
Dockerfile build: add image source label to all Dockerfiles (#13042) 2024-09-10 11:25:32 -07:00
main.go Add `gosec` and `errcheck` lints (#7954) 2022-03-03 10:09:51 -07:00