- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Prisma Cloud can scan container images in public and private repositories on public and private registries. The registry is a system for storing and distributing container images. The most well-known public registry is Docker Hub. One of the main repositories Prisma Cloud customers use is JFrog Artifactory. This article describes how Prisma Cloud works with this registry.
JFrog Artifactory requires that every image added to the main repository, be added as a new Registry Scanning inside Prisma Cloud. When adding more than one image inside a main repository, you need to add a registry scanning per each image to be scanned properly. Using a wildcard is not supported by Prisma Cloud at this time.
To accomplish this, you will need to:
Create VPCs in different accounts and/or the same Region
Figure 1 : VPC peering_PaloAltoNetworks
Figure 2 : VPC Create Peering_PaloAltoNetworks
A VPC peering connection that’s in the pending-acceptance state must be accepted by the owner of the accepter VPC to be activated. You cannot accept a VPC peering connection request that you've sent to another AWS account. If you are creating a VPC peering connection in the same AWS account, you must both create and accept the request yourself.
If the VPCs are in different regions, the request must be accepted in the region of the accepter VPC.
Figure 2a : VPC peering DNS_PaloAltoNetworks
Figure 2b : VPC peering route_PaloAltoNetworks
Figure 2c : VPC peering routes_PaloAltoNetworks
Figure 2d : VPC peering routes3_PaloAltoNetworks
Allow access from the source communication VPC on the Security Group of the Service
Create EC2 Instance :
https://docs.aws.amazon.com/efs/latest/ug/gs-step-one-create-ec2-resources.html
We need to add the entry for the new network address on the security group of the services you permit access to/from another VPC.
Figure 2e : VPC peering inbound_PaloAltoNetworks
For Source, do one of the following:
Figure 2f : VPC peering inbound2_PaloAltoNetworks
For more info, review AWS VPC documentation below:
Work with VPC peering connections
Figure 3a : ping target_PaloAltoNetworks
Figure 3b : ssh target_PaloAltoNetworks
Install a Container Defender On the Scanner EC2
Copy the install scripts command from the right side panel, which is generated according to the options you selected. On the host where you want to install Defender, paste the command into a shell window, and run it.
For more info, review the Prisma Defender documentation below :
Install a Single Container Defender
Install NGINX on The Private JFROG Instance
Registry scanning requires a secure connection which is HTTPS. Hence, we need to setup nginx reverse proxy in front of Artifactory. A reverse proxy configuration can be generated in the Artifactory UI by going to Administration->Artifactory->HTTP Settings.
This will need to be copied to your nginx config. You will need to have your own SSL certs and key and place them in the correct directory specified in the nginx config. Below is a sample configuration for reference:
To install Nginx on an EC2 instance running a Linux distribution such as Amazon Linux, CentOS, Ubuntu, or Debian, you can follow these general steps:
sudo yum install nginx -y
sudo apt install nginx -y
Figure 4 : jfrog.conf_PaloAltoNetworks
Enable Route 53 TO Point to the Private Jfrog IP
Set up a Route 53 Private Hosted Zone:
Create a Record Set:
Update VPC DNS Settings:
Solution Architecture
Figure 5 : solution architecture_PaloAltoNetworks
The Scanner instance attempts to resolve the DNS private-jfrog.jmontufar.org of the JFROG instance. Route 53 indicates that the DNS private-jfrog.jmontufar.org corresponds to the server with IP address 10.0.138.85. Subsequently, the Scanner instance initiates a TLS negotiation request to the IP address 10.0.138.85, including the DNS private-jfrog.jmontufar.org in the request.
NGINX identifies the requested DNS as belonging to the default route and begins TLS negotiation, providing the Server Certificate for the negotiation. As the certificate installed on NGINX is a wildcard certificate (*.jmontufar.org) and the requested DNS is private-jfrog.jmontufar.org, the Scanner instance recognizes the certificate as valid and proceeds. Upon successful TLS negotiation, NGINX forwards scanning requests from the Scanner instance to the private JFROG instance. The Scanner instance subsequently transmits the report back to the Prisma Cloud Compute Console.
Pushed Images to the on-prem Jfrog
docker pull alpine:latest
docker tag alpine:latest <jfrog-domain>/<repository-name>/<image-name>:latest
docker push <jfrog-domain>/<repository-name>/<image-name>:latest
Figure 6 : docker_PaloAltoNetworks
Prisma Cloud registry scan settings
Figure 6a : registry scan_PaloAltoNetworks
Prisma Cloud Vulnerability Report
Figure 6b : vuln report_PaloAltoNetworks
By integrating Prisma Cloud with JFrog Artifactory, you can enhance your container security posture by continuously scanning images for vulnerabilities and compliance issues. This integration allows seamless monitoring and remediation, ensuring that your containerized applications remain secure throughout their lifecycle.
Omoniyi Jabaru is senior customer success engineers specializing in Prisma Cloud, Next-Generation Firewall, AWS, Azure, GCP, containers and Kubernetes. He uses simple approaches to break down complex problems into solutions for global enterprise customers and leverage their multi-industry knowledge to inspire success.