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

Cortex Configuration Files

Cortex Configuration Files

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.

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.

Configuration Files

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

authClientHost.config

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

Property Format

mappings=["DEFAULT_HOST\=http://localhost:9080/cortex/authentication/user"]
The endpoint should be a combination of your host URI and the authentication URI, "/authentication/user".
Note: DEFAULT HOST
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"]

authTrustHeader.config

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

Property Format

name="x-ep-trust-header
value="<secret trust header>"

recommendationsPageSize.config

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

rest.recommendations.page.size.VALUE=I"<positive integer>"
Example with 5 items per page:
rest.recommendations.page.size.VALUE=I"5"
Note: The 'I' is required as it indicates the value is an integer.

systemReadyState.config

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:
quorumSize=I"10"

oauthTokenExpiry.config

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:

seconds=L"300"

roleHierarchy.config

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

Property Format

roles=["ROLE_LOWEST","ROLE_HIGHER",...,"ROLE_HIGHEST"]