Earlier quoted context omitted.
I used to store secrets in the FS, and was told the best practice was env vars. Now it's not env vars. What is it then?
There isn't a right answer. It's just that people don't understand that one doesn't provide any meaningful benefit over the other (in the context of storing secrets), but the security "experts" are always eager to claim "X is insecure, do Y instead, it's best practice btw" Unless I'm missing something, there are three scenarios where this comes up: 1. You are using a .env file to store secrets that will then be passe…
Show HN: From dotenv to dotenvx – better config management
201–210 of 223 posts
Re: Show HN: From dotenv to dotenvx – better config management
#202Can’t I somehow do this in the script itself so “ruby index.rb” is enough? I know I’m only saving a couple of characters in the command line but I’m asking out of curiosity.
Re: Show HN: From dotenv to dotenvx – better config management
#203Earlier quoted context omitted.
Disagree here. Basically if you use docker (which for most of the stuff you mention, you should), environment variables are pretty much how you configure your docker containers and a lot of sever software packaged up as docker containers expects to be configured this way. Building a lot of assumptions into your containers about where and how they are being deployed kind of defeats the point of using containers. You s…
> The right time to access secret stores is just before you start the container as part of the deploy process or vm startup in cloud environments. So how do you rotate secrets without bouncing app servers..?!
I like secret stores but only when the value of something regularly changes in a way that redeploying becomes unacceptable.
Re: Show HN: From dotenv to dotenvx – better config management
#204Earlier quoted context omitted.
There isn't a right answer. It's just that people don't understand that one doesn't provide any meaningful benefit over the other (in the context of storing secrets), but the security "experts" are always eager to claim "X is insecure, do Y instead, it's best practice btw" Unless I'm missing something, there are three scenarios where this comes up: 1. You are using a .env file to store secrets that will then be passe…
I’d wager that–in the context of web apps–over time there have been many more (or more readily exploitable) arbitrary file read/directory traversal/file inclusion vulnerabilities than remote code execution ones, so the preference for having secrets in memory as env vars may stem from that. You’re also probably not reading from /proc/self/mem without code execution either.
Re: Show HN: From dotenv to dotenvx – better config management
#205Something I have done for secrets is use a syntax in environment variables to tell the process to go a key vault for the secret. So we can have FOOPW=pw1 when testing locally, but FOOPW="{vault1:secret1}" in production. Env vars are processed simply by running a regex with callback that fetches secrets from vaults. This is quite flexible and has the advantage of being able to inject the secrets in the same place as o…
SOME_CONFIG_OPTION = @AWS::some_config_option
And I've written a config library that knows that when a config value starts with `@AWS::' it needs to resolve the config option to an actual value by reaching out to AWS's Secrets Manager service and looking it up there, in which case it receives the value and caches it locally so that subsequent references to this configuration option don't require an additional call out to the cloud.
It works surprisingly well.
Re: Show HN: From dotenv to dotenvx – better config management
#206Earlier quoted context omitted.
> Instead, read secrets from a vault or from a file-system from _inside_ your process. I’ve never liked making secrets available on the filesystem. Lots of security vulnerabilities have turned up over the years that let an attacker read an arbitrary file. If retrieving secrets is a completely different API from normal file IO (e.g. inject a Unix domain socket into each container, and the software running on that cont…
I used to store secrets in the FS, and was told the best practice was env vars. Now it's not env vars. What is it then?
Re: Show HN: From dotenv to dotenvx – better config management
#207Earlier quoted context omitted.
I used to store secrets in the FS, and was told the best practice was env vars. Now it's not env vars. What is it then?
There isn't a right answer. It's just that people don't understand that one doesn't provide any meaningful benefit over the other (in the context of storing secrets), but the security "experts" are always eager to claim "X is insecure, do Y instead, it's best practice btw" Unless I'm missing something, there are three scenarios where this comes up: 1. You are using a .env file to store secrets that will then be passe…
Re: Show HN: From dotenv to dotenvx – better config management
#208Earlier quoted context omitted.
There isn't a right answer. It's just that people don't understand that one doesn't provide any meaningful benefit over the other (in the context of storing secrets), but the security "experts" are always eager to claim "X is insecure, do Y instead, it's best practice btw" Unless I'm missing something, there are three scenarios where this comes up: 1. You are using a .env file to store secrets that will then be passe…
The main security benefit of byzantine paranoid security best practices is that they massively hinder productivity. If you can't make a system, the system will have no vulnerabilities.
Re: Show HN: From dotenv to dotenvx – better config management
#209I think it's good advice to not pass secrets through environment variables. Env vars leak a lot. Think php_info, Sentry, java vm dumps, etc. Also, env vars leak into sub-processes if you don't pay extra attention. Instead, read secrets from a vault or from a file-system from _inside_ your process. See also [1] (or [2] which discusses [1]). Dotnet does this pretty good with user secrets [3]. [1] https://blog.diogomoni…
Re: Show HN: From dotenv to dotenvx – better config management
#210Earlier quoted context omitted.
Did they say why? It strikes me that those envs might be particularly prone to corporate inertia, ieg "the current way passed security audit, don't change it or we need to requalify" It's possibly also harder to rely on a HSM when your software is in a container? ( I'm guessing here tho )
It's a useless, unproveable generalisation from a supposedly omniscient "insider". I know of at least one finance organisation using HSM as you'd expect.
It's irrelevant to me whether you believe it, it's happening today, and it happens with some of the top financial institutions and their subsidiaries and it's the same bureaucratic nonsense to move those teams to do something about it like it is anywhere else.