GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: switch to official `release-keys` repo to verify Node.js artefacts by aduh95 · Pull Request #2415 · nodejs/docker-node

Conversation

@aduh95

@aduh95 aduh95 commented Mar 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description

Instead of maintaining a separate list of keys and expect to find them on public servers, let's switch to the official keyring and use the smaller gpgv tool.

Motivation and Context

https://github.com/nodejs/node?tab=readme-ov-file#verifying-binaries
nodejs/unofficial-builds#216

Testing Details

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MikeMcC399 reacted with thumbs down emoji
All reactions
  • 👎 1 reaction
@aduh95 aduh95 changed the title chore: switch to official release-keys repo to verify Node.js chore: switch to official release-keys repo to verify Node.js artefacts Mar 9, 2026
@nschonni

nschonni commented Mar 9, 2026

Copy link
Copy Markdown
Member

@yosifkit @tianon I think one of you had previously flagged some issues with switching to keyrings for the official images, or did I misremember that?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

yosifkit
yosifkit reviewed Mar 9, 2026
View reviewed changes
Comment thread Dockerfile-alpine.template Outdated
{ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && gpg --batch --fingerprint "$key"; } ; \
done \
&& export PUBRING="$(mktemp)" \
&& curl -fsSLo "$PUBRING" --compressed https://github.com/nodejs/release-keys/raw/HEAD/gpg-only-active-keys/pubring.kbx \

@yosifkit yosifkit Mar 9, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Just like any file downloaded in the Dockerfile, this would need to be verified by a sha256sum embedded in the Dockerfile (at a minimum) in order to be acceptable to Docker Official Images. See https://github.com/docker-library/official-images/tree/3b4779967d1c2e369aeae1c8533d12f5a9b4df81#image-build.

In many instances, we also recommend checking that only the expected keys exist in the keyring (or maybe that was only when adding them to an apt keyring). cc @tianon

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aduh95 aduh95 Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The content of the keyring is validated in https://github.com/nodejs/release-keys/actions/runs/20075780501/workflow#L64, do you know if that's good enough?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aduh95 aduh95 Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I've added a step that checks the pubring only contains the expected keys, PTAL

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yosifkit

yosifkit commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

@yosifkit @tianon I think one of you had previously flagged some issues with switching to keyrings for the official images, or did I misremember that?

I think you might be referring to #1509 (comment)

nschonni reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nschonni
nschonni reviewed Mar 9, 2026
View reviewed changes
Comment thread update.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nschonni

nschonni commented Mar 9, 2026

Copy link
Copy Markdown
Member

Maybe there is a way in the middle, where the script grabs and parses the keyring, but the image keeps the valid/current keys embedded in the Dockerfile we send upstream

MikeMcC399 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tianon

tianon commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

I think you might be referring to #1509 (comment)

That's the one that's most directly pertinent to docker-node -- see also nodejs/node#58979 (comment), nodejs/node#58904 (comment), nodejs/node#39227 (comment) 😅

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399

This comment was marked as outdated.

Sign in to view
@MikeMcC399 MikeMcC399 mentioned this pull request Mar 10, 2026
Migrate to Node.js verification using keyring source #2265
Closed
@aduh95 aduh95 linked an issue Mar 10, 2026 that may be closed by this pull request
Migrate to Node.js verification using keyring source #2265
Closed
@tianon

tianon commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

I think you might be referring to #1509 (comment)

That's the one that's most directly pertinent to docker-node -- see also nodejs/node#58979 (comment), nodejs/node#58904 (comment), nodejs/node#39227 (comment) 😅

To quote nodejs/node#58979 (comment):

"Just trust this precompiled binary bundle of key data" is not exactly something that fills me with warm fuzzies 😅 -- how would I, as a user, verify the contents of pubring.kbx? How would I know which parts of it are relevant for a given Node.js release?

And nodejs/node#39227 (comment):

IMO, https://github.com/nodejs/release-keys would be a very interesting place to include a bit more (programmatically accessible such as symlinks in folders or a JSON doc) metadata about how the keys related to releases, such as which are expected to be actively signing new releases of each version track vs which keys have been used historically to sign releases for each track and aren't expected to sign new releases (instead of just a big bundle of keys for everyone both past and present).

Having that sort of metadata/organization would make something like #1511 much easier to implement, but would also generally reduce the possibility of something like an outdated key being compromised creating a worry for new releases. 👀

As it stands, https://github.com/nodejs/release-keys is functionally not much different from the KEYS files that are common in Apache projects, albeit with some added scaffolding to help ease consumption. 😅

See also https://github.com/docker-library/faq#how-can-i-use-a-keys-file-for-verifying-pgp-signatures

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PeterDaveHello
PeterDaveHello requested a review from Copilot March 26, 2026 01:51
Copilot started reviewing on behalf of PeterDaveHello March 26, 2026 01:52
View session

This comment was marked as outdated.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added 12 commits March 26, 2026 16:12
@aduh95
chore: switch to official release-keys repo to verify Node.js
c90d8a9
@aduh95
squash! no pipefail
9cce837
@aduh95
fixup! squash! no pipefail
4fb4724
@aduh95
fixup! squash! no pipefail
416fb8b
@aduh95
squash! fix file name
8334374
@aduh95
fixup! squash! fix file name
0f084ba
@aduh95
squash! somehow trixie does not have gpgv
327e93c
@aduh95
fixup! squash! somehow trixie does not have gpgv
4d29191
@aduh95
fixup! squash! somehow trixie does not have gpgv
76b0b22
@aduh95
squash! remove duplicate set -ex
5082131
@aduh95
squash! update keyring
619a4d1
@aduh95
squash! address code reviews
a3d6947
@aduh95
aduh95 force-pushed the official-keys branch from 34b1221 to a3d6947 Compare March 26, 2026 15:12
aduh95 added 3 commits March 26, 2026 16:16
@aduh95
squash! remove temp files
9f29b07
@aduh95
squash! move the pubring check inside the Dockerfile
1c999e8
@aduh95
squash! shellcheck
70d5ba1
aduh95 added 8 commits March 26, 2026 17:37
@aduh95
squash! don't sort, filter out env specific value
9f6569a
@aduh95
squash! only check for fingerprints
6a15424
@aduh95
squash! move back to nodejs.keys
daac274
@aduh95
fixup! squash! move back to nodejs.keys
4465008
@aduh95
fixup! squash! move back to nodejs.keys
6d09498
@aduh95
fixup! squash! move back to nodejs.keys
c63cbda
@aduh95
fixup! squash! move back to nodejs.keys
c08988f
@aduh95
fixup! squash! move back to nodejs.keys
fc4d9bd
@aduh95
aduh95 requested a review from tianon April 4, 2026 09:05
@aduh95

aduh95 commented Apr 11, 2026

Copy link
Copy Markdown
Contributor Author

Is there any unadressed objections? If I don't hear any, I plan to land this before 26.0.0 is released

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nschonni
nschonni requested changes Apr 13, 2026
View reviewed changes

@nschonni nschonni left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@aduh95 I'm just blocking this, because we need agreement from the Docker hub people (@yosifkit, @tianon, or @LaurentGoderre) otherwise we can't proceed. If one of them agrees, you can dismiss this review

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
nschonni
nschonni reviewed Apr 13, 2026
View reviewed changes
Comment thread update-keys.sh
trap 'rm -r "$TMP_DIR"; trap - EXIT; exit' EXIT INT HUP
(cd "$TMP_DIR" && curl -fsSO "$KEYRING_URL" && sha256sum pubring.kbx) > keys/nodejs.shasum

gpg --no-default-keyring --keyring "$TMP_DIR/pubring.kbx" --list-keys --with-colons |

@nschonni nschonni Apr 13, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I kind of want to try to see if this could be used to keep the embedded fingerprints in the Dockerfiles by droping the node.keys and doing this each time as part of the bigger update.sh. I'll see if I can figure that out later

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aduh95 aduh95 Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

keep the embedded fingerprints in the Dockerfiles by droping the node.keys and doing this each time as part of the bigger update.sh

Hum I think that's already what's happening:

docker-node/25/bookworm/Dockerfile

Line 22 in fc4d9bd

&& [ "$(gpg --no-default-keyring --keyring "$GNUPGHOME/pubring.kbx" --list-keys --with-colons | awk -F: '{ if (print_next_line) { print $10; print_next_line=0; } else if ($1=="pub") print_next_line=1; }')" = "$(printf '5BE8A3F6C8A5C01D106C0AD820B1A390B168D356\nDD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7\nCC68F5A3106FF448322E48ED27F5E38D5B0A215F\n8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600\n890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4\nC82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C\n108F52B48DB57BB0CC439B2997B01419BD92F80A\nA363A499291CBBC940DD62E41F10027AF002F8B0\n')" ] \

I don't think dropping the node.keys is desirable, but maybe I misunderstand what you mean.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@nschonni nschonni Apr 14, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry, I didn't explain myself very well. I was thinking that maybe there is a way to use the keyring to be the definitive source (with or without a TXT copy here), but have no diff for the existing Dockerfiles by generating the same array/method that is used today and accpeted by the Docker Hub publishing.
EX: Take your new method of getting the keys from the keyring rather than scraping the README, but don't change how the fingerprints are consumed inside the Dockerfiles

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aduh95 aduh95 Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

One goal of this PR is to remove the dependency on those public key servers – although there are no plans to stop publishing public keys there, moving to the keyring removes that dependency on something we have little control over, and is more stable over time (because it's now targeting a specific commit on the repo)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@MikeMcC399 MikeMcC399 Jul 3, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The keyservers are still needed to install Yarn v1 Classic until Node.js 24 EOL in Apr 2028, for example

docker-node/Dockerfile-debian.template

Lines 49 to 50 in 5735045

{ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" && gpg --batch --fingerprint "$key"; } || \
{ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && gpg --batch --fingerprint "$key"; } ; \

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nschonni nschonni mentioned this pull request Apr 14, 2026
chore: use release-keys keyring for gpg fingerprints #2459
Closed
1 of 12 tasks
@aduh95

aduh95 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Should I bother to fix conflicts here? FWIW I still think this is valuable and an improvement over the status quo, and that I have addressed all the concern that was raised, but if it's not going to land, so be it and let's close the PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 added 4 commits June 25, 2026 17:06
@aduh95
Merge branch 'main' of https://github.com/nodejs/docker-node
f7abe65
@aduh95
fixup! Merge branch 'main' of https://github.com/nodejs/docker-node
aabf064
@aduh95
Merge branch 'main' of https://github.com/nodejs/docker-node
6a0f34f
@aduh95
Merge branch 'main' of https://github.com/nodejs/docker-node
2391f22
MikeMcC399
MikeMcC399 requested changes Jul 13, 2026
View reviewed changes

@MikeMcC399 MikeMcC399 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Should I bother to fix conflicts here?

To avoid the conflicts and also avoid unnecessarily triggering a release when only the method of updating the keys is being changed, remove the Dockerfile changes from this PR. (see also #2564). Dockerfile updates are done automatically with each release, so it's redundant to also put them in this PR.

FWIW I still think this is valuable and an improvement over the status quo, and that I have addressed all the concern that was raised, but if it's not going to land, so be it and let's close the PR.

The previous gating factor was getting approval from the representatives of https://github.com/docker-library. They would need to review the latest changes.

Automating the key updates would replace a manual process and save effort in that sense. So that would be a benefit. In practice, the keys don't change very often, so the current manual effort is minimal though.

The change does not however remove the dependency on the key servers (hkps://keys.openpgp.org & https://keyserver.ubuntu.com). They remain essential for building Node.js 22 & 24 because Yarn install uses them. If they're not available, the build fails. That will remain the case until Node.js 24.x EOL on 2028-04-30.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95

aduh95 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Automating the key updates would replace a manual process and save effort in that sense. So that would be a benefit. In practice, the keys don't change very often, so the current manual effort is minimal though.

To clarify this is not a goal, not only the effort is minimal, keeping manual steps helps catch mistakes and mischiefs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399 MikeMcC399 mentioned this pull request Jul 17, 2026
Key order in keys/node.keys does not match node/README.md sort order by first name #2569
Closed
@MikeMcC399 MikeMcC399 added the keys Related to keys used to sign releases label Aug 4, 2026
@aduh95 aduh95 mentioned this pull request Aug 14, 2026
chore: pull Releaser keys from keyring instead of README #2607
Merged
2 of 12 tasks
@MikeMcC399

MikeMcC399 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

I suggest to close this PR.

update-keys.sh now pulls from https://github.com/nodejs/release-keys/raw/refs/heads/main/gpg-only-active-keys/pubring.kbx

It's not possible to remove the dependency on keyservers hkps://keys.openpgp.org & keyserver.ubuntu.com

Short-term the keyervers are needed for Yarn v1 Classic installation. That need continues until Node.js 24 EOL on 2028-04-30. After that date the lowest active release is Node.js 26 and that does not bundle Yarn v1.

Long-term there is no agreement from the Docker representatives in the team. They want the signer key in the Docker file, and the check to run through the keyservers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

They want the signer key in the Docker file, and the check to run through the keyservers.

That seems like conjecture, unless I've missed a communication from their end they haven't commented on this implementation.

Short-term the keyervers are needed for Yarn v1 Classic installation.

This is IMO off-topic since we obviously have no control over Yarn verification methods. My concern is with verifying Node.js releases with a method the project has no control over.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399

MikeMcC399 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

https://github.com/docker-library/official-images#security was the reference document.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

https://github.com/docker-library/official-images#security was the reference document.

In https://github.com/docker-library/faq/#how-can-i-use-a-keys-file-for-verifying-pgp-signatures, they give an example of exactly what I'm trying to achieve

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399

MikeMcC399 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Could you explain again the need for this PR? You said you see a problem because the Node.js organization does not control the key servers. What aspect of lack of control concerns you? Is it availability of the servers? The risk of key servers being compromised? Or something else?

What is the impact of this PR not being merged?

At the moment we have a working solution, so I'm trying to understand what is missing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

The issue is that Node.js releases are signed with the releaser's private key, so if the releaser removes their key for those servers, it results on Node.js releases no longer being verifiable. It happen somewhat recently when I lost access to my private key, when I uploaded my new key it, the previous one was no longer trusted, and verification was failing. It's uncomfortable for the releaser, which are kinda bound forever to keep the same key, and uncomfortable for the project as the build are not reproducible.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399

MikeMcC399 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@aduh95

Thank you for the explanation! I am beginning to understand your concerns.

The restrictions on e-mail re-use only affect hkps://keys.openpgp.org and these were already mitigated by PR #2252 from @tianon on Jul 7, 2025.

Keys from the Node.js release team are not affected because this repo only builds the latest versions of Node.js and it only uses keys from nodejs/release-keys > gpg-only-active-keys/pubring.kbx.

The repo doesn't support old releases.

Your problematic old key C0D6248439F1D5604AAFFB4021D900FFDB233756 belonging to Antoine du Hamel [email protected] that fails on hkps://keys.openpgp.org (error reading key: No public key) is not used here in the active main branch since it does not belong to the gpg-only-active-keys set.

As an additional example of how the mitigation currently works for the only non-Node.js key in use: the key 6A010C5166006599AA17F08146C2130DFD2497F5 belonging to [email protected] used to sign Yarn v1 fails on hkps://keys.openpgp.org (gpg: error reading key: No public key) and it automatically fails over to keyserver.ubuntu.com using the implemented mitigation.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@yosifkit yosifkit yosifkit left review comments
@nschonni nschonni nschonni requested changes
Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@MikeMcC399 MikeMcC399 MikeMcC399 requested changes
@tianon tianon Awaiting requested review from tianon

Requested changes must be addressed to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

keys Related to keys used to sign releases

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Migrate to Node.js verification using keyring source

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@aduh95 @nschonni @yosifkit @tianon @MikeMcC399
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.