@@ -33,6 +33,52 @@ You will need to have the following tools installed:
33
33
- ` cosign ` ([ 安装指南] ( https://docs.sigstore.dev/cosign/installation/ ) )
34
34
- ` curl ` (通常由你的操作系统提供)
35
35
36
+ <!--
37
+ ## Verifying binary signatures
38
+
39
+ The Kubernetes release process signs all binary artifacts (tarballs, SPDX files,
40
+ standalone binaries) by using cosign's keyless signing. To verify a particular
41
+ binary, retrieve it together with its signature and certificate:
42
+ -->
43
+
44
+ ## 验证二进制签名 {#verifying-binary-signatures}
45
+
46
+ Kubernetes 发布过程使用 cosign 的无密钥签名对所有二进制工件(压缩包、SPDX 文件、 独立的二进制文件)签名。
47
+ 要验证一个特定的二进制文件,获取组件时要包含其签名和证书:
48
+
49
+ ``` bash
50
+ URL=https://dl.k8s.io/release/v{{< skew currentVersion > }}.0/bin/linux/amd64
51
+ BINARY=kubectl
52
+
53
+ FILES=(
54
+ " $BINARY "
55
+ " $BINARY .sig"
56
+ " $BINARY .cert"
57
+ )
58
+
59
+ for FILE in " ${FILES[@]} " ; do
60
+ curl -sSfL --retry 3 --retry-delay 3 " $URL /$FILE " -o " $FILE "
61
+ done
62
+ ```
63
+
64
+ <!--
65
+ Then verify the blob by using `cosign`:
66
+ -->
67
+ 然后使用 ` cosign ` 验证二进制文件:
68
+
69
+ ``` shell
70
+ cosign verify-blob " $BINARY " --signature " $BINARY " .sig --certificate " $BINARY " .cert
71
+ ```
72
+
73
+ {{< note >}}
74
+ <!--
75
+ To learn more about keyless signing, please refer to [Keyless
76
+ Signatures](https://github.com/sigstore/cosign/blob/main/KEYLESS.md#keyless-signatures).
77
+ -->
78
+ 想要进一步了解无密钥签名,请参考
79
+ [ Keyless Signatures] ( https://github.com/sigstore/cosign/blob/main/KEYLESS.md#keyless-signatures ) 。
80
+ {{< /note >}}
81
+
36
82
<!--
37
83
## Verifying image signatures
38
84
@@ -115,6 +161,5 @@ resources:
115
161
[ sigstore policy-controller] ( https://docs.sigstore.dev/policy-controller/overview )
116
162
控制器验证其签名。如要使用 ` policy-controller ` ,下面是一些有帮助的资源:
117
163
118
- * [ 安装] ( https://github.com/sigstore/helm-charts/tree/main/charts/policy-controller )
119
- * [ 配置选项] ( https://github.com/sigstore/policy-controller/tree/main/config )
120
-
164
+ - [ 安装] ( https://github.com/sigstore/helm-charts/tree/main/charts/policy-controller )
165
+ - [ 配置选项] ( https://github.com/sigstore/policy-controller/tree/main/config )
0 commit comments