QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
532 stars 46 forks source link

Proposal: Base Distribution Developers = Derivative Developers #8945

Closed adrelanos closed 5 months ago

adrelanos commented 7 months ago

The problem you're addressing

Low review bandwidth for contributions to Qubes OS.

The solution you'd like

Proposal: Base Distribution Developers = Derivative Developers

The value to a user, and who that user might be

Higher review bandwidth for contributions to Qubes OS, faster review, merge process.

Proposal: Base Distribution Developers = Derivative Developers

This proposal outlines a strategy for increasing review bandwidth and development efficiency within Linux derivative projects by granting base distribution developers commit access for derivative distributions.

This proposal suggests a collaborative framework whereby developers from base Linux distributions, such as Debian or Fedora, are granted commit access within derivative Linux projects like Qubes. The aim is to leverage the established trust and vetting processes of larger distributions to expedite development, enhance security, and improve the implementation of bug fixes and feature requests in derivative distributions.

Version: 3.0

Definitions

Issue

Current State versus Potential Future State

Base Distributions:

Derivative Distributions - Current State:

Derivative Distributions - Potential Future State:

Solution

Advantages

Eligible Linux Base Distributions

Why Commit Access

What this is not

Questions and Answers

Qubes Specific

Footnotes

Improvements to this Proposal

Disclaimer

See Also

marmarek commented 7 months ago

Generally, I don't think this proposal named as it is makes sense. But I do agree some process changes are needed.

First of all, commit rights should be given based on (at least) two conditions:

Qubes as a whole is not just tweaked Fedora or tweaked Debian, it's a whole another abstraction level. You can be very proficient Debian Developer and not really good candidate for Qubes developer (or the other way around). But also, for the trust factor, just being Debian Developer means Debian template users needs to trust you anyway, but not necessarily Fedora template users, so the fact that Debian project trust a given developer shouldn't automatically give them right to commit to all qubes templates (*).

Historically, there was another issue: qubes-builder did not support different maintainers for different packages. This is fixed in qubes-builder v2 (including support for requiring multiple signatures if desired). This is not perfect, as being able to upload any package to the repository one can still compromise all users even if that package is not installed by default (for example by setting Enhances: dependency or similar), but still better than direct control of all packages, and de facto shell access to build servers as it was in legacy qubes-builder... BTW, this limitation wasn't the case for template build scripts (builder plugin), which is why we could grant access there (or in fact - use repository from outside QubesOS github org) for al long time already. So, starting with qubes-builder v2, we have technical means to extend maintainers for individual packages. In that case, I'd prefer this to be "at least 2 signatures", but possibly from a larger set of people. But they should be chosen based on their interaction with qubes community, past contributions etc, not necessarily (and definitely not only) with other projects (even if related).

BTW, I'd like to make a comment to the "Commit access versus review rights" point: yes, direct commit access is much more than review rights and possibly make things quicker. But also, it has huge impact on the trustworthiness of the whole project. You need just one backdoor (or more likely "bugdoor") to attack somebody (and heavily impact project reputation while at it). The more people have such power, the more likely it can happen (and that isn't only about intentional malice, but also about compromised development environment, signing keys etc). That's also why the "at least 2 signatures" rule above. On the other hand, posting reviews do help. And in fact it is a way to gain trust over time (and prove understanding of the system) - exactly the trait future maintainer should have. Of course the level of trust in external review very much depends on who does it, but for example your @adrelanos or @rustybird reviews are very valuable and help a lot. "Just" checking if a change is not actively malicious vs checking if it's functionally correct have very different complexities, with the latter requiring usually more time, and often some testing, but also not as much trust as the former.

(*) we don't separate packaging for different distributions from the code itself; while such split would indeed allow separate people maintaining those packages (Debian developers maintaining Debian packages, Fedora devs maintaining Fedora packages etc), it also means that many changes would require more work (now when you introduce new file, or change some location, you'd need it change it several repositories - code + all the packages, possibly involving several people). And since packaging-only changes are very rare (looking at commits history), such split in our case would not improve anything.

adrelanos commented 7 months ago

First of all, commit rights should be given based on (at least) two conditions:

  • trust
  • competence

Right.

But also, for the trust factor, just being Debian Developer means Debian template users needs to trust you anyway, but not necessarily Fedora template users, so the fact that Debian project trust a given developer shouldn't automatically give them right to commit to all qubes templates (*).

Yes, this is covered in the proposal here:

Examples for Qubes:

  • Debian developers would have an easy path to request commit access for Qubes Debian Templates.
  • Fedora developers would have an easy path to request commit access for Qubes Fedora Templates.
  • dom0? Intentionally left out in this proposal to see first if this proposal receives positive feedback. Could be considered later or stay as is.
marmarek commented 7 months ago

But also, for the trust factor, just being Debian Developer means Debian template users needs to trust you anyway, but not necessarily Fedora template users, so the fact that Debian project trust a given developer shouldn't automatically give them right to commit to all qubes templates (*).

Yes, this is covered in the proposal here:

Yes, and see the footnote to that sentence.

unman commented 7 months ago

This proposal reads like a boilerplate for derivatives, and not particularly relevant to Qubes.

In what way does the proposal ease the path for Debian developers to request commit access? Why cant they request commit access now? Are there any examples of DDs requesting commit access? And those requests not being dealt with?

More to the point, if a DD want to fix a bug in a Debian template, they should do it upstream. If it's a Qubes specific bug, then it's either appropriate to fix upstream, (as pertaining to Debian on virtualization), or it's not, in which case their DD status is irrelevant.

adrelanos commented 7 months ago

unman:

This proposal reads like a boilerplate for derivatives, and not particularly relevant to Qubes.

Written in a generic way indeed. But not copied/pasted from elsewhere. Invented by me.

In what way does the proposal ease the path for Debian developers to request commit access?

They're blessed eligible or at least being told they an easiser path may be ahead of them.

Why cant they request commit access now?

They could.

Also quoting from the proposal.

  • realism of contributions: How realistic is it that base distribution developers would contribute to derivative distributions? Unknown, but see above question. Worth trying. Effort is comparatively low. Maybe some will comment here.

Then also this doesn't matter if no existing base distribution developers request Qubes commit access. Then at least other interested contributors knew a way forward how that one day could be accomplished.

  • point of proposal if there is disinterest from current base distribution developers: What's the point if no base distribution developers are interested to apply for derivative distribution merge access anyhow? Then at least derivative contributors can be pointed to a viable path on how they can get commit access to the derivative distribution - by first becoming a base distribution developer.

Are there any examples of DDs requesting commit access?

None that I know.

More to the point, if a DD want to fix a bug in a Debian template, they should do it upstream.

Right.

If it's a Qubes specific bug, then it's either appropriate to fix upstream, (as pertaining to Debian on virtualization), or it's not, in which case their DD status is irrelevant.

If granted commit access to Qubes then...

Quote https://github.com/QubesOS/qubes-issues/issues/1939#issuecomment-1896477279

In theory, it would be nice to have a trusted repository, in reality, it is very limiting of the packages that are included. In theory, the review process would be nice, but in reality, there was no deep review of the external formulas most used by qubes users, Shaker and it was also never added to Qubes repos.

IOZZYS commented 6 months ago

I'd be lying if I say I haven't been daydreaming for weeks about a more extensive platform feature for people to confirm they have inspected a piece of code and found it to be safe and functional, instead of feeling it out based on stars, people "watching" and forks (A lot of this might be inactive people or people who use the code without actually inspecting it) whenever it's too difficult for me to understand. Combine this with the ability to leave notes wherever you find bugs/backdoors, something to make duplicate accounts difficult, a sizable user base and something like blockchain instead of a centralized platform and you've got quite some community based "trustworthy" code reviewing.

(This could have become a way longer off topic explanation of the concept above, but for illustrative purposes of my feelings toward the issue at hand, this will suffice;)

However, even with something like that working perfectly, when it comes to Qubes OS I would prefer to put the threshold of required confirmations (quantity and quality of accounts making it) unreasonable high if possible.

TLDR; No, I don't want to give template developers any additional power that they don't already have, I wish I had the luxury of trusting the current team less (no offence intended <3 ) by having them + even more people review the code before commits can be made and it taking even longer (with exceptions to critical security updates).

adrelanos commented 6 months ago

That seems to address other issues (using github, using centralized web servers instead of serverless as in no server, no cloud) and more and would imo be more suitable as a separate discussion.

IOZZYS commented 6 months ago

As I mentioned, the concept described above and my level of scepticism of trust even within a way more elaborate system were merely meant to indicate how much the proposed change to the commit system was off from what I would like to see for Qubes OS.

Since, if I understand it correctly, the proposed change would lead to less trusted individuals being able to approve code to highly trusted components of Qubes OS, for speed of reviews sake, without needing additional approval from currently ultimately trusted individuals. Whilst I dream of requiring as many additional approvals as is realistically possible. I'm sorry if I was unclear, I was in a certain mood.

If you are interested in me expanding on the idea above somewhere separate, because you think it would gain a lot of support and help, I can do that in 2 months but I will be quite unable to help set it up for at least another half a year. (Busy + still expanding my knowledge of code)

bi0shacker001 commented 5 months ago

This feels like the antithesis of qubes current security practices. The limited number of people with commit access is a deliberate choice from the team, and this SHOULD NOT be considered a valid proposal, from my perspective. Qubes is not a standard distribution, it's a security -focused one. Keeping that in mind, nobody should have an easy path to commit access. It needs to be earned, someone needs to be explicitly trusted. The current system is the best one for that.

marmarek commented 5 months ago

In the light of recent XZ attack, I believe it is clear now that my reservations explained above are not purely theoretical.

github-actions[bot] commented 5 months ago

This issue has been closed as "declined." This means that the issue describes a legitimate bug (in the case of bug reports) or proposal (in the case of enhancements and tasks), and it is actionable, at least in principle. Nonetheless, it has been decided that no action will be taken on this issue. Here are some examples of reasons why an issue may be declined:

These are just general examples. If the specific reason for this particular issue being declined has not already been provided, please feel free to leave a comment below asking for an explanation.

We respect the time and effort you have taken to file this issue, and we understand that this outcome may be unsatisfying. Please accept our sincere apologies and know that we greatly value your participation and membership in the Qubes community.

If anyone reading this believes that this issue was closed in error or that the resolution of "declined" is not accurate, please leave a comment below saying so, and the Qubes team will review this issue again. For more information, see How issues get closed.

adrelanos commented 5 months ago

I think this is an invalid comparison.

Despite of not having this policy as suggested in this ticket, the xz backdoor made it into Qubes' community templates (https://github.com/QubesOS/qubes-issues/issues/9071) and presumably would have made it into ITL templates and dom0 too given enough time would it not have been accidentally detected thanks to Andres Freund investigating the unexpected 0.5 seconds SSH delay.