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
building on the idea of (envkey/envkey-app#15) when you overwrite process.env you can also include getter/setters to keep track of if an Env is being used. Most of the time these would be set to a variable or the user opting into this would be aware of the getter/setters being tracked. Envkey can send up this data during an app's healthcheck. You can also track if the env was overwritten then send up data saying if the value was different from what was in Envkey. And you can even block get/set.
constenvkeys={// only secret keys that are set to be removed rather than static keys likeNODE_ENV: {get: function(){// batch track get events or even blockreturn'';},set: function(value){// batch track set events or even blockreturnvalue}}}Object.defineProperties(Object.getPrototypeOf(process.env),envkeys)returnenvkeys// the object returned from 'envkey/fetch' for when a user prefers the envkey object over process.env
Bonus Experiment
With get/set you can even limit key get requests during runtime onced a certain amount of time/useable before removing the values completely. This could prevent any future users from trying to access the envs if someone compromised a box or somehow managed to send up javascript requests to send down the process.env values. At the same time envkey would need to be versioned to determine the current state of all the envs at any given time and to see in the logs when a key was added/removed
The text was updated successfully, but these errors were encountered:
building on the idea of (envkey/envkey-app#15) when you overwrite process.env you can also include getter/setters to keep track of if an Env is being used. Most of the time these would be set to a variable or the user opting into this would be aware of the getter/setters being tracked. Envkey can send up this data during an app's healthcheck. You can also track if the env was overwritten then send up data saying if the value was different from what was in Envkey. And you can even block get/set.
Bonus Experiment
With get/set you can even limit key get requests during runtime onced a certain amount of time/useable before removing the values completely. This could prevent any future users from trying to access the envs if someone compromised a box or somehow managed to send up javascript requests to send down the process.env values. At the same time envkey would need to be versioned to determine the current state of all the envs at any given time and to see in the logs when a key was added/removed
The text was updated successfully, but these errors were encountered: