Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Cortex Configuration Files

Cortex Configuration Files

Cortex provides a number of files for configuring various aspects of the API, like authorization and authentication. Property value changes in the Cortex configuration files are scanned and updated in the application during run time.

It is not necessary to restart the server to update the values.

Default Configuration Files

Elastic Path provides a default Cortex configuration files in the extensions/database module's /ext-data/environments/ directory.

It is recommended that you copy these default configuration files to your local file system using the following instructions:

  1. In the command line, navigate to the extensions/database module.
  2. In the extensions/database module, run the following command:
    mvn clean install -Preset-conf

This command wipes your current local home directory's configuration files (if they exist), copies out of the box Cortex and Ehcache configuration files from the database/ext-data/environments/local/ directory to your file system's ${user.home}/ep/conf/ directory. For more information, see Cortex Configuration Files.

Cortex Configuration File Locations

Cortex scans the following directories for configuration files, reads the values, and updates them in the application.

  • /ep/conf/cortex
  • ${user.home}/ep/conf/cortex where ${user.home} is the path of your user home directory.

Customizing Cortex Configuration Properties

Below is a list of the configuration files Cortex supports out of the box.


Defines the URI for the Cortex authentication endpoint. For more information on authentication endpoints, see Cortex Authentication

Property Format

The endpoint should be a combination of your host URI and the authentication URI, "/commerce-legacy/authentication/user".
The DEFAULT_HOST is the default fallback endpoint. Different scopes can have different endpoints. For example:
mappings=["DEFAULT_HOST\=http://localhost:9080/cortex/authentication/user", "telco\=http://localhost:13080/cortex/authentication/user"]


Defines the authentication endpoint trust header. For more information on endpoint trust headers, see Cortex Authentication

Property Format

value="<secret trust header>"


Defines the pagination page-size setting for recommendations. Since a large number of items may be available for recommendations, this page-size setting can limit the number of items retrieved per request.

Property Format"<positive integer>"
Example with 5 items per page:"5"
Note: The 'I' is required as it indicates the value is an integer.


Defines the number of resource bundles required to register their veto before Cortex is in a ready state. During Cortex startup, resource bundles register a veto once the bundle becomes active. Before a quorum is reached, Cortex returns a 503 Service Unavailable HTTP status for any request.

Property Format

quorumSize=I"<positive integer"
Example with 10 vetoes:


Defines the authentication token's expiry time, in seconds. By default, the Cortex authentication tokens expire after 1 week (60 * 60 * 24 * 7 seconds).

Property Format

seconds=L"token expiry seconds"

Example with 300 seconds:



Defines the role hierarchy used in Cortex authorizations. For more information on roles and permissions, see Cortex Authorization.

Property Format



Defines thread pool size and thread idle timeout in seconds for the RelOS Executor Service. By default, the thread pool size is 500 and the thread idle timeout is 120 seconds. For more information on roles and permissions, see Cortex Authorization.

Property Format
threadPoolSize=I"<positive integer>"
threadIdleTimeout=L"idle timeout in seconds"
Example with thread pool size of 1000 and thread idle timeout of 200 seconds:


Defines maximum number of results in cache for the RelOs OperationResult Cache and the eviction timeout in seconds. By default, the maximum number of results in cache is 2000 and the eviction timeout is 60 seconds.

Property Format
maxResults=I"<positive integer>"
evictionTimeout=I"eviction timeout in seconds"
Example where the maximum number of results in cache is 3000 and eviction timeout is 100 seconds: