Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintainers: document new maintainers and team changes #85247

Merged
merged 5 commits into from Jun 20, 2022

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Apr 14, 2020

Motivation for this change

Write down rules for validating maintainers and changes to teams. In particular, I know of at least one company which would like to create a maintainer team, but keep it closed.

Rendered:

image

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@grahamc grahamc changed the title Maintainer team maintainers: document new maintainers and team changes Apr 14, 2020
email = "user@example.com";
name = "Example User";
keys = [{
longkeyid = "rsa8192/0xF04F7A19AAA63AFE";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key ids are only fingerprints truncated to 64 bits (note here how it's the tail end of the next line), which is few enough to no longer be cryptographically secure. the only reason that key ids ever existed (other than a mistake in the openpgp spec) is to have a handle that is "easier to handle for humans".

unless we make the assumption that humans should ever handle such data manually, there is no practical use case for key ids that holds up either cryptographically or ux-wise. we should deprecate them where possible, or at least not further institutionalize them.

Copy link
Member Author

@grahamc grahamc Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you cite a reference w.r.t. longkeyids being cryptographically insecure? I was under the impression they were secure okay, and the default shortkey ID was insecure.

I would like it if you opened a PR removing the longkeyid from the maintainer list with that reference. That said, this change is out of scope for this particular PR, since it is documenting the process as it is today.

Given longkeyid being insecure, this PR will need to be updated to validate the signature on the commandline, since GitHub only shows the longkey.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make a PR 👍

@grahamc
Copy link
Member Author

grahamc commented Apr 15, 2020

In the morning, I'll finish updating this PR to have instructions on validating the signature on the command line, since GitHub doesn't expose the full signing key.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Apr 15, 2020

Is there a policy on GPG keys? For example requiring maintainers to use that key to sing commit once in the maintainer-list.nix?

@Valodim
Copy link
Contributor

Valodim commented Apr 15, 2020

Is there a policy on GPG keys? For example requiring maintainers to use that key to sing commit once in the maintainer-list.nix?

Signatures on commits in combination with fingerprints in the maintainer list allows us to tell whether a commit was made by a specific author in the maintainers list. But that's in itself is more of a means than an end.

A policy that requires signatures in any way is bound to add hurdles to maintainership. If we want to move any further in that direction, we should have a clear picture of the intended goals, and how the introduced policies support those. (All of that is probably also far out of scope of this poor PR ;)

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Apr 15, 2020

Signatures on commits in combination with fingerprints in the maintainer list allows us to tell whether a commit was made by a specific author in the maintainers list. But that's in itself is more of a means than an end.

That's what I was asking. If maintainers have a gpg key their commits should be signed with that key and checked, IMO. Otherwise I don't see the point of adding the keys. It would be a cool addition to ofBorg.

A policy that requires signatures in any way is bound to add hurdles to maintainership. If we want to move any further in that direction, we should have a clear picture of the intended goals, and how the introduced policies support those. (All of that is probably also far out of scope of this poor PR ;)

I was honestly asking, not proposing anything. I agree something like that should ge through an RFC, at least.

@grahamc
Copy link
Member Author

grahamc commented Apr 15, 2020

No, they're not required or checked. Right now the keys in the maintainer list are informational only. OfBorg could probably add a "signed-by-maintainer" label as a positive sign? Sometimes people commit patches via the web UI. One theory of ofborg's design and operation is don't punish anyone, instead use the power of automation and positive labeling to encourage behavior we do like.

@grahamc
Copy link
Member Author

grahamc commented Apr 15, 2020

Updated rendering:
image

@alyssais
Copy link
Member

Sometimes people commit patches via the web UI

Those commits will be signed by GitHub, which we can treat as GitHub saying that the owner of the GitHub account made the commit. So we could (and should IMO) definitely check that a commit was signed by the either the person’s own key or by GitHub if there’s a key listed in maintainers.nix for the committer email.

@grahamc
Copy link
Member Author

grahamc commented Apr 15, 2020

@alyssais I think it is useful to verify that the commit adding a specific key to the maintainer list is signed by exactly that key, as a proof of ownership. That is why I wrote that it must be signed by exactly that key. Does that make sense, or do you think we don't need that proof of ownership? I check on our end and the user's end, ensuring the user still has control of it.

@alyssais
Copy link
Member

@alyssais I think it is useful to verify that the commit adding a specific key to the maintainer list is signed by exactly that key, as a proof of ownership. That is why I wrote that it must be signed by exactly that key. Does that make sense, or do you think we don't need that proof of ownership? I check on our end and the user's end, ensuring the user still has control of it.

Yes, this makes total sense. I was talking more generally. For most other commits, a GitHub signature should also be accepted.

@grahamc
Copy link
Member Author

grahamc commented Apr 15, 2020

Definitely. I'm definitely not wanting to set policy here for anything except for the commit adding a key to the maintainer file :) I added a issue to ofborg, maybe we could move further discussion of signing outside of this scope there? NixOS/ofborg#461 (or post an alterantive issue -- I don't want to shave the gpg yaks on this issue, on things outside of the scope of this issue :') )

@Profpatsch
Copy link
Member

I’m making heavy use of the Rebase and merge feature because I don’t want to introduce a merge commit for every single-commit PR in nixpkgs. So that’s a use-case that should be allowed (afaik the alternative is rebasing locally and pushing to master).

@grahamc
Copy link
Member Author

grahamc commented Apr 15, 2020

Again, I'm not planning on setting policy here beyond the scope of specifying how this maintainer entry is validated.

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

GPG fingerprint might be an issue but out of scope for this PR.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 28, 2022
@infinisil
Copy link
Member

I updated this PR by rebasing it on latest master, which required converting docbook to markdown, which was done with pandoc.

@SuperSandro2000 Regarding whether CI does these checks, it at least would've done them at some point: NixOS/ofborg#438. Seems like this was not propagated with the move to github actions

Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add anchors for stable linking.

doc/contributing/reviewing-contributions.chapter.md Outdated Show resolved Hide resolved
doc/contributing/reviewing-contributions.chapter.md Outdated Show resolved Hide resolved
@infinisil
Copy link
Member

@jtojnar Done that

@Profpatsch
Copy link
Member

Thank you infinisil! Apart from the small merge conflict, is there anything that is still needed for merge?

@Profpatsch
Copy link
Member

huh ofborg eval fails on a commit by @dasJ (ed47d92), which adds shortName to team-list.nix. This is unrelated I think.

@Profpatsch
Copy link
Member

Nvm, this PR adds some tests which are failing cause of the new fields, should be fixed now.

@Profpatsch
Copy link
Member

Okay, all green now, merging.

@Profpatsch Profpatsch merged commit 9ed7932 into NixOS:master Jun 20, 2022
@veprbl
Copy link
Member

veprbl commented Jun 20, 2022

This broke eval for PRs

@zowoq
Copy link
Contributor

zowoq commented Jun 21, 2022

This broke eval for PRs

Fixed by 404bfe2

@Profpatsch
Copy link
Member

Ah, sorry. I did rebase an hour earlier, I guess there was a race condition here.

@Profpatsch
Copy link
Member

Hm, it was already there, weird how eval was green here.

@infinisil
Copy link
Member

I'm improving the documentation for this in #305237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet