- Create an API key
- Configure your package manager to use Endor Patches
- Specify the Endor Patch you want to use
If you use Endor Labs with an EU tenant, use
https://factory.eu.endorlabs.com instead of https://factory.endorlabs.com.Create an API key
To gain Rest API access to Endor Labs Patch Factory, you have to generate API credentials to authenticate to the repository.- Select User menu > Settings from the left sidebar.
- Select Access Control > API Keys.
- Select Generate API Key.
- Enter a name to identify the API key, such as “Endor Patch Factory”.
- Select the permissions to apply to the API Key, you’ll need at least Read Only.
- Select the expiration date of the API key. This may be either 30, 60, or 90 days.
Configure Gradle
-
Open the
build.gradlefile of the package you’d like to configure to use patches. -
Include a repositories section in the
build.gradlefile to establish a repository connection to the Endor Labs Patch Factory. Make sure to replacenamespacewith the name of your Endor Labs namespace. -
Include a reference to the Endor Patch version in the
build.gradlefile. The following example repository section shows how to configure Gradle to use the Endor Patch Factory. -
Finally, include the Endor Labs patch version you’d like to use. For example, to use the latest patched version from Endor Labs add
-endor-latestto the version of your dependency. The following example dependency section shows how to configure Gradle to use the Endor Patch Factory.
Configure Maven
-
Open the
pom.xmlfile of the package you’d like to configure to use patches. -
If there is no
<repositories>section in thepom.xml, then create one. -
Include a repositories section in the
pom.xmlfile to establish a repository connection to the Endor Labs Patch Factory. Make sure to replace<namespace>with the name of your Endor Labs namespace. -
Next, open the Maven
settings.xmlfile located at$HOME/.m2/settings.xmland add a<server>section to the settings file with your Endor Labs credentials.- The
usernamevalue must be your API key. - The
passwordmust be your API key secret. - The
idvalue must be same as the value provided in thepom.xml.
settings.xmlfile shows how to configure Maven to use the Endor Patch Factory. - The
-
Finally, include the Endor Labs patch version you’d like to use in to your manifest. For example, to use the latest patched version from Endor Labs include
-endor-latestto the version of your dependency. The following example dependency section shows how to configure Maven to use the Endor Patch Factory.