イメージ署名と検証
このページでは、Istioイメージアーティファクトの出所を検証するためにCosignを使用する方法について説明します。
Cosignは、sigstoreプロジェクトの一部として開発されたツールで、コンテナイメージなどの署名付きOpen Container Initiative(OCI)アーティファクトの署名と検証を簡素化します。
Istio 1.12以降、公式に公開されるすべてのコンテナイメージは、リリースプロセスの一部として署名されています。エンドユーザーは、以下に説明するプロセスを使用して、これらのイメージを検証できます。
このプロセスは、手動実行にも、アーティファクトの自動検証のためのビルドまたはデプロイパイプラインとの統合にも適しています。
前提条件
始める前に、以下の作業を行ってください。
アーキテクチャに合った最新のCosignビルドと、その署名をダウンロードします。
cosign
バイナリの署名を検証します。$ openssl dgst -sha256 \ -verify <(curl -ssL https://raw.githubusercontent.com/sigstore/cosign/main/release/release-cosign.pub) \ -signature <(cat /path/to/cosign.sig | base64 -d) \ /path/to/cosign-binary
バイナリを実行可能にし(
chmod +x
)、PATH
上の場所に移動します。
イメージの検証
コンテナイメージを検証するには、以下の手順に従ってください。
$ ./cosign-binary verify --key "https://istio.dokyumento.jp/misc/istio-key.pub" gcr.io/istio-release/pilot:1.24.0
このプロセスは、Istioビルドインフラストラクチャで構築されたすべてのリリース済みイメージまたはリリース候補イメージで機能します。
出力例
$ cosign verify --key "https://istio.dokyumento.jp/misc/istio-key.pub" gcr.io/istio-release/pilot:1.12.0
Verification for gcr.io/istio-release/pilot:1.12.0 --
The following checks were performed on each of these signatures:
- The cosign claims were validated
- The signatures were verified against the specified public key
- Any certificates were verified against the Fulcio roots.
[{"critical":{"identity":{"docker-reference":"gcr.io/istio-release/pilot"},"image":{"docker-manifest-digest":"sha256:c37fd83f6435ca0966d653dc6ac42c9fe5ac11d0d5d719dfe97de84acbf7a32d"},"type":"cosign container image signature"},"optional":null}]