You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On some platforms such as Kubernetes or Docker Swarm, it's possible to pass sensitive configuration values to containers in files instead of environment variables. This is a good thing, and makes applications more secure.
Using secret files usually means the following dance:
Check for the variable we need in the process environment (so we can override a secret locally, for example).
If it isn't defined, check if a matching secret file exists.
If it does, read it, trim the content, and return that; a fallback, if given, otherwise.
Some software systems also use variables suffixed with _PATH, so instead of passing a password as an environment variable, you can pass the path of a file that contains it. This alters the flow to:
Check for the variable we need in the process environment.
If it isn't defined, check if a variable named {$variable}_PATH exists instead.
If it doesn't, or does not contain a valid filesystem path, return a fallback, if given.
Read the given path, trim the content, and return it.
It would be cool to have a reader available that does those things! In the larger picture, I'm trying to get this implemented in Laravel (see the related feature request).
Happy to provide a PR.
The text was updated successfully, but these errors were encountered:
Hi @GrahamCampbell
Thanks for your great project, I just want to inform you that I'm ready to implement this.
If you have a plan for it just let me know.
On some platforms such as Kubernetes or Docker Swarm, it's possible to pass sensitive configuration values to containers in files instead of environment variables. This is a good thing, and makes applications more secure.
Using secret files usually means the following dance:
Some software systems also use variables suffixed with
_PATH
, so instead of passing a password as an environment variable, you can pass the path of a file that contains it. This alters the flow to:{$variable}_PATH
exists instead.It would be cool to have a reader available that does those things! In the larger picture, I'm trying to get this implemented in Laravel (see the related feature request).
Happy to provide a PR.
The text was updated successfully, but these errors were encountered: