Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ /
Atlas CLI
/

Atlas CLI 패키지의 무결성 확인

The Atlas CLI release team digitally signs all software packages and container images to certify that a particular package is valid and unaltered. Before you install the Atlas CLI packages for Linux, Windows, or Docker, you should validate the package using the provided PGP signature, SHA-256 checksum, or Cosign information.

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

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

1

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

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

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

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

curl -LO https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.46.2_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.46.2_linux_x86_64.tar.gz.sig mongodb-atlas-cli_1.46.2_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

Download the Atlas CLI .msi or .zip file from the MongoDB Download Center or Github.

2
  1. checksums.txt 각 파일 에 대한 SHA- 키가 포함된 Github 에서 출시하다256 에 대한 파일 다운로드합니다. 예시 1 를46 들어.. 버전의2 146경우..2 checksums.txt 파일 다운로드 .

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

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

3

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

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

You can use Cosign to verify MongoDB's signature for Atlas CLI container images.

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

1

예시: MacOS

brew install cosign

For full installation instructions, see 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}]

돌아가기

호환성 확인

이 페이지의 내용