IBM z/OS Product OCI Artifacts

The IBM Z® and Cloud Modernization Stack offering uses OCI artifacts to package software that can be installed onto z/OS systems using the IBM z/OS Package Manager.

What OCI artifacts are provided?

The following OCI artifacts are provided and supported by IBM z/OS Package Manager:

  • IBM 64-bit SDK for z/OS, Java™ Technology Edition
  • IBM C/C++ for Open Enterprise languages on z/OS
  • IBM Open Enterprise SDK for Go
  • IBM Open Enterprise SDK for Node.js
  • IBM Open Enterprise SDK for Python
  • IBM Z Open Automation Utilities

OCI artifacts are signed, and the signature that is created can be verified. A digital signature provides a way for consumers of content to ensure that what they download is both authentic (it originated from the expected source) and has integrity (it is what we expect it to be).

Verifying OCI artifact signatures by using Skopeo

This section describes how to verify the signatures of the OCI artifacts by uisng Skopeo.

Prerequisites

To perform signature verification: The host machine must have these command line tools installed (they can usually be installed on Linux using the package manager):

The IBM Z and Cloud Modernization Stack public key must exist on the same host machine as above. Copy the text block below exactly as shown into a text editor, and save it in a file named public.gpg.

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGI3wAABEADBxOMDWqyT4FrxpYoe9FVV494dQUfOuTrRMUJFIm9h0r2H4Yrp
eRMIkgRGaTHk4I+7hLu2SuuL16yn9lizeXh+N/SR0WR8ohEbpLXaJvWqO4rAF5Bt
tD7rzcGMEwNYLylzCCxvtJD6naNJAJdP92I22L5SvCV8iC0sMfkAJL6jQygdqlzt
Wz/OGSAkOpwAxns0qxiUvgut2Ab3I0uYbSoHCj6DBIn74Hgdq79SuTXaDt9MTSb6
+xpw7K2iuStpKNk/gLtZgmmnOStc6wqbfY7RbgNgPmctJax/hQNdhhWE6RfvM0Gl
k6hJXXAUe9Cve+Hd2aw1uWkydAbPFxQxgaBOviGMfMTg0PIdFshx2+QfPPgeJRKp
8thVzYMboHx4PPTrytklw2vbOik6cwRlG5nv39uoO/7s5Op9F5cXIjbj3MzmYtZt
HA6pVyIT9MqgCqA4uh4GaD1rvMVIvU9vNhjaRd5lhRULLArq4/C9ICcn+qN/Nhdu
gt1AlkXY2g8KHMBtH2rhTxhqY8B26QwVQ2Jqy64sRxuPdvW1zwjtYO2qGi28L+9p
x27sPf3Js3gOubryCZ93Ud+pW8GiQFZaIXN2VLaQQ/q/1zWzMjZIct9DVdadDN1k
XrK65w66JSVmVCYL1muzmHkCdCsuN4DM8Qk741/L4Dd3ybRRSsLbo/ZaowARAQAB
tAN6cG2JAjkEEwEIACMFAmI3wAACGy8HCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIX
gAAKCRAhV2fLRCwXoN5UEACf3DH3NvlIWJkRpIcESu+2E7ibyedGQmyxm5rhmovf
PDRzV59VrteBXH/bZTZ7vPOYTYyPa6lFkR3pbvjyQitq0NZholZaqZg3cGO8sraO
4Ed2bqgvbqeBasM/YF02eVBui8DEfkwW4hmLtSiGEol8bm1sLKHnDLOF6q5JpbEl
wPXtXScJtuGTWZT3JVPcPBGpA0PikvBseSHQI84fAXGEW0Rk1GXFKJBO1St/G8Ya
dgar25eCEHLBGW/MmYUbLJMVnH/GTF9QPDNbmMZ+tDLk3rdUfSrhtrDtF/KNzkyP
5ymhG0ztp+q5qCAJm42Vi23acUMByZYvQHJilvTFkL/8nXBpvUcfKPzbDA3/6J6K
RbYNJDpPTIQcaJQpJuoRrboPksrmf7URCn4L9o9TXQZAZayfinYzCARwamccxf6O
YI6+TxpEBetbK2+RGSgR9L7dXtQU3lxvfji0ClnQRDnSC+/01xYQZRIRV3GWO14W
Fm4TgeRs8jpLEm9lQa3TM9owcsE4bW9xo69N8eO4xaco4P5q1YlED8IGMPqKDkOF
yCASOCluj69FWqR36rNKNg00Y4TzHTmcsRfeb12zqO8vp6Of99B8EdF1rx35EAlh
EO7QfK+6miT4VD0RoUSIp+EFmhu5LqA7Qz5moUAMG6Rj3F6tJ2iz98pwaH2HJbZT
NA==
=sCZi
-----END PGP PUBLIC KEY BLOCK-----

Procedure

  1. Import the IBM Z and Cloud Modernization Stack public key on the machine you prepared according to the Prerequisites section above:
sudo gpg2 --import public.gpg
  1. Calculate the fingerprint:
fingerprint=$(sudo gpg2 --fingerprint --with-colons zpm | grep fpr | tr -d 'fpr:')

Note: This command stores the key's fingerprint in an environment variable called fingerprint, which is need for the command to verify the signature. When you exit your shell session, the variable will be deleted. The next time you log in to your machine, you can set it again by rerunning the command.

  1. Create a directory for the artifact and use skopeo to pull it into local storage:
mkdir artifact
skopeo --override-os linux copy docker://icr.io/zpm/<oci_artifact_name>:<version> dir:./artifact

This command downloads the image as a set of files and places them in the artifact directory (or another directory that you choose). The oci_artifact_name and version should be replaced with the OCI artifact and version that you want to verify. For example, oci_artifact_name could be node and the version could be 16.0.0.2 which would look like node:16.0.0.2.

  1. Verify the signature:
skopeo standalone-verify ./artifact/manifest.json icr.io/zpm/<oci_artifact_name>:<version> ${fingerprint} ./artifact/signature-1

Verification confirmation output will be similar to:

Signature verified, digest sha256:0000000000000000000000000000000000000000000000000000000000000000

Verifying OCI artifact signatures by using Cosign

This section describes how to verify the signatures of the OCI artifacts by using Cosign.

Prerequisites

To perform signature verification: The host machine must have Cosign command line tool installed (they can usually be installed on Linux using the package manager).

The IBM Z and Cloud Modernization Stack public key must exist on the same host machine as above. Copy the text block below exactly as shown into a text editor, and save it in a file named public.key.

-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvbuoN/62JoEh0ugIrRan
hTAWhImScmMXz3QDkRkZ5vFEXfKlsUov1mdDzR1FX2m/nC4h9b7ZisB0PxR3wMMC
BcygzquyqQq4yKkJJKBUk0Q+Up4BzVg6rL8N40X15LyfvtXv2PrL7MjqlnxiA7oI
vUQki9/TTu3xx4tL7b1YQoeiZrb+FnYqVuBjX7FeOwxMqgM0vYFVTps7b7bDoBMf
n47ayVsP5Qod9gGaXIQKw5uuY95eh4Eh7XFnYDguDPqJyGWGp9c1QNx1ugGughxY
pfpaROyir+pkUtlBcJz5ShBm7vZXQXT2nUYoEi2uvEDszMbCB9xb+1ckOod7//xA
HFfwHxPSgH56/4X+YgrHc10mKiVvRe3Z5zIGXtkYoW3DvQXbR2NTuWnCgqV6TtIA
WjYPl/pkwsUyYpngZ71l/CRjbx7PK04I3fV31n8xEh2xBx5841sbvC9HWPx1vSei
MchEM/EmuvzVDaOL3/29san/lIYAy/vMRmEWnCKyXl07U6v8Ydi2nBzrystsW2dO
uwJiminjYj9RavB1xC3SM/LblOAJeD7zjifHzWVB8WRtz2sd/5ynD6qR35GXQ6Sm
nGkUkXLQUBtdo6wt3eAHAzDAnvx0UG3lNGqjayuTRihzldpGGcVh3Nl9LIrHh1eQ
io3T6Yxh/hQxHPGFTz0Be08CAwEAAQ==
-----END PUBLIC KEY-----

Verify the signature

cosign verify --key public.key icr.io/zpm/<OCI artifact name>:<version> --insecure-ignore-tlog=true

Note: When using Cosign 1.x or earlier, do not use --insecure-ignore-tlog=true flag.

Verification confirmation output will be similar to:

WARNING: Skipping tlog verification is an insecure practice that lacks of transparency and auditability verification for the signature.
Verification for icr.io/zpm/<OCI artifact name>:<version> --
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":"icr.io/zpm/<OCI artifact name>"},"image":{"docker-manifest-digest":"00000000000000000000000000000000000000000001"},"type":"cosign container image signature"},"optional":{"Subject":""}}]