A few things (mostly my opinion):
-
1. API Key! = Password
When you talk about API Keys, you are talking about a public token, which, as a rule, is already very secure. The current nature of the API is the need for some kind of preliminary authentication (at the application or user level) to create a more reliable level of security.
First, I guarantee what type of data you store in variables ENV. If these are clear passwords (for email, etc.), you might consider moving your installation to one of the cloud providers ( SendGrid/ Mandrilletc.), allowing only API keys to be used
API , , API.
-
2. ENV Vars OS-level
, . , TEMP HOME USERPROFILE, , , .
, , environment, . "", , .
ENV-. , -
, ENV , , .