Validating the Verify Bridge on Docker Image signature

The icr.io/isv-saas/verify-bridge:latest image on IBM® Container Registry is signed and when the image is pulled down to your machine this signature can be validated by using Skopeo or Podman.

Before you begin

You need the public key.
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGQjSS0BEADBqABkTk0zd3CYmDWlA+NupW8Pn6gWni6xfpARhVZPmBP/DI/u
s+wuaEJVgA9Sf13qlFdd166BCYayFv3V7bbwX2i0sXVqSR6dxkigM+Y700e0VhDC
eGyTnLIwG5z3SEG26Wo0y+3x14tWe0jG7hV01lb2rx+1k9k4pHfA6AOPVtuYEmoC
ZrIstMcTa6hPGft2wJL1tnpB+MRLp1DlnFiaLo9FWFJ1zEELSNAkUw+zJNRrnzpT
C3RGh+I0byqB4EKxa2+P8minLetQVEt9wBc7Yr2BngHWKWAMiWTpZOhu3WhUrWxm
mTdshdvu0xw+HeRMFzARQMddDpmBtrkRhSXCsvNRIaElhZcZXm7UMzW5w/NK7H1w
dyB2HKiGZBcD4gdx2iBSJtMHrlKua0Cvrz7AVabYw7hR29TtmRaH8q4eMp/yRNt3
abZ9SZsEPAxv6Ur33AaqxO7s4z9fWXg51j/YtL3VnXiAsY+MbDxUwsn6vpK6IVPW
lmm/7V2PZDmq0+9OdV6poi2IvYKtozD1/oM5kE5WEDn0p/HL8XPg6GcgVSd+rh+J
Z37AccDjs9UHNBseCkQk1zFrfjP+HWZbb6GzZecMIjThagA2VjxYM+GDlE6AAElf
pdZhI/nZR14csUoOgPVPbHI+HS6KQSs32hhev3X10AnYo6rGTObZx80ArQARAB
tC1JQk0gU2VjdXJpdHkgVmVyaWZ5IEJyaWRnZSA8cHNpcnRAdXMuaWJtLmNvbT6J
AjoEEwEIACQFAmQjSS0CGw8FCwkIBwIGFQoJCAsCBBYCAwECHgEFCQAAAAAACgkQ
AQH8KJX/rscK7BAAlpPIi/Wjqroryw560p6GxvjHRbB/rofIbyled5u7Mw/U74Nl
6x/P8Vytpxx/om5JgbP/OP01iHakeJHHkpgux7bJYqvMRlWlR88H806gVAttaFUU
DKQzchVP1R+/gqaoXpNDmZytapYcsDICX+B2aXo1MshTKoYd8MYOnoKnm69dhqlL
ImzMxZk9bRvmsOrx4XB7+1IdoBA/Hck0xrsQTlQocHy4IQICErnJwgYhoSClcSjG
6Nm6p+BfR4oWwKmj51OyzGr7aywJu3304ZE4Ea1qGWVAoF+FinbVcHuA6mYGA+cf
TsZcqsNaMct7KDnC9lzRQpY6MzghHaCAHqE2oIfp7uSCfNYqtN5GQTC6VBcFALoK
Nxm2+YI6WDpJKx4nkGm4NpPsFFF0meofqWMu/oB4U+lADPhJvmqTNxjdqcc+gjEL
skLnA5dkijownmzwWHQHEPzl00Fdx3LS4v26rT0jE/HCrUIhKNrr82hQ90ELGwas
o5gcMuXd85qO1FzPrBKKZU1Ax2SH6J1TYZ6El5i//qUAHY7vc5M+a64IiyWBEol3
xu68GqEBRQi3ZrCNIxZ0ulhOUcs7G275mKClw4uy+f18i91SlyX1zdZ18W9ENcNf
8QY6g9cU6Gn6SfLNnr0wLAMzFt78ylNQTkfnGqr9egsJiwZGCT7eFNtQ7/s=
=hwfo

-----END PGP PUBLIC KEY BLOCK-----

About this task

The container runtime that Red Hat® OpenShift®, Skopeo, and Podman use are a policy.json file that describes the signature validation policy. When the policy is created and applied to the container tools (Red Hat OpenShift, Skopeo, or Podman), the policy enforces image integrity by validating the signature. It can also validate other parts of the simple signing payload.

Procedure

  1. Log in to the target system.
  2. Create or update an /etc/containers/policy.json or a file such as ~/policy.json.
    See the Red Hat OpenShift documentation on image policy: podman-image-trust. If you have more than one public key from an old and a new platform or after cert renewal, you can concatenate both gpg public keys and use that file at <public key>.
    For example,
    {
        "default": [
            {
                "type":"reject"
            }
        ],
        "transports":
            {
                "docker":
                    {
                        "": [{ "type": "signedBy", "keyType": "GPGKeys", "keyPath": "<path to public keyfile>"}]
                    }
            }
    }
  3. Specify the method to validate Verify Bridge on Docker Image Signature by using one of the following commands.
    • To validate the signature by using Skopeo to copy to a local temp directory, use the following command.
      skopeo copy --policy ~/policy.json docker://icr.io/isv-saas/verify-bridge:latest dir:./temp
    • To validate the signature by using Skopeo to copy to a local temp directory with the --policy option, use the following command.
      skopeo copy --policy ~/policy.json docker://icr.io/isv-saas/verify-bridge:latest dir:./temp
    • To validate the signature during a pull by using Podman, use the following command.
      podman pull --signature-policy ~/policy.json icr.io/isv-saas/verify-bridge:latest