Nexus Repository
Nexus Repository can handle both hosted and proxied repositories. Hosted repositories can store and serve your internal packages; whereas, proxied repositories will pull packages from an external (sometimes third-party) source. PyPI in the Python ecosystem would be an example of a proxied repository in the context of your Nexus Repository instance.
Phylum will serve as a remote repository, proxying requests to the actual package registry (e.g., PyPI, npm, etc.) while ensuring that packages that enter your organization’s Nexus Repository adhere to the policy you have defined regarding the acceptable use of open source libraries/packages.
Create a New Proxy Repository​
-
Create a proxy repository for Phylum. Click on the gear icon to go to the admin UI, then Repositories, then Create Repository.
-
Select the proxy version of the appropriate package repository to which you would like to apply the policy. See current Phylum supported ecosystems here.
-
Provide a name for your proxy repository in the
Name
field. -
In the
Remote storage
field, enter the Phylum registry URL for the ecosystem you are configuring. -
Reduce the values in the
Maximum metadata age
andNot found cache TTL
fields. With the default value of 1440 minutes, changes to whether a package is allowed or blocked by policy can take up to an additional day. -
In the HTTP section, enable username authentication. In the
Username
field enter the Phylum organization and group where you previously defined your policy. In thePassword
field, enter a Phylum API key with permission to access this group.
Update Group Repository​
Group repositories in Nexus Repository overlay all your hosted and proxied repositories, giving you a single host to use in your configuration. This makes the decision-making process for pulling a package from your hosted or proxied artifacts opaque to the end user.
Once you have created a proxy repository for Phylum, you should update your group repository to use it.
-
Click on the gear icon to go to the admin UI, then Repositories, then the repository you want to update.
-
In your group repository, scroll down to Member repositories.
-
Under the
Members
section, remove the existing proxy by clicking on it to select and then clicking on the arrow pointing to the left.
-
Under the
Available
section, add your Phylum proxy repository by clicking on it to select and then clicking on the arrow pointing to the right. -
Save your settings using the blue
Save
button at the bottom of the screen.