cpan firewall demo - michaelmworthington/codesamples GitHub Wiki
This page walks through the steps to set up NXRM and a Perl Docker container to test CPAN Firewall using https://www.cpan.org/
See the community docs at https://github.com/sonatype-nexus-community/nexus-repository-cpan
- Prerequisites
- Step 1. Create a new Proxy Repository in NXRM
- Step 2. Enable Firewall for the New Proxy Repo
- Step 3. Run Docker Image for the Dependency Manager
- Step 4. Set the environment to download packages from NXRM
- Step 5. Install a package
- Step 6. Browse NXRM to view it
- Step 7. View the Firewall Report
- Step 8. Test Quarantine
- Step 9. Notes
- IQ Server installed and running
- NXRM 3 installed and running and configured with the IQ Server
- Docker for Mac installed and running
Use https://www.cpan.org/ as the Remote URL. Accept default values for the remainder of the settings.
docker run -it --rm cpan/perl-common bash
unlike the centos image used in the Yum Firewall Demo, this image runs the 'maven' command when starting the container, rather than plain 'bash'. since i want to run a couple maven commands, force docker to run bash.
cpan
o conf urllist
o conf urllist http://host.docker.internal:8081/repository/cpan.org-proxy/
install Log::Log4perl
Observe the inbound requests to NXRM in the request.log file:
172.17.0.1 - - [12/Nov/2020:22:26:12 +0000] "GET /repository/cpan.org-proxy/authors/01mailrc.txt.gz HTTP/1.1" 200 - 261030 2541 "libwww-perl/6.35" [qtp1704519059-161]
172.17.0.1 - - [12/Nov/2020:22:26:14 +0000] "GET /repository/cpan.org-proxy/modules/02packages.details.txt.gz HTTP/1.1" 200 - 2350397 1574 "libwww-perl/6.35" [qtp1704519059-47]
172.17.0.1 - - [12/Nov/2020:22:26:41 +0000] "GET /repository/cpan.org-proxy/modules/03modlist.data.gz HTTP/1.1" 200 - 248 2541 "libwww-perl/6.35" [qtp1704519059-161]
172.17.0.1 - - [12/Nov/2020:22:26:48 +0000] "GET /repository/cpan.org-proxy/authors/id/E/ET/ETJ/Log-Log4perl-1.53.tar.gz HTTP/1.1" 200 - 280026 3573 "libwww-perl/6.35" [qtp1704519059-161]
172.17.0.1 - - [12/Nov/2020:22:26:50 +0000] "GET /repository/cpan.org-proxy/authors/id/E/ET/ETJ/CHECKSUMS HTTP/1.1" 200 - 42325 2402 "libwww-perl/6.35" [qtp1704519059-50]
172.17.0.1 - - [12/Nov/2020:22:27:33 +0000] "GET /repository/cpan.org-proxy/authors/id/M/MS/MSCHOUT/Log-Dispatch-FileRotate-1.36.tar.gz HTTP/1.1" 200 - 29142 1308 "libwww-perl/6.35" [qtp1704519059-47]
172.17.0.1 - - [12/Nov/2020:22:27:34 +0000] "GET /repository/cpan.org-proxy/authors/id/M/MS/MSCHOUT/CHECKSUMS HTTP/1.1" 200 - 60727 1278 "libwww-perl/6.35" [qtp1704519059-161]
172.17.0.1 - - [12/Nov/2020:22:27:37 +0000] "GET /repository/cpan.org-proxy/authors/id/S/SB/SBECK/Date-Manip-6.82.tar.gz HTTP/1.1" 200 - 2015204 1754 "libwww-perl/6.35" [qtp1704519059-47]
172.17.0.1 - - [12/Nov/2020:22:27:38 +0000] "GET /repository/cpan.org-proxy/authors/id/S/SB/SBECK/CHECKSUMS HTTP/1.1" 200 - 13858 1226 "libwww-perl/6.35" [qtp1704519059-169]
172.17.0.1 - - [12/Nov/2020:22:27:47 +0000] "GET /repository/cpan.org-proxy/authors/id/S/SB/SBECK/Test-Inter-1.09.tar.gz HTTP/1.1" 200 - 44460 1548 "libwww-perl/6.35" [qtp1704519059-169]
Repo List
IQ Server Report
Not Supported |
---|
Not Supported |
---|