OpenShift integrated Docker registry
To scan an OpenShift integrated registry, create a new registry scan setting.
Create a new registry scan
Prerequisites:
Install a Defender and make sure that the defender can access the OpenShift registry.
Use the
twistlock-serviceservice account to authenticate to the internal registry. The Defender authenticates to the OpenShift registry using this service account.Add the cluster role permission of registry-viewer to the
twistlock-serviceaccount.oc adm policy add-cluster-role-to-user registry-viewer system:serviceaccount:<twistlock_project>:twistlock-serviceObtain the password for the twistlock-service account.
To get the secret used by the service account run the command -
oc describe sa twistlock-service -n <twistlock_project>.Use the Image pull secrets value (
twistlock-service-dockercfg-64jtt) in the following command, for example:oc get secret twistlock-service-dockercfg-64jtt -n twistlock --output=json|grep openshift.io/token-secret.valueCopy the openshift.io/token-secret.value to be used later in the workflow.
If you use the OpenShift UI to obtain the token, select view-all to see the full token.
Place the CA certificate (
ca.cert) file in any of the following paths. As soon as the certificate is found in a path, the search stops and doesn’t go the next path./etc/docker/certs.d/<registry-URL>//etc/containers/certs.d/<registry-URL>//etc/containerd/certs.d/<registry-URL>/Set up OpenShift credentials with basic authentication in Credentials store and grant Prisma Cloud access to your repository in OpenShift.
Open Console, then go to Defend > Vulnerabilities > Images > Registry settings.
Select Add registry.
In Version, select Red Hat OpenShift.
In Registry, enter the registry address.
The internal address to access the OpenShift registry is
image-registry.openshift-image-registry.svc:5000.In Repository , specify the repository to scan.
If you leave this field blank or enter a wildcard, Prisma Cloud finds and scans all repositories in the registry.
If you specify a partial string that ends with a wildcard, Prisma Cloud finds and scans all repositories that start with the partial string.
If you specify an exact match, Prisma Cloud scans just the specified repository.
Enter Tag numbers to scan, leave blank, or enter a wildcard (*) to scan all the tags.
Optionally, enter Tags to exclude, to avoid scanning images with specified tags.
In Credential, select OpenShift credentials that you created in the prerequisites section.
In Password, enter your service account token.
In OS type, specify whether the repo holds Linux or Windows images.
In Scanners scope, specify the collections of defenders to use for the scan.
Console selects the available Defenders from the scope to execute the scan job according to the Number of scanners setting. For more information, see deployment patterns.
In Number of scanners, enter the number of Defenders across which scan jobs can be distributed.
Set Cap to the number of most recent images to scan. Leaving Cap set to 5 will scan the 5 most recent images. Setting this field to 0 will scan all images.
Select Add and scan. Verify that the images in the repository are being scanned under Monitor > Vulnerabilities > Images > Registries.
Troubleshooting
x509: certificate signed by unknown authority
Check if the defender can access the OpenShift registry.
Make sure that you have installed the
ca.certfile in any one of the following locations:/etc/docker/certs.d/<registry-URL>//etc/containers/certs.d/<registry-URL>//etc/containerd/certs.d/<registry-URL>/
Last updated
Was this helpful?

