Skip to content

Commit 386fdbd

Browse files
matt-phylummaxrake
andauthored
copy artifactory page for nexus (#274)
This is basically a copy of the Artifactory documentation adapted for Nexus. These instructions are applicable for all the supported ecosystems, but so far I have only tested restoring packages from PyPI and Cargo. I think it's a good idea to recommend reducing the cached time, but I don't have advice on how the user should determine a more appropriate value. ## Checklist - [ ] Does this PR have an associated issue (i.e., `closes #<issueNum>` in description above)? - [ ] Have you ensured that you have met the expected acceptance criteria? --------- Co-authored-by: Charles Coggins <[email protected]>
1 parent 5bd1b26 commit 386fdbd

File tree

11 files changed

+91
-0
lines changed

11 files changed

+91
-0
lines changed

assets/nexus/authentication.png

16.4 KB
Loading

assets/nexus/create_repo.png

274 KB
Loading

assets/nexus/repos.png

294 KB
Loading

assets/nexus/select_recipe.png

234 KB
Loading

assets/nexus/select_repo_1.png

169 KB
Loading

assets/nexus/select_repo_2.png

175 KB
Loading

assets/nexus/select_repo_3.png

169 KB
Loading

assets/nexus/select_repo_4.png

169 KB
Loading

docs/package_firewall/about.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ registries:
3434
| Artifact Repository | Information Link |
3535
| ------------------- | ---------------- |
3636
| Artifactory | [Documentation][Artifactory] |
37+
| Nexus Repository | [Documentation][Nexus] |
3738

3839
### Package Registries
3940

@@ -54,6 +55,7 @@ receive those notifications, you can [setup webhooks].
5455

5556
[setup webhooks]: ./api.md#webhooks
5657
[Artifactory]: ./artifactory.md
58+
[Nexus]: ./nexus.md
5759
[Cargo]: ./cargo.md
5860
[Golang]: ./golang.md
5961
[Maven]: ./maven.md

docs/package_firewall/nexus.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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+
![The repositories administration page with the "Create repository" button
21+
highlighted](../../assets/nexus/create_repo.png)
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+
![A list of repository recipes with "pypi (proxy)"
28+
highlighted](../../assets/nexus/select_recipe.png)
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+
![HTTP authentication section with the authentication type set to
43+
"Username," the username set to "\<PHYLUM_ORG>/\<PHYLUM_GROUP>," and the
44+
password set to "\<PHYLUM_API_KEY>"](../../assets/nexus/authentication.png)
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+
![Repositories administration screen showing the list of available
60+
repositories with a group repository named "pypi"
61+
highlighted](../../assets/nexus/repos.png)
62+
63+
2. In your group repository, scroll down to Member repositories.
64+
65+
![The member repositories section of the group repository administration
66+
page](../../assets/nexus/select_repo_1.png)
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+
![The member repositories section of the group repository administration
71+
page with a repository "pypi-proxy" selected in the "Members" column on the
72+
right and the left arrow highlighted with the tooltip "Remove from
73+
Selected"](../../assets/nexus/select_repo_2.png)
74+
75+
---
76+
77+
![The member repositories section of the group repository administration
78+
page with the "pypi-proxy" repository moved to the "Available" column on
79+
the left](../../assets/nexus/select_repo_3.png)
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+
![The member repositories section of the group repository administration
85+
page with the "pypi-phylum" repository moved into the "Members" column on
86+
the right](../../assets/nexus/select_repo_4.png)
87+
88+
5. Save your settings using the blue `Save` button at the bottom of the screen.

0 commit comments

Comments
 (0)