-
Block the installation and Artifactory returns
HTTP 404if the package is found in the Endor Labs malware database, or if a policy condition matches with Block. The Package Firewall records a log with the package, version, and reason. - Allow the installation if a policy condition matches with Warn. The Package Firewall records a warning log with the package, version, and reason.
- Allow the installation if the package passes all checks. No log is recorded.
HTTP 404 when it blocks a request without surfacing the specific reason. To see why a package was blocked, review the Package Firewall logs.
Configure the Package Firewall
Complete the following steps to integrate JFrog Artifactory with the Endor Labs Package Firewall:- Create an API key for the Package Firewall.
- Configure JFrog Artifactory.
- Local setup for developers.
- Verify your setup.
Create an API key for the Package Firewall
Create an API key dedicated to the Package Firewall so that can authenticate to it. You can create it through one of the following methods:- Using the Endor Labs user interface, with the Package Firewall User role. See API keys to learn more.
- Using endorctl, with the
SYSTEM_ROLE_PACKAGE_FIREWALLrole. Make sure to install and configure endorctl before you create the key.
<namespace>with your namespace.<API key name>with the name of the API key for the Package Firewall use case.<YYYY-MM-DDTHH:MM:SSZ>with the API key expiration in ISO 8601 UTC format, for example2026-12-31T23:59:59Z.
- API key:
spec.key - API secret:
spec.secret
Configure JFrog Artifactory
Configure a remote repository in JFrog Artifactory for each package type you want to route through the Package Firewall. Use the steps below for npm, PyPI, or Go packages.Configure JFrog Artifactory for an npm remote repository
Configure JFrog Artifactory for an npm remote repository
- Log in to JFrog Artifactory.
- Select Administration > Repositories from the left sidebar.
- Click Create a Repository and select Remote.
- Select npm as the package type.
-
Enter a Repository Key, for example
endor-firewall-npm. -
Enter the repository URL:
https://factory.endorlabs.com/v1/namespaces/<namespace>/firewall/npm/. Replace<namespace>with your Endor Labs namespace. - Enter the User Name and Password you saved when creating the API key.
- Click Create Remote Repository.
Configure JFrog Artifactory for a PyPI remote repository
Configure JFrog Artifactory for a PyPI remote repository
- Log in to JFrog Artifactory.
- Select Administration > Repositories from the left sidebar.
- Click Create a Repository and select Remote.
- Select PyPI as the package type.
-
Enter a Repository Key, for example
endor-firewall-pypi. -
Enter the repository URL:
https://factory.endorlabs.com/v1/namespaces/<namespace>/firewall/pypi/. Replace<namespace>with your Endor Labs namespace. - Enter the User Name and Password you saved when creating the API key.
- In PyPI Settings, set Registry URL to the same URL you entered in step 6.
- Click Create Remote Repository.
Configure JFrog Artifactory for a Go virtual repository
Configure JFrog Artifactory for a Go virtual repository
- Log in to JFrog Artifactory.
- Select Administration > Repositories from the left sidebar.
- Click Create a Repository and select Remote.
- Select Go as the package type.
-
Enter a Repository Key, for example
endor-firewall-go. -
Enter the repository URL:
https://factory.endorlabs.com/v1/namespaces/<namespace>/firewall/go/. Replace<namespace>with your Endor Labs namespace. - Enter the User Name and Password you saved when creating the API key.
- Click Create Remote Repository.
- Select Administration > Repositories from the left sidebar.
- Click Create a Repository and select Virtual.
- Select Go as the package type.
-
Enter a Repository Key, for example
endor-firewall-go-virtual. - Under Repositories, select the remote repositories you want to add and click >.
- Click Create Virtual Repository.
Configure JFrog Artifactory for a Maven remote repository
Configure JFrog Artifactory for a Maven remote repository
- Log in to JFrog Artifactory.
- Select Administration > Repositories from the left sidebar.
- Click Create a Repository and select Remote.
- Select Maven as the package type.
-
Enter a Repository Key, for example
endor-firewall-maven. -
Enter the repository URL:
https://factory.endorlabs.com/v1/namespaces/<namespace>/firewall/maven/. Replace<namespace>with your Endor Labs namespace. - Enter the User Name and Password you saved when creating the API key.
- Disable Offline to allow Artifactory to fetch remote artifacts.
- Select Advanced and enable Store Artifacts Locally. Optionally, enable Priority Resolution to prioritize this repository over other repositories.
- Click Create Remote Repository.
Configure caching for time-sensitive policies
JFrog Artifactory serves cached package metadata without contacting the Package Firewall until the cache expires, so long cache periods delay when policy changes reach your developers. Lower Metadata Retrieval Cache Period (Sec) and Missed Retrieval Cache Period (Sec) on each remote repository you configured to apply changes faster. Lower values send more requests to the Package Firewall per installation, so balance responsiveness against request volume.- Select Administration > Repositories from the left sidebar.
- Select the remote repository you configured for the Package Firewall.
- Select Advanced.
- In Metadata Retrieval Cache Period (Sec), enter a value between
30and60. This value controls how long Artifactory serves cached metadata before it fetches a fresh copy from the Package Firewall. JFrog Artifactory enforces a minimum of 30 seconds. - In Missed Retrieval Cache Period (Sec), set a low value, around
30to60. This value controls how long Artifactory caches a not-found (HTTP 404) response, which includes a version blocked by a minimum package age condition that later becomes eligible. - Click Save.
Local setup for developers
Update your package manager client to use Artifactory as its source, routing all installs through the Package Firewall instead of a public registry. Once you create the Artifactory remote:- Select Administration > Repositories from the left sidebar.
- Click the vertical three dots next to the repository you configured and select Set Me Up. For Go, select the virtual repository you created.
- Enter Your JFrog account password if prompted.
- Click Generate Token & Create Instructions.
-
Follow the instructions to configure your local machine based on your package type. Edit
.npmrcfor npm,pip.conffor pip, orsettings.xmlfor Maven. For Go modules, select Resolve, copy the URL it provides, and run the following command. Replace<virtual-repository-url>with the copied URL. Ensure to URL-encode any@in the username as%40.Refer to JFrog Artifactory documentation for more information.
- Run the following command to verify that your local client is pointing to the Artifactory repository. Ensure the output matches the Artifactory remote URL you configured, or the virtual repository URL for Go modules.
- For npm packages, run
npm config get registry. - For PyPI packages, run
pip3 config list | grep index-url. - For Go modules, run
go env GOPROXY. - For Maven packages, run
mvn dependency:resolve -s settings.xml.
- For npm packages, run
Verify your setup
To verify your setup, install a package that Endor Labs has classified as malware. The Package Firewall should block the installation and return anHTTP 404.
The following are examples of packages classified as malware by Endor Labs.
npm
npm
E404 error code and 404 Not Found response confirm that the firewall blocked the package.pip
pip
404 response confirms that the firewall blocked the package.Go
Go
404 response confirms that the firewall blocked the package.Maven
Maven
io.github.endorlabs:endor-java-webapp-demo:4.1 as a dependency in your pom.xml, then run the following command to test the Package Firewall with Maven.Could not find artifact error.Troubleshooting and FAQ
What if Artifactory has already cached a package that is declared malicious later?
What if Artifactory has already cached a package that is declared malicious later?
How do I troubleshoot connection issues?
How do I troubleshoot connection issues?
- Verify that the Package Firewall URL in Artifactory is correct.
- Ensure network connectivity from Artifactory to the Package Firewall.
- Ensure the firewall rules allow outbound connections from Artifactory.
How do I troubleshoot authentication issues?
How do I troubleshoot authentication issues?
- Verify the API key and secret are correct and that the key has the Package Firewall User role.
- Ensure that the credentials are in the format Artifactory expects.
- Check the Artifactory logs for authentication errors.
How do I troubleshoot cache issues?
How do I troubleshoot cache issues?
- Verify that Artifactory has sufficient storage for the cache.
- Lower Metadata Retrieval Cache Period (Sec) and Missed Retrieval Cache Period (Sec) so more requests reach the Package Firewall. See Configure caching for time-sensitive policies.
- Check the cache hit and miss rates. Clear the cache if you need to test with a fresh request.
Why does a package stay blocked after it becomes eligible?
Why does a package stay blocked after it becomes eligible?
HTTP 404, which Artifactory caches in its missed-retrieval cache separately from package metadata. After the version becomes eligible, Artifactory can keep returning HTTP 404 until that entry expires. Lower Missed Retrieval Cache Period (Sec) on the remote repository so the change takes effect sooner. See Configure caching for time-sensitive policies.