-
Notifications
You must be signed in to change notification settings - Fork 505
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
APT/RPM PGP key for some repositories at pkgs.k8s.io expired at 2024-11-02 #3818
Comments
I see the same issue with v1.27 |
« apt dist-upgrade » under ubuntu 22.04 output same error related...
|
The original key has expired on 2024-11-02, however all repositories have been resigned with a new key. At the moment, the way forward is to download and install the new key from the latest Kubernetes repository (v1.31): curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg We'll try to figure out if we can handle this in a better way in the future. Update 2024-11-12: On the RPM-based systems, you need to modify the Kubernetes repository definition to point to the latest GPG key. Open As described in #3818 (comment), we at the moment recommend using the GPG key from the latest Kubernetes repository, as older Kubernetes repositories might not have the latest key. This GPG key from the latest Kubernetes repository should work with all other repositories under |
In my use case I have a loop which gets the Release.key for 1.27, 1.28, 1.29 and 1.30, followed by an |
The key was renewed after its expiry on 2024-11-02, so update it. S. kubernetes/release#3818 for details
The key was renewed after its expiry on 2024-11-02, so update it. S. kubernetes/release#3818 for details
There seems to be some problem beyond that, because one of the steps in my docker build is to download that key fresh. So basically I'm doing this: curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.24/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.24/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
apt-get update && apt-get install kubectl That fails (with the errors mentioned in this issue) even though I am not caching the key. |
It appears that you can use the v1.31 Release.key to pull the v1.24 version, but I am doubtful this is correct.
|
@drzewiec I was able to reproduce the issue, I'll check what's going on and report back ASAP. |
Hey, I got the same issue. Unfortunately, when i try to reset my key with the previous command, i got an error too: File '/etc/apt/keyrings/kubernetes-apt-keyring.gpg' exists. Overwrite? (y/N) curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to pkgs.k8s.io:443 Update: any curl -fsSL to the Release.key results to a connection refused on port 443 Waiting for your report, thanks for your reactivity. |
/retitle APT key for some repositories at pkgs.k8s.io expired at 2024-11-02 |
/priority critical-urgent |
/assign |
It looks like the RPM repositories are experiencing the same issue. |
+1
|
Please refrain from +1 comments as opposed to upvoting existing comments. It's hard enough to keep up with the GitHub notifications and this is a volunteer effort. |
For installing K8s 1.27, I am having to get the key for 1.28 and then install 1.27 curl -fsSL https://pkgs.k8s.io/core:/stable:/**v1.28**/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg apt update |
At the moment, the GPG key is the same for all Kubernetes repositories under We're confirming if it's supposed to work that away or if there's something wrong with our service provider (OpenBuildService). At this time, you can mitigate the issue by downloading the key from the v1.31 repository as described in #3818 (comment) We'll keep this issue updated as we figure out if there's a better way to handle this in the future, or if not, to properly document this. Update: #3818 (comment) has been updated with the latest details and changes. |
On RPM based systems it might not be enough to update the repo (e.g., For RPM based systems (in my case Fedora 40) I used the following workaround to remove the old version of the key which forces
Then DNF will prompt to import the key based on (
|
/retitle APT/RPM PGP key for some repositories at pkgs.k8s.io expired at 2024-11-02 |
Note: the current key ID Before:
After:
— notice |
Running Ubuntu 22.04.5 LTS on WSL, I had to change the target directory from |
1.27 key expired today. Mitigated via using the 1.31 key in place of the 1.27 key and we are now on k8s 1.31 |
@xmudrii raised this problem the December 3rd SIG Release meeting, when we discussed it there I think one of the main action items was to figure out how other projects on OBS are handling this / "best practice". This is still TODO AFAIK and if anyone knows more, help would be welcome. Barring that, one workaround @xmudrii raised was having a root/dummy package built frequently to emit a current key and then in Kubernetes's CDN infra copying it out over the other versions. meeting notes: https://docs.google.com/document/d/1Fu6HxXQu8wl6TwloGUEOXVzZ1rwZ72IAhglnaAMCPqA/edit?tab=t.0 |
We're hitting this for v1.24. Using the key for v1.31 is a workaround but we are using upstream https://github.com/kubernetes-sigs/image-builder which requires some ugly patching. Are there any plans to renew the keys for v1.24 where they are expiring? |
Hey @BenTheElder, if I may suggest some ideas... First and foremost, don't version the package-signing key. It makes zero sense to distribute one key for v1.24 and [potentially] another for v1.31. That's because PSKs have nothing to do with packaged software neither changes therein — they have all to do with release-engineering, authenticating packages' publisher, establishing a secure link in the supply chain. Coupling the key to kubectl version is gratuitous and completely unnecessary. Perhaps I'm missing some additional concerns of the SIG — but IMO doing this just creates complications for no good reason. You'd asked for example: here's Mozilla team, publishing releases in Launchpad PPA as a step before they land in main repos: https://launchpad.net/~mozillateam — observe 2 things:
I tried OBS once, long time ago, unfortunately not a frequenter there currently. But I'm absolutely sure there's nothing Launchpad-specific in that practice; it's just the first relatable example that came to mind. For another example, here's how NodeJS deb bindist gets published by NodeSource Co. — https://github.com/nodesource/distributions/blob/master/README.md — same idea: single package signing key. They keep just 2 packages in the repo, but maintain multiple LTS release lines just like Kubernetes does — yet, there's only 1 key, as there's only 1 team making the signatures. In fact, as a package consumer, I'd become alerted if I spotted suddenly two teams signing off releases with two different keys. Unless the keys are cross-signed, that's a clear sign of takeover attempt. Heck, even Microsoft can do it! Can you believe that 😆 — https://packages.microsoft.com/
Pardon my frank critique, hoping I won't offend anyone, but inventive bicycles that this completely miss the point. Key distribution must happen out of band, through an outside channel relative to the artifacts that the key signs. Because you don't want an event of access compromise granting file-upload-equivalent capability to automatically escalate into capability of signing-key substitution (and consequently, attacker being able to stamp valid signatures onto their uploads). Which means: no, distributing the key itself via a "keychain" dummy package — is a bad idea. Less theoretically and more constructively: please look into PGP SKS & HKP; that's the canonical approach to pgp key distribution. Here's a view into SKS keyserver network https://spider.pgpkeys.eu/graphs/ hope that helps. But also: just a plain old HTTPS URL hosting the package signing key file (again: outside the repos!) is common too, simple and well-accepted. |
yes, I don't think we want to, my understanding is that the current layout comes from OBS (also to be clear I don't work on this, but I do lead SIG K8s Infra which provides the CDN infra and manages sustainable cloud credit usage) I think we understand what other deb/rpm repos look like, before OBS we used an instance of Google's package host which looked like what you're describing -- single key. The problem is either to manage this within the constraints of OBS (hence the ask for prior art from other OBS users) or to outline replacing OBS (a potentially much bigger but doable task, we use our own build & release system for the other bits). personally I didn't think we should be hosting/maintauning distro style packages at all, we have binaries and container images and distros could package kubectl / kubelet on their own and we already spend substantial resources on the other more popular binary/container image hosts. |
unless I missed something, we still don't know this (I don't see evidence that node or Microsoft are using openBuildService) |
... ideally the project would fully control the key and we could just publish it directly ... |
I think @BenTheElder OBS as the CI / build plaform is not material to the overall practice of package-signing-key management... It's more of an operational (Ops) matter |
Again: I'm not an active user of OBS; but it "seems easy"™ and perfectly doable to apply the generic principles to OBS specifics. E.g. finding this guide — https://en.opensuse.org/openSUSE:Build_Service_Signer — just set the |
I don't think that's true, the package signing happens as part of the build service.
Those docs appear to me to be related to operating your own instance of the OBS software (specifically the signing service), releng / SIG Release is using the hosted public instance at https://build.opensuse.org/ @xmudrii would know more. |
Starting around 3:30am PST we noticed our automated pipelines are failing to build the docker image.
Errors below:
#6 1.692 Err:6 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.26/deb InRelease
#6 1.692 The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project isv:[email protected]
#6 1.704 Get:13 https://dl.k6.io/deb stable/main amd64 Packages [3556 B]
#6 2.267 Reading package lists...
#6 2.686 W: GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.26/deb InRelease: The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project isv:[email protected]
#6 2.686 E: The repository 'https://pkgs.k8s.io/core:/stable:/v1.26/deb InRelease' is not signed.
#6 ERROR: process "/bin/sh -c sudo gpg -k && sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 && echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list && sudo apt update && sudo apt install -y k6 && sudo npm install --global yarn tslint" did not complete successfully: exit code: 100
2.686 W: GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.26/deb InRelease: The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project isv:[email protected]
2.686 E: The repository 'https://pkgs.k8s.io/core:/stable:/v1.26/deb InRelease' is not signed.
debian:bullseye is the base
The text was updated successfully, but these errors were encountered: