Repository navigation
Conversation
…, `blocklistFailOnNonMatching` DO NOT MERGE WITHOUT UPDATE because this commit should be combined with the one that updates do the version that has `buildcatrust` PR nix-community/buildcatrust#19 in it, because the CLI flags change and `--blocklist` is an ambiguous Python `argparse` prefix with that version; then remove this note. Names in `blocklistIgnoreNonMatching` that match no certificate in the NSS store only produce a build-time warning instead of failing the build. `blocklistFailOnNonMatching` has the strict behaviour of `blacklist`, which is kept as a legacy name for it. Uses buildcatrust's new `--blocklist_ignoring_nonmatching_input`. Also pass `--blocklist_input` by its full name, because the abbreviation `--blocklist` is ambiguous since that buildcatrust version. See NixOS#249080 Assisted-By: Claude Opus 5.5, human review
Names in it that match no certificate in the Mozilla Trust Store only produce a build-time warning instead of failing the system build. Motivation: Upstream regularly removes CAs from the Mozilla Trust Store, and those are exactly the CAs users are most likely to blocklist. Failing the build in that case broke system builds, and with them `system.autoUpgrade`, thus stopping all automatic security updates until somebody edited the blocklist by hand. It also meant that blocklists could not be shared across NixOS releases. `caCertificateBlacklist` keeps its strict behaviour, as a deprecated alias of the new `caCertificateBlocklistFailOnNonMatching`. Its deprecation warning explains that drawback and recommends `caCertificateBlocklistIgnoreNonMatching`. Fixes NixOS#249080 Assisted-By: Claude Opus 5.5, human review
There was a problem hiding this comment.
Thanks for contributing to the documentation.
Follow the documentation style guide, especially:
- Show, don’t tell. Start with a minimal working example. Explain after the code.
- Avoid meta-commentary. Don’t write "This section explains how to…".
- Use present tense, imperative mood, and active voice. For example: "Run the command," not "The user should run the following command."
- Avoid vague references like "this" when the referent is unclear. Write "This command creates a folder," not "This will create a folder."
- Be direct. Avoid "should", "might", "typically", and "usually".
- Cut filler words like "simply", "just", "easily", and "basically". Use "to" instead of "in order to".
For larger changes, such as adding or removing whole sections, ask the NixOS documentation team for review.
Ma27
left a comment
There was a problem hiding this comment.
So, in general I think that's a fair approach moving forward.
That being said, one question for my own understanding: the eMudhra mitigation was applied via the module system before the cacert update landed such that people didn't have to await the staging cycle (16ac0cd, revert in f903b88).
Now, reflecting on the discussion I do see your point of stuck security updates being bad and especially on stable moving forward should(tm) instead always be possible.
I'm asking this question because that might be a reason to give a stronger recommendation for end-users to prefer the failing option and make the non-failing one a "you have to know what you're doing" thing (honestly, I'm not sure if beginner-me would have been able to reasonably verify such a change).
|
@Ma27 I don't properly understand your question. In Maybe you mean: "blacklist in (16ac0cd, revert in f903b88) didn't not break updates, because the revert is also what brought the new It's all other users of the option that accidentally break updates. For example, https://emudhra.we-have-a-problem.com/#linux contains
and I, too, used
I totally get the need to verify if these strings people mark as forbidden, are the right ones. If instead of
is a good one. That said, even this typo-finding help cannot guarantee exhaustiveness, e.g. the merged mitigation included which is more entries than emudhra.we-have-a-problem.com suggested, and no typo-finding error would help with pointing out missing entries. Based on that, I think it is fine to argue that nixpkgs should be "more allowed" to use But it's still a somewhat weak argument, because if a user instead of the blocklist option patched That's why I think it's best, for both nixpkgs and users in I think this is a sensible argument, and common practice with such blocklists. For example, for "Copy Fail" people blocklisted the Let me know if I that answers the question! |
|
@Ma27 Just checking in what you think about the above. |
|
Apologies for not replying earlier, thanks for paging me! So, long story short I think my first question could've been reduced to "why bother blocking CAs yourself if nixpkgs does it already for you at all?", coming back with a fresh mind I see at least two reasons for this:
Now, I didn't intend to argue against this, but I was mostly wondering if the docs should say something along the lines of "Use caCertificateBlocklistFailOnNonMatching unless you know what you're doing" given I considered the case you ran into rather unlikely. Looking back at this (including the additional information about the recommendation to ignore on we-have-a-problem.com) I think the way you present both options in the docs is fine, so nothing to address here from my side. |
@Ma27 I think the biggest reason for that is "anybody can do that way faster (mitigating immeidatly) than it takes NixOS to do a channel update". And I think that's a good idea, so also think it's good that we-have-a-problem.com recommends a mitigation. It just doesn't recommend a good mitigation because NixOS so far didn't provide the right option it could use for it. That's also why I don't find the situation too unlikely. @lukegb Would you have a chance to check out nix-community/buildcatrust#19 ? Then I could make this a non-draft-PR. |
Fixes #249080.
Removes the security-update-breaking naming footgun explained in #249080 (comment).
The two options can be combined at will, e.g. if for some reason you really like the build/update-breaking behaviour of
caCertificateBlocklistFailOnNonMatching, e.g. because you want to distrust a CA that Mozilla won't remove from the list, and want to be protect against that one being renamed at Mozilla, you can usecaCertificateBlocklistFailOnNonMatchingfor that in addition with normal CA-security mitigations viacaCertificateBlocklistIgnoreNonMatchingthat are sensible for most users.TODO
--blocklist_ignoring_nonmatching_inputnix-community/buildcatrust#19DO NOT MERGE WITHOUT UPDATE: cacert: addblocklistIgnoreNonMatching,blocklistFailOnNonMatching) needs to be amended, to include the update ofbuildcatrust` in nixpkgs that has the new flags.If the merge is done, anybody feel free to hijack this PR to put the new version in please, as i have time this weekend but probably not so much after.
Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.