6.6. 서명을 확인하도록 클라이언트 구성

Prerequsites

  • 클라이언트에는 서명을 확인하도록 구성된 sudo 권한이 있어야 합니다.

절차

  1. 터미널에서 다음을 입력합니다.

    > sudo <name of editor> __/etc/containers/policy.json__

이 파일은 다음과 유사할 수 있습니다.

    {
        "default": [{"type": "reject"}],
        "transports": {
            "docker": {
              "quay.io": [{"type": "insecureAcceptAnything}],
              "docker.io": [{"type": "insecureAcceptAnything}],
              "_<server-address>_": [
                {
                    "type": "signedBy",
                    "keyType": "GPGKeys",
                    "keyPath": "/tmp/containersig.txt"
    }

이 명령은 quay.io 또는 docker.io 에서 기본 유형의 거부 를 재정의하는 insecureAcceptAnything 이기 때문에 검증이 없음을 보여줍니다. 그러나 매개변수 유형이 "signedBy"' 로 설정되었으므로 < server-address >에서 확인됩니다.

참고

현재 지원되는 유일한 keyType 은 GPG 키입니다.

  1. &lt ;server-address > 항목에서 키 파일의 이름을 반영하도록 keyPath <1>를 수정합니다.

        {
            "default": [{"type": "reject"}],
            "transports": {
                "docker": {
                  "quay.io": [{"type": "insecureAcceptAnything}],
                  "docker.io": [{"type": "insecureAcceptAnything}],
                  "_<server-address>_1": [
                    {
                        "type": "signedBy",
                        "keyType": "GPGKeys",
                        "keyPath": "/tmp/<key file name", 1
                        "signedIdentity": {
                          "type": "remapIdentity",
                          "prefix": "_<server-address>_",
                          "signedPrefix": "0.0.0.0:8002"
        }
  2. 파일을 저장한 후 닫습니다.
  3. podman 또는 선택한 클라이언트를 사용하여 파일을 가져옵니다.
> podman pull _<server-address>_/<container-name>:<tag name>
--tls-verify=false

이렇게 하면 오류 없이 서명을 확인합니다.