The environment a plugin gives an OS process it starts.
A port's child inherits the node's whole environment unless told
otherwise, and the node's environment holds what the proxy itself runs
on: the vault key, the database URL, the session secret, the release
cookie. A host process runs code the proxy did not write (an operator's
command, a JVM running routes, a WASM runtime running tenants' modules),
and each has /proc/self/environ; a guard around that code that failed
would hand over the installation, not the one tenant.
Two answers, both in the shape Port.open/2's :env takes (a name with
false is unset in the child):
without_proxy_secrets/1unsets the proxy's own secrets and leaves everything else, for a process an operator configured and whose other variables (JAVA_HOME, a driver's own settings) are theirs to rely on;only/2unsets everything outside an allowlist, for a process that needs nothing from the environment.
Summary
Functions
Unsets every inherited variable whose name is not in allowed.
Unsets the proxy's own secrets in the child; every other variable is inherited.
Types
Functions
Unsets every inherited variable whose name is not in allowed.
Unsets the proxy's own secrets in the child; every other variable is inherited.