Azure IoT Operations는 Docker 및 Helm 이미지에 서명하여 사용자가 사용하는 이미지의 무결성 및 원본을 확인할 수 있도록 합니다. 서명은 공개/프라이빗 키 쌍을 활용하여 Microsoft가 디지털 서명을 만들고 이미지에 추가하여 컨테이너 이미지를 빌드했음을 증명합니다. 이 문서에서는 이미지가 Microsoft에서 서명되었는지 확인하는 단계를 제공합니다.
표기법을 다운로드합니다.
export NOTATION_VERSION=1.1.0 curl -LO https://github.com/notaryproject/notation/releases/download/v$NOTATION_VERSION/notation_$NOTATION_VERSION\_linux_amd64.tar.gz sudo tar xvzf notation_1.1.0_linux_amd64.tar.gz -C /usr/bin/ notation
Microsoft 서명 공용 인증서를 다운로드합니다
https://www.microsoft.com/pkiops/certs/Microsoft%20Supply%20Chain%20RSA%20Root%20CA%202022.crt
.로 저장
msft_signing_cert.crt
되었는지 확인합니다.표기법 CLI에 인증서를 추가합니다.
notation cert add --type ca --store supplychain msft_signing_cert.crt
인증서를 표기법으로 확인합니다.
notation cert ls
명령의 출력은 다음 예제와 같습니다.
STORE TYPE STORE NAME CERTIFICATE ca supplychain msft_signing_cert.crt
이미지 범위를 사용하여 trustpolicy 파일을 만듭니다.
{ "version": "1.0", "trustPolicies": [ { "name": "supplychain", "registryScopes": [ "*" ], "signatureVerification": { "level" : "strict" }, "trustStores": [ "ca:supplychain" ], "trustedIdentities": [ "x509.subject: CN=Azure IoT Operations,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US", "x509.subject: CN=Microsoft SCD Products RSA Signing,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US" ] } ] }
- 모든 registryScopes가 Azure IoT Operations와 함께 번들로 제공되는 모든 이미지를 나열하지 않도록 하고 향후 수정을 방지할 수 있습니다.
-
CN=Azure IoT Operations
에서는 모든 Azure IoT Operations 이미지를 다룹니다. 그러나 다른 Microsoft 이미지는 필요합니다CN=Microsoft SCD Products RSA Signing
.
표기법을 사용하여 다운로드한 이미지를 trustpolicy에 대해 확인합니다.
버전 자리 표시자를 확인하려는 이미지의 버전 번호로 바꿉다. Azure IoT Operations의 기존 인스턴스의 경우 Azure Portal의 인스턴스 개요 페이지에서 또는 az iot ops show를 실행하여 버전 번호를 찾을 수 있습니다. 사용 가능한 버전의 전체 목록은 azure-iot-operations 릴리스를 참조 하세요.
notation policy import <TRUSTPOLICY_FILE>.json export NOTATION_EXPERIMENTAL=1 notation verify --allow-referrers-api mcr.microsoft.com/azureiotoperations/aio-operator:<AZURE_IOT_OPERATIONS_VERSION>
명령의 출력은 다음 예제와 같습니다.
Successfully verified signature for mcr.microsoft.com/azureiotoperations/aio-operator@sha256:09cbca56a2149d624cdc4ec952abe9a92ee88c347790c6657e3dd2a0fcc12d10