Skip to main content

Configure a Connector with Artifactory access: LSTs

This guide explains how to configure the Moderne Connector to talk to your Artifactory instance so the Connector can discover and download your LST artifacts.

When your repository CSV does not include publishUri values, the Connector uses Artifactory Query Language (AQL) to discover LST locations in near real-time — within a minute or two of publishing. Even when your CSV already includes publishUri values, the credentials you configure here are still used to fetch LSTs from Artifactory.

info

If you're wanting to configure repositories for recipe artifacts, please see Recipe marketplace repositories instead.

Prerequisites

  • You will need credentials for an Artifactory user that is allowed to issue the relevant AQL queries that will be configured. This can be either:
    • A username and password combination, or
    • A bearer token (access token)

Configuring the Moderne Connector

The following table contains all of the variables/arguments you need to add to your Moderne Connector 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 Connector 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}.

Environment variables:

Variable NameRequiredDefaultDescription
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_URItrueThe URL of your Artifactory instance.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_USERNAMEfalseThe username used to connect to your Artifactory instance. This user must have permission to run AQL queries.

Note: Only one of basic auth (username+password) or bearer token can be used.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_PASSWORDfalseThe password used to connect to your Artifactory instance.

Note: Only one of basic auth (username+password) or bearer token can be used.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_BEARERTOKENfalseThe bearer token (access token) used to connect to your Artifactory instance.

Note: Only one of basic auth (username+password) or bearer token can be used. If bearerToken is specified, username and password must not be provided.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_LSTQUERYFILTERS_{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_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_SKIPSSLfalsefalseSpecifies whether or not to skip SSL verification for HTTP connections from the Connector to this Artifactory instance. This must be set to true if you use a self-signed SSL/TLS certificate.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_SKIPVALIDATECONNECTIVITYfalsefalseBy default, on Connector startup, we will validate that we can connect to this Artifactory instance, and fail to start up the Connector if we cannot. Set this to true to skip this validation.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_PROXY_HOSTfalseThe hostname of a proxy server to use for connections to this Artifactory instance.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_PROXY_PORTfalseThe port of the proxy server to use for connections to this Artifactory instance.
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_CONNECTTIMEOUTfalse30sTimeout for the connection to be established (and the first data received). Specified as a duration (e.g., 30s, 1m).
MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_{index}_READTIMEOUTfalse60sTimeout for reading the response body from the Artifactory instance. Specified as a duration (e.g., 60s, 5m).

Example:

docker run \
# ... Existing variables
-e MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_0_URI=https://myartifactory.example.com/artifactory/ \
-e MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_0_USERNAME=admin \
-e MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_0_PASSWORD=password \
-e MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_0_LSTQUERYFILTERS_0='"name":{"$match":"*-ast.jar"}' \
-e MODERNE_CONNECTOR_ORGANIZATION_POLL_ARTIFACTORY_0_LSTQUERYFILTERS_1='"repo":{"$eq":"example-maven"}' \
# ... Additional variables