이 튜토리얼에서는 증명이 필요한 Binary Authorization 정책을 구성하고 테스트하는 방법을 보여줍니다. 이 정책 유형은 이미지 배포를 허용하기 전 컨테이너 이미지에 서명된 증명이 포함되었는지 확인하여 컨테이너 기반 소프트웨어 공급망을 보호합니다.
Binary Authorization은 배포 시에 증명자를 사용하여 증명에서 디지털 서명을 확인합니다. 증명자는 일반적으로 지속적 통합(CI) 파이프라인의 일부로 서명자에 의해 생성됩니다.
이 튜토리얼에서 GKE 클러스터, 증명, 증명자는 모두 단일 프로젝트에 위치합니다. 단일 프로젝트 구성은 주로 서비스를 테스트하거나 실험하는 데 유용합니다. 실제 예시를 더 보려면 다중 프로젝트 구성을 참조하세요.
다음 단계는 명령줄에서 수행하는 작업을 설명합니다. Google Cloud 콘솔을 사용하여 이러한 단계를 수행하려면 Google Cloud 콘솔 사용 시작하기를 참고하세요.
목표
이 튜토리얼에서는 다음 작업을 수행합니다.
- Binary Authorization이 사용 설정된 Google Kubernetes Engine(GKE) 클러스터 만들기
- Binary Authorization 시행자가 증명의 서명을 확인하는 데 사용하는 증명자 만들기
- 증명이 필요한 정책 구성
- 암호화 키 쌍을 만들어 증명을 서명한 후 나중에 확인
- 컨테이너 이미지 다이제스트에 서명하여 서명 만들기
- 서명을 사용하여 증명 만들기
- GKE에 컨테이너 이미지를 배포하여 정책 테스트
비용
이 문서에서는 비용이 청구될 수 있는 Google Cloud구성요소를 사용합니다.
프로젝트 사용량을 기준으로 예상 비용을 산출하려면 가격 계산기를 사용하세요.
시작하기 전에
- Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Google Cloud CLI를 설치합니다.
-
외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.
-
gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.
gcloud init -
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Google Cloud CLI를 설치합니다.
-
외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.
-
gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.