Hashicorp Vault v1.0
hashicorp.com
hashicorp.com
Since you need to request the key each time to decrypt things like key rotation become easier since you can do them centrally. Even if you can decrypt data X on a client node the key you got an hour ago for X doesn't work anymore, you must request a new one.
Then the server can do things like impose rate-limits. Maybe you can decrypt A-F, but only at a certain imposed rate, and alarms will be raised if the rate is exceeded.
The other aspect is that if secret rotation is well exercised, it means that in case of a breach, taking an instance out of commission and rotating all the secrets is not a risky task anymore. If developers copy-and-paste tokens on slack, the window of attack is limited to the TTL of the secret. It also prevents developers from using the same secret for another unrelated service.
Then you have to add in defenses for the active attack, such as rate limits, anomaly detection on access patterns for decryption keys, and the usual host and network based intrusion detection.
It's one part of a complete security strategy.
Does it? Is there any example on when encrypted data and a key in ones possession can be prevented from decryption?
One approach is that the app server doesn’t possess the encryption key at all (or at least not the master key). Instead, it calls a remote service to decrypt each item as needed (or the item-level data key aka envelope encryption key).
In this way, an attacker can compromise the entire data set and the app server, but they still can't decrypt the data. They have to maintain ongoing access to a compromised app server in order to decrypt data items one by one, which (i) could take a long time for large data sets (ii) can be slowed down by rate-limiting (iii) runs the risk of being noticed (iv) if detected, attacker's access can be shut off immediately.
Additionally, you might manage and monitor your key management servers differently than your app servers; for example, you have the expectation that no one will ever log into key servers routinely, so any interactive access or unexpected running processes can generate alarms. The set of people who have access to key servers is different and much more limited than the set of people who have access to the app server. The key server can run in a different virtual network from the app server while providing extremely limited access to the app server (just e.g. TCP on the one port needed to provide this service).
This approach contrasts to schemes where the app server or data store has an encryption key. If the attacker compromises that, they can lift the entire data set and encryption key out of your systems and process it later -- and it's irretrievably gone. With the key server approach, stolen encrypted data provides no value on its own, and the attacker needs ongoing access to the key server to make sense of the data.
Another aspect is separation of responsibility - don't forget insider-risk. Security is a process, not a product, as the cliche goes.
Where I work, we use Vault for (among other things) authentication between internal services. The developers do not have access to Vault and never see tokens/certs/passwords/etc, which are created by a different group. So if you want to run a rogue service, you need a conspiracy across departments, increasing your risk of detection.
Same principle you see in accounting, of course. You develop process, loci of responsibility and audit trails designed to enable the desired outcomes while at the same time making attempts to defraud the system impossible, obvious, or investigable after the fact, in descending order of preference.
Or a developer that plants a back door in the code. He then exploits it on the production server.
Maybe time is better spent on code reviews ?
It's worth considering that multiple approaches, across multiple departments, can be used. A good environment might use Vault for authentication between services and require that code cannot go into production without a review and enforce it in code. Then you tightly control who has access to the administration of those restrictions and log all usage to somewhere else, such that even if someone does compromise the infrastructure to allow them to insert their back door it can be detected and the culprit identified.
Again, you're completely right. Code reviews can be a great way to spot malicious code! You're also right that the Vault usage pattern that parent pointed to definitely has vulnerabilities. It's perhaps worth considering that this approach could be used in a context where it might not be the only defense. Perhaps you could ask parent for a more detailed explanation of their org's information security practices?
Another point worth noting about insider threats: overconfidence on the part of the attacker is frequently the defenders' friend. Metaphorically speaking, the crook knows about the camera over the door and will avoid showing their face to it, but didn't notice the other ones. And because they work there, they think they have a better handle on how things work than they actually do.
It is also good for syncing secrets across multiple servers, and for keeping the secret up to date, if you have a password that needs to update nightly or monthly or whatever.
Vaults like this allow you to not have that cryptographic material on the server.
Now, this doesn't solve all problems. As you mentioned, when you have breached server security you have access to everything.
But, there are other problematic situations that this helps solve. Now you don't have to provide secrets when you are building images and you will not have secrets on the filesystem when somebody only gains partial access that lets him only read files.
This also lets you see who and when is accessing secrets and lets you manage secrets (think how you are going to replace database password?)
Sure, this means provisioning VM's requires human interaction to unlock the vault (once) during a kickstart. So what. I'd rather do that than have plaintext or even pre-hashed passwords lying around in source control.
As others have pointed out, Hashicorp Vault seems like a good solution to the problems of another Hashicorp product ... Terraform, which used to keep passwords in its state files (not sure if it still does).
https://docs.ansible.com/ansible/2.5/plugins/lookup/hashi_va...
Ansible is gradually adding modules for about everything. It's come along way since I started using it back in the 1.8 or 1.9 days.
Vault offers features such as short-term secrets which are unique to each client. Vault itself manages creation and destruction of the credentials on the server, allowing it to enforce credential lifetimes
And by in house, I presume you would mean within a cloud hosted environment, eg. AWS VDC, Google Cloud etc. in the most common case.
On the other hand, we're running a lot of mutual TLS authentication via CAs in vault. Vault has the private key of these CAs, and authenticated hosts can request signed client certificates for these CA chains. In this case, vault enforces certificate parameters, TTLs, CLR and other things. You could keep requesting certs, but once I revoke the vault authentication you stole, you're done once the certificate expires within 3 days.
And on top of that - yes, it's possible to escalate to vault using local credentials for vault. However, that's a very different threat level. Botnets won't abuse your vault instance. Heck, script kiddies wouldn't know how to abuse your vault instance after getting shell access.
If someone can RCE into a box, and find your vault integration, and abuse your vault integration, you're in for a ride and usually, vault won't be your problem at this point.
For our deployments, we generate a single token with a max # of uses that matches the target server count for our deploy and also a very short TTL of 5 seconds. Our code gets pushed and the token is passed to each server (in an env var) during that time and a command is passed to refresh environment vars with secrets from Vault. So if a token gets compromised it's very likely to be used up and/or expired.
For smaller orgs and projects, Mozilla Sops is really great:
https://github.com/mozilla/sops
It encrypts your secrets at rest using Google KMS, Amazon KMS, and various other cloud provider key services. You can then put those secrets into your code repository, cloud file storage, etc. and give your build pipeline a service account with the ability to decrypt the secret files.
Scales like crap, but is quick and dirty when you need it.
This is why saas is preferable in a lot of situations. If you're not great at ops and make bad decisions, hopefully the SAAS folks are better at this than you. If you're really good at ops and think a ton about this stuff, then running it yourself makes sense a lot of time. And yes with SAAS now you have lockin and other problems which has their own set of solutions you should make sure you are doing, like layers of abstraction.
Then you get into the self-fulfilling-infrastructure scenario. We're a vault shop, everyone use vault even for stuff that makes no sense to use vault for. Then rinse and repeat.
Or you get into the sunk cost fallacy with your ops team... "what will they do if we replace this with a SAAS", so you keep services around just to not fire people, not because they're the best solution anymore.
Lots of places to make bad decisions.
I'm pointing out the whole "just run my pod" thing with tfn, or kube, leads people to thinking they're installing a phone app, not a multi-host, multi-protocol piece of software.
We're in violent agreement. We're just disagreeing about what the average person assumes.
I think there is a network effect to Vault that the more locks it can change the more people will use it and the more plugins will be added to it.
I think Vault is hard to use and we're thinking of integrating it in GitLab to give it a friendly UI [1].
0. https://www.vaultproject.io/docs/secrets/databases/index.htm...
You can use the "random" provider to generate secrets, the "tls" provider to generate certs and I also wrote a "secret" provider[1] to hold arbitrary secrets.
The best part is that it doesn't require to maintain a long-running process. For small shops it's a good upgrade over storing credentials in code or using git-crypt.
TLDR: Terraform should use Vault for storing secrets in state, but does not support it yet.
(it is occasionally unavoidable storing secrets in state due to resources orchestrated)
SOPS is fine, I was more referring to my implementation.
The reason my pipeline scales poorly is because it requires a full build and deployment cycle to update my dev / stg / prod configurations.
Also, if you store the encrypted files in our git repos as I do, you get constant merge conflicts and basically useless git history.
It is an extremely lazy implementation and literally the bare minimum I could do to get get my application configurations updating in my CI/CD stack.
I’ve been extremely happy working with HashiCorp tools for the past several years.
Vault provides sooooo much out of the box, it’s hard for me to imagine spinning up a new project without it anymore. Which leads to my biggest fear...my jaded-self is expecting an ‘unfriendly’ acquisition (Microsoft, Alphabet) and/or some onerous licensing/pricing changes.
Congrats Hashicorp. Huge fan of your work!
I've been looking at Vault for implementing envelope encryption and using Amazon KMS's API for encrypting keys is very similar.
If anyone could correct me if I'm wrong, that would be great.
Note that with AWS IAM auth, AWS is a trusted third party, and accounts with high-powered IAM access (think AWS admins) end up having a great deal of authority in Vault, too. But for us, at least, these assumptions are reasonable.
I wish companies would publish their "whale sized" pricing. I know they're coming up with different pricing for different customers but it'd be great to be able to put a stake in the ground to make a judgement of utility. $40k / month with a warranty or SLA on patches is a lot cheaper than a team of "devops" maintaining it on their own (assuming it's core to the business ops).
We'd like to make more of Vault Enterprise available to smaller companies with lower palatable price points. This will be reflected in certain features omitted as well as a lower level of support.
For now, please understand that our target _enterprise/commercial_ customer at the moment are Global 2000-esque companies. We currently have almost 10% of the global 2K as paying customers of Vault Enterprise. The features we've built along with the support you get reflect that (dedicated TAMs and so on). But we recognize that certain features of Vault Enterprise would be useful to smaller companies (replication and so forth).
To that end, we're currently planning some new packaging/pricing aimed at this type of user. I have no timelines on when we'd publish that, but its something we're actively doing now. This should make Vault Enterprise more affordable by smaller companies (think 5-figures/year instead of 6-figures/year).
Meanwhile, we're also making more "quality of life" features like auto-unseal available in Open Source. As we continue to add more features and value aimed directly at the Enterprise user, this lets us reevaluate and move more features into OSS and we have continued to do so throughout the life of Vault Enterprise. We hope this helps smaller companies adopt Vault successfully. And note that this is a great example of the model working: our success in Vault has funded growth in Vault staffing and that growth in Vault staffing has directly led to more OSS features and the growth in funding has led to our ability to more confidently make more features free. The community plays a huge role here, too. This is exactly how we intend for it to work!
One thing we learned rather painfully is that selling to the 4-figure vs 5-figure vs 6-figure vs. 7-figure/year customer is each a _very_ different company-building exercise. The expectations of the 7-figure customer (and we have a number of those) is dedicated TAMs, dedicated support reps, quarterly in-person meetings about the state of the install, high impact on the roadmap, and much much more. That of course requires a certain kind of staffing. Very often this staffing scales "down" to lower price points but very rarely does the staffing at lower price points scale "up" to higher price points.
As a company, we chose to go after the large enterprise deals first. This of course alienates some of the smaller deals since the large deals suck the air out of your org a bit. But as we've acquired more and more customers, grown, acquired more funding, etc. we're moving in that direction rapidly.
So, hopefully we'll get there soon! I'm sorry that you were quoted at a point that didn't work for us mutually and I'm glad you find an alternate solution that worked for you. For others in a similar position: we're working on it!
I'm a fan of pretty much everything you guys do, and like how you design and architect your products, but haven't yet crossed into the paid plans (haven't had the volume for it). And although a 5 figure sum is manageable for some of my customers (but still a tougher sell since they aren't technical), a six-figure sum just would never work since they aren't technical and just can't wrap their heads around why this is so important. Especially if they ask "can you guarantee I won't get hacked if I spend this money?" and I say "no, definitely not, but you'll be safer."
A SaaS model would work wonders for the next tier, the Fortune 5,000,000.
I had to kill a rollout of Vault at one billion dollar (revenue) company for the following reasons:
* the engineers doing the PoC could not/would not document how to operate it in production
* the managers did not take the unsealing responsibility seriously ("I'm in mgmt., don't call me on Sundays again.")
* our network was perceived as flaky.
Some cheap solutions are:
* provide some pre-written runbooks for administering Vault that people can cut-and-paste into their wiki
* provide some diagrams and scenarios for unsealing that can be adopted
* have the Vault server monitor and log network health (latency, bad packets, etc.)
Unfortunately for engineers doing the deployment, Vault magnifies any weaknesses your organization already has. That's the nature of centralized key mgmt.
For example, I know one large company ended up using macros to unseal Vault to solve the key mgmt. problem I mentioned. In other words, the unseal keys are in plain text on the servers.
Probably happening more often than you would initially expect since nobody wants to drive down to the data center.
The remarkable thing with AWS KMS is that it's so seamless - it's idiot-proof compared to a self-hosted distributed system.
To keep it brief, we are more committed to Nomad today than before. The team has doubled in the last year, and we plan to grow further next year as well. Our goal has always been to build a simple, general purpose scheduler, that composes well with the rest of the HashiCorp ecosystem.
Kubernetes is an important ecosystem and a platform we tightly integrate with across our other products (Terraform, Consul, Vault). We've always believed that our tools would be "mixed and matched" with different technologies, and that pragmatically we should support the broadest range of integrations.
Nomad is an important piece of our ecosystem, and we have many open source users, enterprise customers, and our SaaS offerings are built on it. Rest assured, it's not going anywhere!
It seems like most features are OSS now.
Disclosure: I work at Lyft.
I ended up never using it, because it never really felt "perfect" to me.. There are so many circular dependencies between systems (DNS/Consul-Template/Consul/Vault/Ansible) and bootstrapping is just complete hell. Dive into that repo and witness it for yourself.
I can see myself using this setup if I was ever just doing Ops work, but when you are also doing everything else, it is just too much.
Anyways, congrats to the Hashicorp team. Your stuff really is topnotch.