!9IQChSjwSHXPPWTa:lix.systems

Lix

1123 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
@jlamur:matrix.orgJules Lamur * without network and a cached tarball, nix3 with --refresh fails: warning: error: unable to download [...] but nix2 with the option tarball-ttl does not 🤷 21:35:45
@jlamur:matrix.orgJules Lamur *

without network and a cached tarball, nix3 with --refresh fails warns: warning: error: unable to download [...] but nix2 with the option tarball-ttl does not 🤷

(correction: it's a just a warning, maybe it's just not logged with nix2?)

21:38:14
@jlamur:matrix.orgJules Lamur * (after testing it a bit, I'm not sure that this option works as expected :/) 21:43:04
@jlamur:matrix.orgJules Lamur *

without network and a cached tarball, nix3 with --refresh fails warns: warning: error: unable to download [...] but nix2 with the option tarball-ttl does not 🤷

(correction: it's a just a warning, maybe it's just not logged with nix2?)

21:43:14
@jlamur:matrix.orgJules Lamur ^ PEBCAK, it does work, sorry for the noise. And WeetHet you probably want to set these other options to 0 too, I'm not sure: narinfo-cache-negative-ttl and narinfo-cache-positive-ttl. cf. https://git.lix.systems/lix-project/lix/src/commit/3d77ee8d94b3e8370bd85cd1430dd14dd475c3a7/lix/nix/main.cc#L646-L650 21:46:19
@raitobezarius:matrix.orgraitobezariusmy feeling is that you should never be able to ascribe the ACLs on the CLI or inside the drv params21:56:34
@raitobezarius:matrix.orgraitobezariusthe server should identify the derivation and consult its own ACL to authorize providing the secret or not21:56:47
@raitobezarius:matrix.orgraitobezarius but yeah a derivation may need a system feature like requiredSystemFeatures = [ "have-secret-X" ]; 21:56:59
@raitobezarius:matrix.orgraitobezariusso that the scheduler schedule it on a system with a extra-sandbox-path to the right UDS21:57:11
@raitobezarius:matrix.orgraitobezariusa trivial impl of the secret server could be an OpenBao with a "Nix extension" that pops that UDS and try to ask the local Nix daemon "is this (PID, UID, GID) the drv X that it is claiming it is?", if so, it provides the secrets21:58:49
@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

Show newer messages


Back to Room ListRoom Version: 10