|
| 1 | +# Nexus Repository |
| 2 | + |
| 3 | +Nexus Repository can handle both hosted and proxied repositories. Hosted |
| 4 | +repositories can store and serve your internal packages; whereas, proxied |
| 5 | +repositories will pull packages from an external (sometimes third-party) |
| 6 | +source. PyPI in the Python ecosystem would be an example of a proxied |
| 7 | +repository in the context of your Nexus Repository instance. |
| 8 | + |
| 9 | +Phylum will serve as a remote repository, proxying requests to the actual |
| 10 | +package registry (e.g., PyPI, npm, etc.) while ensuring that packages that |
| 11 | +enter your organization’s Nexus Repository adhere to the [policy you have |
| 12 | +defined](../knowledge_base/policy.md) regarding the acceptable use of open |
| 13 | +source libraries/packages. |
| 14 | + |
| 15 | +## Create a New Proxy Repository |
| 16 | + |
| 17 | +1. Create a proxy repository for Phylum. Click on the gear icon to go to the |
| 18 | + admin UI, then Repositories, then Create Repository. |
| 19 | + |
| 20 | +  |
| 22 | + |
| 23 | +2. Select the proxy version of the appropriate package repository to which you |
| 24 | + would like to apply the policy. See current [Phylum supported ecosystems |
| 25 | + here](./about.md#supported-ecosystems). |
| 26 | + |
| 27 | +  |
| 29 | + |
| 30 | +3. Provide a name for your proxy repository in the `Name` field. |
| 31 | +4. In the `Remote storage` field, enter the [Phylum registry |
| 32 | + URL](./about.md#supported-ecosystems) for the ecosystem you are configuring. |
| 33 | +5. Reduce the values in the `Maximum metadata age` and `Not found cache TTL` |
| 34 | + fields. With the default value of 1440 minutes, changes to whether a package |
| 35 | + is allowed or blocked by policy can take up to an additional day. |
| 36 | +6. In the HTTP section, enable username authentication. In the `Username` field |
| 37 | + enter the [Phylum organization and group](../knowledge_base/groups.md) where |
| 38 | + you previously [defined your policy](../knowledge_base/policy.md). In the |
| 39 | + `Password` field, enter a [Phylum API key](../knowledge_base/api-keys.md) |
| 40 | + with permission to access this group. |
| 41 | + |
| 42 | +  |
| 45 | + |
| 46 | +## Update Group Repository |
| 47 | + |
| 48 | +Group repositories in Nexus Repository overlay all your hosted and proxied |
| 49 | +repositories, giving you a single host to use in your configuration. This makes |
| 50 | +the decision-making process for pulling a package from your hosted or proxied |
| 51 | +artifacts opaque to the end user. |
| 52 | + |
| 53 | +Once you have created a proxy repository for Phylum, you should update your |
| 54 | +group repository to use it. |
| 55 | + |
| 56 | +1. Click on the gear icon to go to the admin UI, then Repositories, then the |
| 57 | + repository you want to update. |
| 58 | + |
| 59 | +  |
| 62 | + |
| 63 | +2. In your group repository, scroll down to Member repositories. |
| 64 | + |
| 65 | +  |
| 67 | + |
| 68 | +3. Under the `Members` section, remove the existing proxy by clicking on it to select and then clicking on the arrow pointing to the left. |
| 69 | + |
| 70 | +  |
| 74 | + |
| 75 | + --- |
| 76 | + |
| 77 | +  |
| 80 | + |
| 81 | +4. Under the `Available` section, add your Phylum proxy repository by |
| 82 | + clicking on it to select and then clicking on the arrow pointing to the right. |
| 83 | + |
| 84 | +  |
| 87 | + |
| 88 | +5. Save your settings using the blue `Save` button at the bottom of the screen. |
0 commit comments