Configuring upstreams

Adding and configuring upstreams for a registry

Upstreams are configured in Bytesafe on the Upstreams tab for a specific registry.

Upstream overview

Upstreams are registry specific (not shared between registries). Allowing users to configure different upstream setups for different scenarios.

Adding new upstreams

On the upstreams page additional upstreams can be added to a registry.

To add a new upstream, click Add upstream button.

In the sidebar, select the upstream type in the drop-down list and enter any required fields.

add-registry-upstream

Editing and deleting upstreams

Existing upstreams can be edited or deleted. Click the Settings button on an existing upstream to open the edit menu.

Save settings after making edits to save changes or use the Delete button to delete the upstream.

Upstream priority

For a Bytesafe registry with more than one configured upstream, the priority of upstreams affect how information/packages are fetched by Bytesafe.

When a request for available package versions is passed from a registry to an upstream, all upstreams will be searched for the requested information. But when more than one upstream contains the requested version, the package will be pulled from the one with the highest priority.

This allows configurations where one upstreams always should take precedence over another.

To change the upstreams priority order, drag-and-drop upstream order (highest priority at the top).

Internal upstreams

Upstreams outside the Bytesafe workspace can be flagged as internal. This option only applies to External URL upstreams.

This allows trusted registries outside the workspace to be used as source for internal packages. Any package version available in an internal upstream will be considered internal.

Different kinds of upstreams

Public npm registry as an upstream

Using the public npm registry (registry.npmjs.org) as an upstream is a very common use case. As such it comes pre-configured as a drop-down option when adding upstreams.

Pulling packages from the public registry does not require an authentication token and as such adding tokens for registry.npmjs.org is optional. For users that want to publish package versions from Bytesafe to the public registry, a valid authentication token is required.

To add the public registry as an upstream, select it in the drop-down list and add it to the registry (no additional fields are required).

Bytesafe registry as an upstream

Using another Bytesafe registry as an upstream is also a common use case, especially for organizations that use multiple registries for different scenarios.

When your workspace contains more than one registry, the other registries are automatically made available as possible upstreams in the drop-down list.

To add another Bytesafe registry as an upstream, simply select it in the drop-down list and add it to the registry.

URL to any npm compatible registry

Using a URL to a custom npm compatible registry is also a valid option for an upstream. This could be another Bytesafe registry outside of your workspace or any other compatible npm registry provider.

To add such an upstream, select the Custom URL option in the drop-down list in the “Other upstreams” section and add the URL to the registry and any other information required for access the registry (authentication token or similar).

Git repository as an upstream

A Git repository can also be used as an upstream for a registry. This is applicable for both public and private repositories. This enables users to pull packages dependencies that are not available in an npm registry or to access project branches directly in a Git repo.

You can add a Git repository upstream either as:

  1. Custom URL to the Git repo when adding a upstream. Any URL that ends in .git will be handled as a Git repo.
  2. Use the Github integration available in Bytesafe - this is an option for users that want to add their own GitHub repos as upstreams in Bytesafe.

For users that want to make use of Git or GitHub integrations, make sure to read the in-depth section on how to configure Git repository as upstream. This page covers common use cases and best practices when using Git with Bytesafe.