!9IQChSjwSHXPPWTa:lix.systems

Lix

1125 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms305 Servers

Load older messages


SenderMessageTime
2 Feb 2026
@raitobezarius:matrix.orgraitobezariusthen in OpenBao, you can create policies/entities tied to these derivations21:59:10
@raitobezarius:matrix.orgraitobezariusa couple of golang that you love so much :P21:59:28
@raitobezarius:matrix.orgraitobezarius* a couple of golang lines that you love so much :P21:59:39
@jlamur:matrix.orgJules LamurI think that the problem then is what information exactly can OpenBao use to identify that the drv is really the one it pretends to be? Even if the nix daemon responded with the full derivation text, how can you securely identify that the derivation should have access to that secret and that it's not another one (eg. a compromised third party dependency or even an unrelated project) trying to steal that?22:03:29
@raitobezarius:matrix.orgraitobezarius well going from all builds can access to my secrets to "only the builds i care about" can access my secrets needs to solve that problem anyway 22:04:26
@raitobezarius:matrix.orgraitobezarius if you go like *-$pname-$version is allowed to access to sb-signing-key, then, any derivation that names itself pname = $pname; version = $version; can hijack the secret, yes 22:04:55
@raitobezarius:matrix.orgraitobezariusbut the problem is somewhat inherent to obtaining secrets inside sandboxes i feel like22:05:30
@raitobezarius:matrix.orgraitobezariusinstead, if you have channel scripts / release engineering scripts that calls into the attribute you care about, build it and then take the signing outside the sandbox, this problem is alleviated22:05:55
@jlamur:matrix.orgJules LamurIt might be okay-ish to accept that for fetchGit or similar functions because you can check the URL and match on that. But (to refer to my previous example) in the case of signing binaries/UKIs you can't accept that risk I guess?22:06:05
@raitobezarius:matrix.orgraitobezariusyeah i don't know how to make that secure for signing binaries22:07:39
@raitobezarius:matrix.orgraitobezariusyou either need a way to prevent attackers to schedule builds to get themselves whatever they want signed22:08:00
@raitobezarius:matrix.orgraitobezariusor22:08:01
@raitobezarius:matrix.orgraitobezariusyou need another channel to register the exact drvhash of what is allowed to be signed22:08:09
@raitobezarius:matrix.orgraitobezariussome steps in the CD where you eval your stuff, get the drvpath associated to the attribute you want, send it to openbao for ACL updates22:08:34
@raitobezarius:matrix.orgraitobezariusbut basically it's also trusting the eval pipeline or something22:08:55
@jlamur:matrix.orgJules Lamur the other channel I proposed was the CLI flags --secret, --allow-secret (or something at inputs/outputs level in flakes) :) One could also image a secrets.nix passed to the cli, eg. nix-build --secrets ./secrets.nix 22:13:43
@jlamur:matrix.orgJules LamurI have to admit that this is probably the best counter-argument to implementing any of that 😅22:14:59
@raitobezarius:matrix.orgraitobezariusbut almost everything ends up trusting the eval pipeline if there's no clear architecture22:15:40
@raitobezarius:matrix.orgraitobezariusincluding the solution where you sign off the sandbox22:15:47
@raitobezarius:matrix.orgraitobezariusbecause somewhere you push artifacts in some cache or S3 and you get them back somewhere else by evaluating what you need or querying a CD system with jobs and what not22:16:04
@raitobezarius:matrix.orgraitobezariusbut that CD system would have done the eval for you22:16:11
@raitobezarius:matrix.orgraitobezariusintroducing the concept of secrets into nix that way makes me nervous but not sure i have clear arguments on why22:16:43
@raitobezarius:matrix.orgraitobezariusalso i still have this feeling that it shouldn't be the invocation's role to tell what is allowed to access a secret or not, because if you are the attacker and you can control that invocation you can simply authorize your own hacked derivation to access the secrets22:17:47
@embr:fairydust.spaceembr
In reply to @raitobezarius:matrix.org
introducing the concept of secrets into nix that way makes me nervous but not sure i have clear arguments on why
(my gut reaction to this is "don't put secrets in the nix store" is nice and straightforward, making it more complicated feels like it could easily become a footgun that one day leads to disaster)
22:18:11
@raitobezarius:matrix.orgraitobezariusyeah but here it's not a trivial "putting secrets in the nix store"22:18:30
@raitobezarius:matrix.orgraitobezariusif you have a socket in the sandbox and you use it to sign a binary and put a signed binary in the store22:18:39
@raitobezarius:matrix.orgraitobezariusyou are not putting secrets in the nix store22:18:44
@raitobezarius:matrix.orgraitobezariusthis property is held22:18:48
@raitobezarius:matrix.orgraitobezarius(the socket sandbox can be backed by a PKCS#11 over UDS signer for example)22:19:08
@raitobezarius:matrix.orgraitobezariusobviously if people starts pulling key material in the sandbox that way and accidentally write them in $out22:19:27

Show newer messages


Back to Room ListRoom Version: 10