automountServiceAccountToken
A pod or service account setting that controls whether an API token is mounted into the pod automatically.
An unneeded mounted token gives anyone who compromises the pod a way into the API.
In more detail
Most application pods never call the Kubernetes API, so setting it to false removes a credential an attacker could steal. Leave it on only for workloads that need API access.
Example
automountServiceAccountToken: falseRelated terms
- service account — An identity for a program rather than a person; in Kubernetes each pod runs as one and gets a signed token for it.
- projected service account token — A short-lived, signed token for a service account that the kubelet mounts into a pod and refreshes, valid only for a stated audience.
- least privilege — Giving every program and person only the access they need, and nothing more.
Taught in
- ServiceAccounts And Tokens — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ServiceAccounts: Take Back The Key — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Mock Exam: Seventeen Security Tasks Against The Clock — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Final Review: The Cluster You Would Defend — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Not The Admin Certificate: RBAC And ServiceAccounts — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- There Is No Users Table: Authentication — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Fundamentals Sprint: Four Findings, Eight Questions — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- The Report That Ate The Node: Denial Of Service And Malicious Code — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Four Alerts, One Incident: Observability And The Mesh — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Authentication, ServiceAccounts And Short Lived Tokens — Kubernetes: Production-Grade Container Orchestration