Atlas CLI 출시하다 팀 모든 소프트웨어 패키지와 컨테이너 이미지에 디지털 서명을 하여 특정 패키지 유효하고 변경되지 않았음을 증명합니다. Linux, Windows 또는 Docker 용 Atlas CLI 패키지를 설치하기 전에 제공된 PGP 서명, SHA-256 체크섬 또는 Cosign 정보를 사용하여 패키지 의 유효성을 검사해야 합니다.
Linux 패키지 확인
MongoDB는 각 릴리스 브랜치에 서로 다른 PGP 키로 서명합니다. 최신 Atlas CLI 릴리스의 공개 키 파일은 키 서버 에서 다운로드할 수 있습니다.
다음 절차는 PGP 키와 비교하여 Atlas CLI 패키지를 확인합니다.
Atlas CLI 설치 파일을 다운로드합니다.
Linux 환경을 기반으로 MongoDB 다운로드 센터 에서 Atlas CLI 바이너리를 다운로드합니다. Copy link 를 클릭하고 다음 지침에 따라 URL을 사용합니다.
예를 들어 1.45.1
Linux 을 통해 릴리스를 다운로드하려면 shell 다음 명령을 실행합니다.
curl -LO https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.45.1_linux_x86_64.tar.gz
Atlas CLI 설치 파일을 확인하세요.
다음 명령을 실행해 설치 파일을 확인합니다.
gpg --verify mongodb-atlas-cli_1.45.1_linux_x86_64.tar.gz.sig mongodb-atlas-cli_1.45.1_linux_x86_64.tar.gz
gpg: Signature made Thu Mar 14 08:25:00 2024 EDT gpg: using RSA key <key-value-long> gpg: Good signature from "Atlas CLI Release Signing Key <packaging@mongodb.com>" [unknown]
패키지가 제대로 서명되었지만 현재 서명 키를 신뢰하지 않는 경우 gpg
(이)가 다음 메시지도 반환합니다.
gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner.
Windows 패키지 확인
다음 절차는 SHA-256 키와 비교하여 Atlas CLI 패키지를 확인합니다.
Atlas CLI 설치 파일을 다운로드합니다.
MongoDB 다운로드 센터 또는 Github에서 Atlas CLI .msi
또는 .zip
파일 다운로드합니다.
공개 서명을 저장합니다.
checksums.txt
각 파일 에 대한 SHA- 키가 포함된 Github 에서 출시하다256 에 대한 파일 다운로드합니다. 예시 1 를45 들어.. 버전의1 145경우..1 checksums.txt 파일 다운로드 .checksums.txt
파일을 열고 다운로드한 패키지 왼쪽에 나열된 텍스트를 복사합니다. 예를 들어mongodb-atlas-cli_1.45.1_windows_x86_64.zip
을 다운로드한 경우mongodb-atlas-cli_1.45.1_windows_x86_64.zip
왼쪽에 있는 텍스트를 복사합니다. 이 값은 SHA-256 키 값입니다.SHA-256 키 값을 다운로드 폴더의
atlas-cli-key
이름의.txt
파일에 저장합니다.
서명 파일을 Atlas CLI 설치 프로그램 해시와 비교합니다.
Powershell 명령을 실행하여 다운로드한 파일을 기반으로 패키지를 확인합니다.
mongodb-atlas-cli_1.45.1_windows_x86_64.zip
을 다운로드한 경우 다음 명령을 실행합니다.
$sigHash = (Get-Content $Env:HomePath\Downloads\atlas-cli-key.txt | Out-String).SubString(0,64).ToUpper(); ` $fileHash = (Get-FileHash $Env:HomePath\Downloads\mongodb-atlas-cli_1.45.1_windows_x86_64.zip).Hash.Trim(); ` echo $sigHash; echo $fileHash; ` $sigHash -eq $fileHash
<key-value-from-signature-file> <key-value-from-downloaded-package> True
mongodb-atlas-cli_1.45.1_windows_x86_64.msi
을 다운로드한 경우 다음 명령을 실행합니다.
$sigHash = (Get-Content $Env:HomePath\Downloads\atlas-cli-key.txt | Out-String).SubString(0,64).ToUpper(); ` $fileHash = (Get-FileHash $Env:HomePath\Downloads\mongodb-atlas-cli_1.45.1_windows_x86_64.msi).Hash.Trim(); ` echo $sigHash; echo $fileHash; ` $sigHash -eq $fileHash
<key-value-from-signature-file> <key-value-from-downloaded-package> True
이 명령은 서명 파일의 키 값과 다운로드한 패키지의 키 값을 반환하고, 두 값이 일치하면 True
를 반환합니다.
두 값이 일치하면 Atlas CLI 바이너리가 확인된 것입니다.
Docker 컨테이너 이미지 확인
Cosign을 사용하여 Atlas CLI 컨테이너 이미지에 대한 MongoDB의 서명을 확인할 수 있습니다.
MongoDB의 container 서명을 확인하려면 다음 단계를 수행합니다.
Cosign을 다운로드 및 설치합니다.
예시: MacOS
brew install cosign
전체 설치 지침은 Cosign을 참조하세요.
서명을 확인합니다.
다음 명령을 실행하여 태그별 서명을 확인합니다.
COSIGN_REPOSITORY=docker.io/mongodb/signatures cosign verify --private-infrastructure --key=./atlas-cli.pem docker.io/mongodb/atlas:latest
Verification for index.docker.io/mongodb/atlas:latest -- The following checks were performed on each of these signatures: - The cosign claims were validated - The signatures were verified against the specified public key [{"critical":{"identity":{"docker-reference":"index.docker.io/mongodb/atlas"},"image":{"docker-manifest-digest":"sha256:<key-value>"},"type":"cosign container image signature"},"optional":null}]