Docs Menu
Docs Home
/ /
Atlas CLI
/

Atlas CLI 패키지의 무결성 확인

이 페이지의 내용

  • Linux 패키지 확인
  • Windows 패키지 확인
  • Docker 컨테이너 이미지 확인

Atlas CLI 릴리스 팀은 모든 소프트웨어 패키지와 컨테이너 이미지에 디지털 서명을 하여 특정 패키지가 유효하고 변경되지 않았음을 증명합니다. Linux, Windows 또는 Docker용 Atlas CLI 패키지를 설치하기 전에 제공된 PGP 서명, SHA-256 체크섬 또는 Cosign 을 사용하여 패키지의 유효성을 검사해야 합니다. 정보.

MongoDB는 각 릴리스 브랜치에 서로 다른 PGP 키로 서명합니다. 최신 Atlas CLI 릴리스의 공개 키 파일은 키 서버 에서 다운로드할 수 있습니다.

다음 절차는 PGP 키와 비교하여 Atlas CLI 패키지를 확인합니다.

1

Linux 환경을 기반으로 MongoDB 다운로드 센터 에서 Atlas CLI 바이너리를 다운로드합니다. Copy link 를 클릭하고 다음 지침에 따라 URL을 사용합니다.

예를 들어 1.29.0 Linux 을 통해 릴리스를 다운로드하려면 shell 다음 명령을 실행합니다.

curl -LO https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.29.0_linux_x86_64.tar.gz
2

다음 명령을 실행하여 파일을 다운로드합니다.

curl -LO https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.29.0_linux_x86_64.tar.gz.sig
3

다음 명령을 실행하여 주요 파일을 다운로드하고 가져오세요.

curl -LO https://pgp.mongodb.com/atlas-cli.asc
gpg --import atlas-cli.asc
gpg: key <key-value-short>: public key "Atlas CLI Release Signing Key <packaging@mongodb.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
4

다음 명령을 실행해 설치 파일을 확인합니다.

gpg --verify mongodb-atlas-cli_1.29.0_linux_x86_64.tar.gz.sig mongodb-atlas-cli_1.29.0_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.

다음 절차는 SHA-256 키와 비교하여 Atlas CLI 패키지를 확인합니다.

1

MongoDB 다운로드 센터 또는 Github 에서Atlas CLI .msi 또는 .zip 파일을 다운로드합니다.

2
  1. Github checksums.txt 에서 릴리스에 대한 파일을256 다운로드합니다. , 각 파일에 대한 SHA- 키가 포함되어 있습니다. 예를 들어 버전 1 입니다.29.0, 를 다운로드합니다.1.29 checksums.txt 파일.0

  2. checksums.txt 파일을 열고 다운로드한 패키지 왼쪽에 나열된 텍스트를 복사합니다. 예를 들어 mongodb-atlas-cli_1.29.0_windows_x86_64.zip을 다운로드한 경우 mongodb-atlas-cli_1.29.0_windows_x86_64.zip 왼쪽에 있는 텍스트를 복사합니다. 이 값은 SHA-256 키 값입니다.

  3. SHA-256 키 값을 다운로드 폴더의 atlas-cli-key 이름의 .txt 파일에 저장합니다.

3

Powershell 명령을 실행하여 다운로드한 파일을 기반으로 패키지를 확인합니다.

mongodb-atlas-cli_1.29.0_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.29.0_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.29.0_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.29.0_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 바이너리가 확인된 것입니다.

Cosign 을 사용할 수 있습니다. Atlas CLI 컨테이너 이미지에 대한 MongoDB의 서명을 확인합니다.

MongoDB의 container 서명을 확인하려면 다음 단계를 수행합니다.

1

예시: MacOS

brew install cosign

전체 설치 지침은 Cosign을 참조하세요.

2
curl https://cosign.mongodb.com/atlas-cli.pem > atlas-cli.pem
3

다음 명령을 실행하여 태그별 서명을 확인합니다.

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}]

돌아가기

호환성 확인