Package Traffic Controller (PTC)

Route public package traffic through Artifactory via your security edge for JFrog Curation policy enforcement and audit. On Zscaler and Cloudflare Gateway, see who requested each package.

JFrog Package Traffic Controller (PTC) intercepts public package traffic at the network layer and routes it through Artifactory, so JFrog Curation policies and audit logging apply to every intercepted install without changing how developers work. PTC integrates with your existing security edge, the same tool already inspecting outbound traffic, to redirect matching package requests to Artifactory's /artifactory/api/package-reroute endpoint.

New to PTC? Start with PTC Quick Start for a concise end-to-end walkthrough, then use the linked topics for detailed configuration and troubleshooting.

Once the security edge client, the trust store, and redirect policies are in place, every process on that workstation is governed the same way, whether the install originates from a human developer or an AI coding agent. The technical entry point is the package-reroute service (Router path /package-reroute, REST API under /artifactory/api/package-reroute/).

On Zscaler Internet Access (ZIA) and Cloudflare Gateway, Artifactory records the user who requested the package. See User audit.

Important — PTC requires a remote repository: The Package Reroute repo_key must point to a remote repository. Virtual repositories are not supported as the PTC repo_key. This keeps PTC configuration aligned to the upstream-facing repository used for consumption tracking and Curation behavior.

📘

Note

Set the PTC repo_key to a remote repository that directly proxies the public registry. PTC doesn't support a Smart Remote repository for this purpose, including one that points to another JFrog service endpoint.

Supported Security Edges

PTC integrates with your existing security edge (SASE) to intercept package traffic and redirect it to Artifactory. JFrog publishes step-by-step guides for these security edges. You follow the guide for the vendor your organization already uses.

For more information about every other security edge, see Other Compatible Security Edges.

For the shared registry hostname reference used by all SASE providers, see Public Registry Hostnames. For deployment order, see Deployment Sequence.

Other Compatible Security Edges

A security edge outside the published guides can send package traffic through PTC when it meets the redirect requirements in this section. Artifactory receives the same /artifactory/api/package-reroute request from each compatible edge. JFrog publishes portal steps for Zscaler, Netskope, and Cloudflare. For every other product, you configure the equivalent settings in that product's administration portal.

The security edge requires:

  • URL category: A URL category or equivalent destination list that matches the intercepted public registry hostnames. See Public Registry Hostnames.
  • SSL inspection: HTTPS decryption for those hostnames so the edge can apply the redirect.
  • HTTP 307 redirect: An HTTP 307 response for GET and HEAD, with the url query parameter set to the percent-encoded original registry URL.
https://<YOUR_ARTIFACTORY_URL>/artifactory/api/package-reroute?url=<percent-encoded-original-url>

The url query parameter is required. For https://registry.npmjs.org/express, use https%3A%2F%2Fregistry.npmjs.org%2Fexpress.

Compatible security edges use the same limits as the published guides:

  • Request methods: Redirect rules include GET and HEAD but exclude POST. Commands such as npm audit send POST and fail when that method is redirected. For huggingface.co, redirect rules include GET only. See Configuration by Package Type.
  • Artifactory exclusion: You exclude the Artifactory hostname from the redirect rule so redirected traffic isn't intercepted again.
  • Certificate trust: You trust the security edge certificate authority (CA) on each workstation before you enable SSL inspection. For more information, see Configure Workstation for PTC.

You validate Artifactory before you enable the redirect. A request to /artifactory/api/package-reroute?url=... returns HTTP 302 or 307 with a Location header that points at your Artifactory remote repository. For more information, see Step 4: Verify the Redirect Endpoint.

Seeing which person requested the package is supported for Zscaler Internet Access (ZIA) and Cloudflare Gateway. Netskope and other security edges record the _package-reroute system user. See User audit.

Supported Package Types (GA)

The following ecosystems are supported for PTC. For detailed client guidance, see Configuration by Package Type.

Supported Workstation Operating Systems

  • Windows
  • macOS
  • Linux

Install scripts, certificate placement, and environment variables, including how to run a downloaded Windows script, are in Configure Workstation for PTC.


How It Works

sequenceDiagram
    participant Dev as DeveloperMachine
    participant SASE as SASE
    participant AF as JFrog_Artifactory
    participant Repo as NPM_Repository
    participant Cur as CurationEngine
    participant Pub as PublicRegistry

    Dev->>SASE: npm install GET registry.npmjs.org/package
    SASE->>SASE: SSL Inspection and URL Match
    SASE-->>Dev: HTTP 307 Redirect to Artifactory
    Dev->>AF: Follow redirect to /artifactory/api/package-reroute
    AF-->>Dev: Redirect to NPM Repository
    Dev->>Repo: Request package
    Repo->>Cur: Check curation policies
    alt Package Approved
        Cur-->>Repo: Approved
        Repo->>Pub: Fetch package
        Pub-->>Repo: Return package
        Repo-->>Dev: Package delivered
    else Package Blocked
        Cur-->>Dev: Policy violation error
    end

The sequence diagram shows the path when JFrog Curation is enabled on the remote that resolves the package. If Curation is not enabled, the curation policy check and approve/block branch do not occur.

A typical redirect format:

<YOUR_ARTIFACTORY_URL>/artifactory/api/package-reroute?url=https%3A%2F%2Fregistry.npmjs.org%2Fexpress

The url value is percent-encoded in real redirects and in curl tests. See Step 4: Verify the Redirect Endpoint.

For end-to-end setup, see Configure Artifactory for PTC and your SASE provider's guide (see Supported Security Edges). For deployment-scope choices (organization-wide vs scoped to specific groups), see Scoped Versus Unscoped Deployment.


User audit

On Zscaler Internet Access (ZIA) and Cloudflare Gateway, you can see which person requested a package that PTC redirected. This is available on JFrog Cloud and on self-hosted Artifactory [version to confirm].

Use the redirect URL you already configured for Zscaler or Cloudflare Gateway: <YOUR_ARTIFACTORY_URL>/artifactory/api/package-reroute. Zscaler and Cloudflare Gateway send the signed-in user with that redirect. See Configure Zscaler ZIA and Configure Cloudflare Gateway.

The name you see is the login or email that the security edge sends, followed by :SASE_ID. Artifactory adds :SASE_ID to mark traffic that came through PTC. The security edge does not send it.

The login is usually the person's email address. Artifactory adds :SASE_ID to every name it records through PTC, so a name that ends this way is complete and expected.

📘

What :SASE_ID means

:SASE_ID marks PTC traffic. Artifactory adds it to every name it records, and the security edge does not send it. The email or login before the colon is the person who requested the package.

Where the name appears

Where you lookWhat you openWhat you see
The cached package in ArtifactoryThe artifact page, GeneralDeployed By and Last Downloaded By show [email protected]:SASE_ID
JFrog CurationApplication > Curation > Audit EventsRequester Name shows [email protected]:SASE_ID
Artifactory service logartifactory-service.logThe reroute line shows [email protected]

Deployed By and Last Downloaded By show at most 64 characters, so a very long login can be shortened there. Requester Name shows the full name, including :SASE_ID. The service log shows the login without :SASE_ID.

Confirm it after a test install

  1. On a workstation where your security edge client is signed in (Zscaler Client Connector or Cloudflare), install a public package. For example, npm install express.
  2. In Artifactory, open the cached package and select General. Deployed By and Last Downloaded By end with :SASE_ID.
  3. When Curation is enabled on that remote repository, open Application > Curation > Audit Events. Requester Name is the same value.

When Zscaler or Cloudflare Gateway does not send a user, those fields show _package-reroute.

This name tells you who requested the package. It is not an account you manage under User Management, and the install still runs as the _package-reroute system user. PTC does not send the developer's registry token, so private and scoped packages stay on the direct-client path. See Private and Scoped Packages.

Netskope requests show _package-reroute in Deployed By, Last Downloaded By, and Requester Name. User audit is not supported for Netskope yet.


Document Map

TopicPage
PTC Quick Start (end-to-end walkthrough)PTC Quick Start
Deployment Sequence and Gradual RolloutDeployment and Rollout
PrerequisitesReview PTC Prerequisites
Workstation ConfigurationConfigure Workstation for PTC
JFrog Artifactory ConfigurationConfigure Artifactory for PTC
Zscaler ZIA Configuration GuideConfigure Zscaler ZIA
Netskope Configuration GuideConfigure Netskope
Other Compatible Security EdgesOther Compatible Security Edges
Configuration APIPackage Reroute Config API
Configuration by Package TypeConfiguration by Package Type
Package Reroute LogsPackage Reroute Logs for PTC
User audit (Zscaler ZIA and Cloudflare Gateway)User audit
Known Limitations and TroubleshootingLimitations and Troubleshooting

Frequently Asked Questions

This section provides answers to frequently asked questions about Package Traffic Controller (PTC).

plusFAQs
Q: What is JFrog Package Traffic Controller (PTC)?

A: PTC integrates your existing SASE provider with JFrog Artifactory to intercept outbound public registry traffic and route it through Artifactory before packages reach developers. JFrog Curation policies and audit logging can apply to that traffic without changing package manager commands. For more information, see Supported Security Edges for the published vendor guides. See Other Compatible Security Edges for every other product.

Q: Can I use a security edge that is not listed?

A: Yes, when that security edge meets the redirect requirements in Other Compatible Security Edges. JFrog publishes portal steps for Zscaler, Netskope, and Cloudflare. You configure the equivalent settings in your product's administration portal.

Q: What do I need before deploying PTC?

A: You need JFrog Artifactory with Package Reroute configured, a SASE client on workstations, trust for the SASE CA per package client, and SASE redirect rules in the order described in Deployment and Rollout. See Prerequisites for the full checklist.

Q: Does PTC work with private or scoped npm packages?

A: PTC does not forward developer registry credentials. For private or scoped packages that require client credentials, point the package manager at your Artifactory remote repository URL with tokens instead of relying on redirect alone. See Private and Scoped Packages for the full constraint and workarounds.

Q: Why must redirect rules exclude POST requests?

A: Commands such as npm audit send POST to registry hosts. Redirecting POST causes those commands to fail. Configure your SASE provider's redirect rules to allow only GET and HEAD for registry traffic. For more information, see your SASE provider's guide in Supported Security Edges. See Other Compatible Security Edges for every other product.

Q: Can I route PTC through a Smart Remote repository?

A: No. PTC doesn't support routing through a Smart Remote repository, even when it proxies a repository on another Artifactory service endpoint or an Edge service. Point the PTC repo_key at a remote repository that proxies the public registry directly. For more information, see Smart Remote Repositories.

Q: Who is recorded for a PTC request?

A: On Zscaler ZIA and Cloudflare Gateway, the name is the user's login or email followed by :SASE_ID, for example [email protected]:SASE_ID. You see it as Deployed By and Last Downloaded By on the artifact, and as Requester Name under Application > Curation > Audit Events. Netskope shows _package-reroute. See User audit.

Q: Can I roll out PTC to a pilot group first?

A: Yes. Use your SASE group controls on the inspection and redirect rules, and phase package ecosystems one at a time. JFrog recommends this approach. See Gradual Rollout Recommendation.

Related Topics


Did this page help you?