Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

3.9.4. 이미지 서명 지원 활성화

OpenShift Container Platform은 이미지가 신뢰할 수 있는 소스에서 암호화 방식으로 확인할 수 있습니다. 컨테이너 보안 가이드에서 는 이미지 서명의 작동 방식에 대한 고급 설명을 제공합니다.

atomic 명령행 인터페이스(CLI), 버전 1.12.5 이상을 사용하여 이미지 서명 확인을 구성할 수 있습니다. atomic CLI는 RHEL Atomic Host 시스템에 사전 설치되어 있습니다.

참고

atomic CLI에 대한 자세한 내용은 Atomic CLI 설명서 를 참조하십시오.

다음 파일 및 디렉터리는 호스트의 신뢰 구성을 구성합니다.

  • /etc/containers/registries.d/*
  • /etc/containers/policy.json

각 노드에서 직접 신뢰 구성을 관리하거나 별도의 호스트의 파일을 Ansible을 사용하여 적절한 노드에 배포할 수 있습니다. 예를 들면 다음과 같습니다. Ansible을 사용하여 파일 배포 자동화 예제는 컨테이너 이미지 서명 통합 가이드 를 참조하십시오.

  1. 호스트 시스템에 설치되지 않은 경우 atomic 패키지를 설치합니다.

    $ yum install atomic
  2. 현재 신뢰 구성을 확인합니다.

    $ atomic trust show
    * (default)                         accept

    기본 구성은 모든 레지스트리를 허용 목록에 추가하는 것입니다. 즉, 서명 확인이 구성되지 않았음을 의미합니다.

  3. 신뢰 구성을 사용자 정의합니다. 다음 예제에서는 하나의 레지스트리 또는 네임스페이스, 신뢰할 수 없는 레지스트리를 블랙리스트(라이프트)하고, 벤더 레지스트리에서 서명 확인이 필요합니다.

    $ atomic trust add --type insecureAcceptAnything 172.30.1.1:5000
    
    $ atomic trust add --sigstoretype atomic \
      --pubkeys pub@example.com \
      172.30.1.1:5000/production
    
    $ atomic trust add --sigstoretype atomic \
      --pubkeys /etc/pki/example.com.pub \
      172.30.1.1:5000/production
    
    $ atomic trust add --sigstoretype web \
      --sigstore https://access.redhat.com/webassets/docker/content/sigstore \
      --pubkeys /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \
      registry.redhat.io
    
    # atomic trust show
    * (default)                         accept
    172.30.1.1:5000                     accept
    172.30.1.1:5000/production          signed security@example.com
    registry.redhat.io                  signed security@redhat.com,security@redhat.com
  4. 글로벌 거부 기본 신뢰를 추가하여 노드를 추가로 강화할 수 있습니다.

    $ atomic trust default reject
    
    $ atomic trust show
    * (default)                         reject
    172.30.1.1:5000                     accept
    172.30.1.1:5000/production          signed security@example.com
    registry.redhat.io                  signed security@redhat.com,security@redhat.com
  5. 필요한 경우 추가 구성 옵션에 대한 atomic -trust 를 검토합니다.