mounted secret file
A secret delivered to a program as a file with tight permissions, instead of as an environment variable.
In more detail
A file is read only when needed and is not inherited by child processes or dumped with the environment, which is why platforms that offer both usually recommend the file. Create it with a restrictive mode from the start rather than fixing permissions afterwards.
Related terms
- environment variable — A named setting such as PORT=8000 that a program reads from its surroundings when it starts.
- file permissions — Rules on each file saying which user and group own it and who may read, write or run it.
- Kubernetes Secret — A Kubernetes object for small sensitive values such as passwords and tokens, which pods can use as files or environment variables.
Taught in
- The Environment Variable Trap — Application Security & Threat Modeling for Engineers