Skip to main content

Configure an agent with Artifactory access: LSTs

Artifactory serves as a source of LST artifacts for Moderne. This integration uses Artifactory Query Language (AQL) to identify LST artifacts that have not yet been encrypted and transmitted to Moderne in near real-time.

This guide will walk you through how to configure the Moderne agent to connect to your Artifactory instance to retrieve LST artifacts.

info

If you're wanting to configure Artifactory to support recipe artifacts, please see this guide instead.

Prerequisites

  • You will need a username and password for an Artifactory user that is allowed to issue the relevant AQL queries that will be configured

Configuring the Moderne agent

The following table contains all of the variables/arguments you need to add to your Moderne agent run command in order for it to get LST artifacts from your Artifactory instance. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne agent guide.

You can configure multiple Artifactory servers by including multiple entries, each with a different {index}. Within a given Artifactory server configuration, you can configure multiple LST query filters by including multiple entries, each with a different {index}.

Variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_ARTIFACTORY_{index}_URLtrueThe URL of your Artifactory instance.
MODERNE_AGENT_ARTIFACTORY_{index}_USERNAMEtrueThe username used to connect to your Artifactory instance. This user must have permission to run AQL queries.
MODERNE_AGENT_ARTIFACTORY_{index}_PASSWORDtrueThe password used to connect to your Artifactory instance.
MODERNE_AGENT_ARTIFACTORY_{index}_ASTQUERYFILTERS_{index}trueThe AQL query fragment used to select LST artifacts to send to Moderne. If multiple are specified, they are combined together with an AND.
MODERNE_AGENT_ARTIFACTORY_{index}_SKIPSSLtrue (If you use a self-signed SSL/TLS cert)falseSpecifies whether or not to skip SSL verification for HTTP connections from the agent to this Artifactory instance.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ARTIFACTORY_0_URL=https://myartifactory.example.com/artifactory/ \
-e MODERNE_AGENT_ARTIFACTORY_0_USERNAME=admin \
-e MODERNE_AGENT_ARTIFACTORY_0_PASSWORD=password \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_0='"name":{"$match":"*-ast.jar"}' \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_1='"repo":{"$eq":"example-maven"}' \
# ... Additional variables