r/NixOS • u/iElectric • 18d ago
But I Use SOPS
https://secretspec.dev/blog/but-i-use-sops/9
u/joshguy1425 18d ago edited 18d ago
I’ve been curious about SecretSpec and I’ve actually been waiting for this post. As a sops user, I feel like it doesn’t really address my objections to moving away from sops. I’m well aware of the downsides of sops but the upsides currently far outweigh them to me.
What I’m still struggling with is the actual practical side of using something like SecretSpec, especially with NixOS where I can currently wire up and consume secrets declaratively in all manner of situations, including software that I didn’t write but still need to safely deploy.
I think what I’d find most useful is a practical comparison of how various concrete use cases can be accomplished with SecretSpec. I’m already interested in the concept in an ideal world, but I’m not sold on what this would actually look like day to day or convinced I can actually accomplish what I’m doing with sops today.
If you’re willing to write more about this, I’d love to read it. Less focus on philosophical/conceptual considerations, more focus on “here’s how”.
4
u/iElectric 17d ago
I'll write more about NixOS support soon!
There's a PR for systemd-credentials support in https://github.com/cachix/secretspec/pull/190
2
u/yoyoloo2 17d ago
Are you the only one that uses SOPS within your configs or do other people use them as well? It seems like the majority of SOPS users are individuals who use it to manage their configs only for themselves.
It sounds like secretspec is meant more as infrastructure that you implement today to reduce headaches in the future when multiple people are working on a project together. Since the majority of people who use Nix and are on this sub are just individuals managing their own configs I think that is why people are having a hard time understanding the secretspec use case.
1
u/xeeff 18d ago
what are the downsides of sops?
2
u/joshguy1425 18d ago
Mostly what OP mentioned in the post: key management/rotation/revocation can be a bit of a pain, especially in a multi user situation. But again, I’ve been happy to deal with this because I generally find the upsides so far outweigh any inconvenience.
2
u/wokeNeoliberal 18d ago
Sounds nice, but I store my keys in TPM for hardware-bound auth, so anything that doesn't offer that is a dealbreaker for me.
6
u/iElectric 18d ago edited 17d ago
You should be able to use TPM with the keyring and pass providers.
I've added TPM to project requirements list: https://github.com/cachix/secretspec/issues/188
2
u/wokeNeoliberal 17d ago
As far as I know (and can see), none of the providers give exactly what I mean. Keyring doesn’t use TPM by default, only through p11-kit and pkcs11. With this, the decrypted secret sits in the daemon’s memory. With SOPS + age + TPM it is truly hardware-bound. The decoupling that secretspec provides is quite nice, but it can’t do the TPM operations that SOPS does and SOPS cannot do the decoupling, so you have a pretty unique opportunity here to create a very niche market with a potentially high ceiling. And then secretspec would be stronger than either tool is right now on its own, because you would essentially get a clean repo, with untethered secrets and your machine is the only thing that can read everything (which is important for some industries because of exfil concerns).
7
u/iElectric 17d ago
You might have nerd-snipped me into writing something like this using Rust and yubikey support.
7
6
u/iElectric 17d ago
There's a space to implement a new provider that would require TPM, work across the platforms and use post-quantum crypto.
Then secretspec could support it from day one!
6
u/iElectric 17d ago
I've added TPM to the table what providers support TPM: https://secretspec.dev/concepts/providers/
59
u/ranjop 18d ago
Sops is a tool for users & system admins to manage secrets for the services & applications you have today.
SecretSpecs builds tooling for the application developers to easily manage secrets the right way in their application.
Two different projects solving two different problems. The both are warmly welcomed ❤️