Skip to content

Commit 91183ff

Browse files
committed
Add blog post about binary artifact signing
Signed-off-by: Sascha Grunert <[email protected]>
1 parent 53ec932 commit 91183ff

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
layout: blog
3+
title: "Kubernetes 1.26: We're now signing our binary release artifacts!"
4+
date: 2022-12-12
5+
slug: kubernetes-release-artifact-signing
6+
---
7+
8+
**Author:** Sascha Grunert
9+
10+
The Kubernetes Special Interest Group (SIG) Release is proud to announce that we
11+
are digitally signing all release artifacts, and that this aspect of Kubernetes
12+
has now reached _beta_.
13+
14+
Signing artifacts provides end users a chance to verify the integrity of the
15+
downloaded resource. It allows to mitigate man-in-the-middle attacks directly on
16+
the client side and therefore ensures the trustfulness of the remote serving the
17+
artifacts. The overall goal of out past work was to define the used tooling for
18+
signing all Kubernetes related artifacts as well as providing a standard signing
19+
process for related projects (for example for those in [kubernetes-sigs][k-sigs]).
20+
21+
[k-sigs]: https://github.com/kubernetes-sigs
22+
23+
We already signed all officially released container images (from Kubernetes v1.24 onwards).
24+
Image signing was alpha for v1.24 and v1.25. For v1.26, we've added all
25+
**binary artifacts** to the signing process as well! This means that now all
26+
[client, server and source tarballs][tarballs], [binary artifacts][binaries],
27+
[Software Bills of Material (SBOMs)][sboms] as well as the [build
28+
provenance][provenance] will be signed using [cosign][cosign]. Technically
29+
speaking, we now ship additional `*.sig` (signature) and `*.cert` (certificate)
30+
files side by side to the artifacts for verifying their integrity.
31+
32+
[tarballs]: https://github.com/kubernetes/kubernetes/blob/release-1.26/CHANGELOG/CHANGELOG-1.26.md#downloads-for-v1260
33+
[binaries]: https://gcsweb.k8s.io/gcs/kubernetes-release/release/v1.26.0/bin
34+
[sboms]: https://storage.googleapis.com/kubernetes-release/release/v1.26.0/kubernetes-release.spdx
35+
[provenance]: https://storage.googleapis.com/kubernetes-release/release/v1.26.0/provenance.json
36+
[cosign]: https://github.com/sigstore/cosign
37+
38+
To verify an artifact, for example `kubectl`, you can download the
39+
signature and certificate alongside with the binary. I use the release candidate
40+
`rc.1` of v1.26 for demonstration purposes because the final has not been released yet:
41+
42+
```shell
43+
curl -sSfL https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl -o kubectl
44+
curl -sSfL https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl.sig -o kubectl.sig
45+
curl -sSfL https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl.cert -o kubectl.cert
46+
```
47+
48+
Then you can verify `kubectl` using [`cosign`][cosign]:
49+
50+
```shell
51+
COSIGN_EXPERIMENTAL=1 cosign verify-blob kubectl --signature kubectl.sig --certificate kubectl.cert
52+
```
53+
54+
```
55+
tlog entry verified with uuid: 5d54b39222e3fa9a21bcb0badd8aac939b4b0d1d9085b37f1f10b18a8cd24657 index: 8173886
56+
Verified OK
57+
```
58+
59+
The UUID can be used to query the [rekor][rekor] transparency log:
60+
61+
[rekor]: https://github.com/sigstore/rekor
62+
63+
```shell
64+
rekor-cli get --uuid 5d54b39222e3fa9a21bcb0badd8aac939b4b0d1d9085b37f1f10b18a8cd24657
65+
```
66+
67+
```
68+
LogID: c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d
69+
Index: 8173886
70+
IntegratedTime: 2022-11-30T18:59:07Z
71+
UUID: 24296fb24b8ad77a5d54b39222e3fa9a21bcb0badd8aac939b4b0d1d9085b37f1f10b18a8cd24657
72+
Body: {
73+
"HashedRekordObj": {
74+
"data": {
75+
"hash": {
76+
"algorithm": "sha256",
77+
"value": "982dfe7eb5c27120de6262d30fa3e8029bc1da9e632ce70570e9c921d2851fc2"
78+
}
79+
},
80+
"signature": {
81+
"content": "MEQCIH0e1/0svxMoLzjeyhAaLFSHy5ZaYy0/2iQl2t3E0Pj4AiBsWmwjfLzrVyp9/v1sy70Q+FHE8miauOOVkAW2lTYVug==",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dkFMb0I5SmNycXlBaUVBNW4xZ283cmQ2U3ZVeXNxeldhMUdudGZKCllTQnVTZHF1akVySFlMQTUrZTR3Q2dZSUtvWkl6ajBFQXdNRFpnQXdZd0l2Tlhub3pyS0pWVWFESTFiNUlqa1oKUWJJbDhvcmlMQ1M4MFJhcUlBSlJhRHNCNTFUeU9iYTdWcGVYdThuTHNjVUNNREU4ZmpPZzBBc3ZzSXp2azNRUQo0c3RCTkQrdTRVV1UrcjhYY0VxS0YwNGJjTFQwWEcyOHZGQjRCT2x6R204K093PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
84+
}
85+
}
86+
}
87+
}
88+
```
89+
90+
The `HashedRekordObj.signature.content` should match the content of the file
91+
`kubectl.sig` and `HashedRekordObj.signature.publicKey.content` should be
92+
identical with the contents of `kubectl.cert`. It is also possible to specify
93+
the remote certificate and signature locations without downloading them:
94+
95+
```shell
96+
COSIGN_EXPERIMENTAL=1 cosign verify-blob kubectl \
97+
--signature https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl.sig \
98+
--certificate https://dl.k8s.io/release/v1.26.0-rc.1/bin/linux/amd64/kubectl.cert
99+
```
100+
101+
```
102+
tlog entry verified with uuid: 5d54b39222e3fa9a21bcb0badd8aac939b4b0d1d9085b37f1f10b18a8cd24657 index: 8173886
103+
Verified OK
104+
```
105+
106+
All of the mentioned steps as well as how to verify container images are
107+
outlined in the official documentation about how to [Verify Signed Kubernetes
108+
Artifacts][docs]. In one of the next upcoming Kubernetes releases we will
109+
working making the global story more mature by ensuring that truly all
110+
Kubernetes artifacts are signed. Beside that, we are considering using Kubernetes
111+
owned infrastructure for the signing (root trust) and verification (transparency
112+
log) process.
113+
114+
[docs]: /docs/tasks/administer-cluster/verify-signed-artifacts
115+
116+
## Getting involved
117+
118+
If you're interested in contributing to SIG Release, then consider applying for
119+
the upcoming v1.27 shadowing program (watch for the announcement on
120+
[k-dev][k-dev]) or join our [weekly meeting][meeting] to say _hi_.
121+
122+
We're looking forward to making even more of those awesome changes for future
123+
Kubernetes releases. For example, we're working on the [SLSA Level 3 Compliance
124+
in the Kubernetes Release Process][slsa] or the [Renaming of the kubernetes/kubernetes
125+
default branch name to `main`][kkmain].
126+
127+
Thank you for reading this blog post! I'd like to use this opportunity to give
128+
all involved SIG Release folks a special shout-out for shipping this feature in
129+
time!
130+
131+
Feel free to reach out to us by using the [SIG Release mailing list][mail] or
132+
the [#sig-release][slack] Slack channel.
133+
134+
[mail]: https://groups.google.com/g/kubernetes-sig-release
135+
[slsa]: https://github.com/kubernetes/enhancements/issues/3027
136+
[kkmain]: https://github.com/kubernetes/enhancements/issues/2853
137+
[slack]: http://slack.k8s.io
138+
[k-dev]: https://groups.google.com/a/kubernetes.io/g/dev
139+
[meeting]: http://bit.ly/k8s-sig-release-meeting
140+
141+
## Additional resources
142+
143+
- [Signing Release Artifacts Enhancement Proposal](https://github.com/kubernetes/enhancements/issues/3031)

0 commit comments

Comments
 (0)