News for hackers. Stuff that matters.
Re:Hashicorp Vault v1.0 by _zskd on Tuesday December 04, 2018 @02:04PM (#18602596)
Vault looks great, but I always balk at the operational overhead. Also the cost is significant. I'm at a tiny org, though.

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.

Re:Hashicorp Vault v1.0 by sytse on Tuesday December 04, 2018 @03:05PM (#18603147)
I think the unique value of Vault is not that it can change the locks so that old keys no longer work. For this it needs to understand how to reset keys on for example every database [0]. I don't think Sops does that.

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...

1. https://gitlab.com/gitlab-org/gitlab-ee/issues/7569

Re:Hashicorp Vault v1.0 by sethvargo on Tuesday December 04, 2018 @02:13PM (#18602709)
I agree on the operational load, but Vault is free. Did you mean Vault Enterprise? There's two versions - OSS and Enterprise, but a lot of small and mid-sized companies are able to use the free version at scale. Especially if you're a smaller org, OSS should be fine, so your costs are the VMs it's running on and the humans running it.
Re:Hashicorp Vault v1.0 by atmosx on Tuesday December 04, 2018 @03:20PM (#18603265)
I think he is talking about the burden of running a SPoF in highly available fashion, with backups, DR plans, monitoring, logging and all the baggage that comes with it.
Re:Hashicorp Vault v1.0 by sk5t on Tuesday December 04, 2018 @04:16PM (#18603665)
Right on. This is also what prevents me from using (unmanaged) Vault--not having the time to invest in learning the failure modes and internals, backup and restore strategies, in addition to the best ways to use it for the 5-10 patterns where it would become important.
Re:Hashicorp Vault v1.0 by zimbatm on Tuesday December 04, 2018 @03:28PM (#18603320)
Anther solution is to store secrets in the Terraform state and use a secured state backend (eg: S3+KMS) to share them. It makes key sharing and rotation a bit easier while not promoting copy-and-paste.

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.

[1]: https://github.com/tweag/terraform-provider-secret

Re:Hashicorp Vault v1.0 by yeukhon on Tuesday December 04, 2018 @08:58PM (#18605177)
You don't want to store secrets in state files. Imagine you run a CI/CD system where you run terraform plan. Now secrets is all public.
Re:Hashicorp Vault v1.0 by toomuchtodo on Tuesday December 04, 2018 @10:29PM (#18605484)
https://github.com/hashicorp/terraform/issues/516

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)

Re:Hashicorp Vault v1.0 by zimbatm on Wednesday December 05, 2018 @04:25AM (#18606816)
That's fine. Secrets are market as "sensitive" and not displayed in the plan output.
Re:Hashicorp Vault v1.0 by mlangenberg on Tuesday December 04, 2018 @02:16PM (#18602746)
As Cloud Auto Unseal is now part of the Open Source version, that mitigates the biggest operational overhead, doesn't it?
Re:Hashicorp Vault v1.0 by sethvargo on Tuesday December 04, 2018 @02:39PM (#18602933)
Correct, but it doesn't automate creation of new clusters (for dev, qa, stage, etc). You'd still need github.com/sethvargo/vault-init or similar to automate initialization, but unsealing can be automated in OSS now.
Re:Hashicorp Vault v1.0 by keeler on Tuesday December 04, 2018 @02:46PM (#18603000)
You can use terraform to deploy Vault clusters. There's also a Helm chart available for deploying Vault onto Kubernetes.
Re:Hashicorp Vault v1.0 by grogenaut on Tuesday December 04, 2018 @03:29PM (#18603326)
It is still infrastructure that you run, this is a real cost for lots of people. If you're running other people's terraform or whatever it's also a black box of software YOU are on the hook for but that you don't know anything about until you have to (3-5 hours after the service has been down).
Re:Hashicorp Vault v1.0 by keeler on Tuesday December 04, 2018 @04:11PM (#18603633)
But nobody's saying to run "other people's terraform or whatever," or that you should be running a sensitive service that you "don't know anything about until you have to." Common sense doesn't go out the window just because we're talking about hosting Vault within your infrastructure.
Re:Hashicorp Vault v1.0 by grogenaut on Tuesday December 04, 2018 @09:40PM (#18605310)
You would think, but that's exactly what tons of people do. Many people who do not include the cost of running a service in the cost. It's very easy when the install is nice and easy to just say "sweet it's running" and pat hands "it's done". Then you realize you have no idea what's going on when it's totes on fire. At least with hashi products they're open source so you have a chance. And there's enterprise support, but you're still bleeding till you can get them in to help you out and understand what insanity you did with their product.

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.

Re:Hashicorp Vault v1.0 by keeler on Wednesday December 05, 2018 @07:19AM (#18607591)
Again, I am not recommending that people run a service that they don't know how to operate.
Re:Hashicorp Vault v1.0 by grogenaut on Wednesday December 05, 2018 @12:21PM (#18610312)
You aren't, you're espousing a sane policy of actually understanding what you're doing; I agree with you.

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.

Re:Hashicorp Vault v1.0 by markpapadakis on Tuesday December 04, 2018 @02:51PM (#18603038)
Apologies for the blatant promotion attempt but you may want to check out our simple (in pretty much every sense) KMS implementation. https://github.com/phaistos-networks/KMS It’s inspired by vault and Google KMS and scales horizontally.
Re:Hashicorp Vault v1.0 by autrilla on Tuesday December 04, 2018 @02:32PM (#18602887)
Could you go further into why SOPS scales badly?
Re:Hashicorp Vault v1.0 by honkycat on Tuesday December 04, 2018 @11:50PM (#18605770)
Re:Hashicorp Vault v1.0 by meddlepal on Tuesday December 04, 2018 @03:40PM (#18603400)
Why does it scale like crap? Sops is on my shortlist to eval because we have a secrets mgmt problem.
Re:Hashicorp Vault v1.0 by honkycat on Tuesday December 04, 2018 @11:49PM (#18605767)
A few reasons.

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.

Re:Hashicorp Vault v1.0 by autrilla on Wednesday December 05, 2018 @09:10AM (#18608272)
We (Mozilla) store our SOPS-encrypted files in git repos and we don't really get merge conflicts, but that's just because we structure secret files in a way such that two people don't edit the same file at the same time often. Git history is also fine. Have you considered configuring SOPS as a differ for git?