JFrog Help Center

Our new portal is coming soon!
Documentation + Knowledge Base





JFrog Help Center - A new knowledge experience is coming your way soon!



Overview

All Artifactory configuration files are located under the$JFROG_HOME/artifactory/var/etc/artifactoryfolder.

Global Configuration Descriptor

The global Artifactory configuration file is used to provide a default set of configuration parameters.

The file is located in$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.config.xmland is loaded by Artifactory at initial startup. Once the file is loaded, Artifactory renames it to artifactory.config.bootstrap.xml and from that point on, the configuration is stored internally in Artifactory's storage. This ensures Artifactory's configuration and data are coherently stored in one place making it easier to back up and move Artifactory when using direct database backups. On every startup, Artifactory also writes its current configuration to$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.config.latest.xmlas a backup.

At any time, the default configuration can be changed in the Artifactory UIAdminmodule.

There are two ways to directly modify the Global Configuration Descriptor:

  1. Using the Artifactory UI
  2. Using the REST API
Page Contents



Care

Direct modification of the global configuration descriptor is an advanced feature, and if done incorrectly may render Artifactory in an undefined and unusable state. We strongly recommend backing up the configuration before making any direct changes, and taking great care when doing so.

Modifying Configuration Using the UI

You can access the Global Configuration Descriptor in theAdminmodule underAdvanced | Config Descriptor.There you can modify the file's contents directly or copy the contents from the entry field.

Modifying Configuration Using the REST API

You can retrieve or set the global configuration by sending a GET or POST request tohttp://:/artifactory/api/system/configuration. For example:

Retrieving and Setting the Global Configuration Descriptor
curl -u admin:password -X GET -H "Accept: application/xml" http://localhost:8081/artifactory/api/system/configuration curl -u admin:password -X POST -H "Content-type:application/xml" --data-binary @artifactory.config.xml http://localhost:8081/artifactory/api/system/configuration

Bootstrapping the Global Configuration

You can bootstrap Artifactory with a predefined global configuration by creating an$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.config.import.xmlfile containing the Artifactory configuration descriptor.

If Artifactory detects this file at startup, it uses the information in the file to override its global configuration. This is useful if you want to copy the configuration to another instance of Artifactory.

After you have restart and Artifactory did the import, the old file$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.config.import.xmlwill be moved to a file called$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.config.bootstrap.xml.


Security Configuration Descriptor

Care

Direct modification of the security descriptor is an advanced feature, and if done incorrectly may render Artifactory in an undefined and unusable state. We strongly recommend backing up the configuration before making any direct changes, and taking great care when doing so.

Bootstrapping the Security Configuration

Artifactory stores all security information as part of its internal storage.You can bootstrap Artifactory with a predefined security configuration by creating a$JFROG_HOME/artifactory/var/etc/artifactory/security.import.xmlfile containing the Artifactory exported security configuration information.

If Artifactory detects this file at startup, it uses the information in the file to override all security settings. This is useful if you want to copy the security configuration to another instance of Artifactory.

Modifying Security Using the REST API

Modifying the Security Configuration Descriptor Using the REST API has beendeprecated.


内容类型/ MIME类型

Artifactory provides a flexible mechanism to manage content type/MIME Type. You can define system-wide MIME types for common usage, but you can also overwrite the MIME types for specific files as needed. The list of default MIME types can be found in in$JFROG_HOME/artifactory/var/etc/artifactory/mimetypes.xml并且可以进行编辑以添加、删除或张e MIME types. If a file has an extension that is not supported by any of the MIME types, or does not have an extension at all, Artifactory will use the default MIME type ofapplication/octet-stream. To determine an artifact's MIME type, Artifactory compares its extension with the those in themimetype.xmlfile, and applies the MIME type of the first extension that matches.

MIME Type Attributes

Each MIME type may have the following attributes:

type
The MIME type unique name (mandatory)
extensions
A comma separated list of file extensions mapped to this MIME type (mandatory)
index
True if this MIME type should be indexed for archive searching (valid only for supported archive files)
archive
True if this MIME type is a browsable archive
viewable
True if this MIME type can be viewed as a text file inside Artifactory UI
syntax
The UI highlighter syntax to for this MIME type (only relevant if this is aviewabletype)
css
The css class of a display icon for this mime type
Example of mimetype.xml
        

For example, from the extensions parameter in the above mimtypes.xml file sample we can conclude that:

  • test.properties is a text/plainMIME type
  • test.cssis atext/cssMIME type
  • test.docis anapplication/octet-streamMIME type sincedocis not included in any of the other MIME types.

IMPORTANT: Make sure you restart Artifactory for your changes to take affect.

Artifactory MIME Types

Some of the Mime-Types specified inmimetypes.xml (e.g. application/x-checksum)are used by Artifactory. Great care should be taken before changing these Mime-Types to ensure Artifactory continues to function correctly.

Setting Content-Type During Download

Using Artifactory, when downloading files you can override theContent-TypeHTTP header by setting theartifactory.content-typeproperty.If theartifactory.content-typeproperty is not explicitly set,Artifactory will use the default mechanism of matching the artifact name extension to the extensions in themimtypes.xml fileto apply the Content-Type.

This feature is only available with Artifactory Pro.


System Properties

而不是配置properties in the JVM runtime configuration of the hosting container, you can edit$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.propertiesfile and restart Artifactory.

The Artifactory system properties are documented within this file.

Since these settings impact the entire container VM, we recommend using this feature primarily for specifying Artifactory-related properties only (such as changing the database used by Artifactory, etc.).

Setting properties inartifactory.system.propertiesis an advanced feature and is typically not required.

Do not confuse these setting with those in the$JFROG_HOME/artifactory/var/data/artifactory/artifactory.propertiesfile, which are for internal use.


Storage Properties

Artifactory provides you with abinarystore.xmlfile so that you can configure the specific storage solution used in your system. For details please refer toConfiguring the Filestore.


  • No labels
Copyright © 2023 JFrog Ltd.