REST Adapter configuration

This page describes configuration for the Liberator REST Adapter.

Available from: Liberator 8.0.0

Requires: OpenJDK 17, Caplin StreamLink 8.0.0, Caplin Deployment Framework 8.0.0

Configuration file location

The REST Adapter kit packaged with Liberator includes two configuration files:

DeploymentFramework-versionglobal_configoverridesLiberatorRESTAdapterDataSourceetc datasource.confREST Adapter configurationLiberatoretc rttpd.confLiberator data service configuration
Configuration file location in a Deployment Framework

Configuration items

Configuration file: global_config/overrides/LiberatorRESTAdapter/etc/datasource.conf.


Publish a subject that proxies a REST endpoint.

    accept-all-certificates  boolean
    attribute-map  string  string
    auth-username   string
    auth-password   string
    base-url        string
    http-header     string string
    subject-prefix  string
accept-all-certificates <boolean>

[Optional] This setting should be used to indicate that the REST Adapter should accept any certificate from the REST API service when an SSL connection is established.

Default value: false

Example: accept-all-certificates true

attribute-map substitution_token attribute_name

[Optional] A mapping from a substitution token used in the subject-prefix (subject-prefix) to an attribute which should be added to the JSON request payload. (See JSON Payload Manipulation.)

Example: attribute-map %1 currency_name

auth-username username

[Optional] "Basic" HTTP authentication scheme credential.

Example: auth-username admin

auth-password password

[Optional] "Basic" HTTP authentication scheme credential.

Example: auth-password password1234

base-url URL

The REST service base URL to map to a subject-prefix (subject-prefix).

Example: base-url

http-header header_name header_value

[Optional] An HTTP header that the REST Adapter must include in every request to the REST service. Can be used multiple times to specify more than one header.

Example: http-header X-Access-Token b1e6e452c26011edafa1

subject-prefix prefix

The subject prefix to map to a REST service base URL (base-url).

Example: subject-prefix /WEATHER/

The subject prefix can contain a numbered capture group as %n, where n is a number from 1 to 9. This makes it possible to include the captured token in the JSON request payload which is sent to the REST service. See attribute-map.

Example: subject-prefix /WEATHER/%1


[Optional] Specifies credentials for the REST Adapter’s built-in demo REST service. By default, no credentials are specified and no one can access the demo REST service. Only one set of credentials can be specified.

Syntax: demo-rest-api-credentials username password

Default: none

Example: demo-rest-api-credentials user1 user1password


[Optional] Enable the demo REST API in the REST Adapter. (See Enabling the demo REST API service in the REST Adapter.)

Syntax: enable-demo-rest-api boolean

Default: false

Example: enable-demo-rest-api true

The demo REST API is provided for testing purposes only and should be disabled when using the REST Adapter in production.


This setting determines the maximum HTTP response payload size (in MB) that the REST Adapter is able to handle when mapping to a JSON response.

Syntax: payload-max-size integer

Default: 1

Valid values: 1 to 5 (MB)

Example: payload-max-size 2


Specifies the port number of the adapter’s built-in REST server. Required for enable-demo-rest-api.

Syntax: rest-api-port <port>

Default: none

Example: rest-api-port 8099


Path to a TLS client-certificate KeyStore, containing a single certificate that identifies the REST Adapter in TLS mutual-authentication certificate exchanges.

This configuration is not set by default and is only required if one or more REST endpoints require TLS mutual-authentication. Follow instructions in the Java 11 keytool documentation to create a PFX KeyStore and import a client-certificate signed by a trusted CA.

SslKeyStorePath        absolute_path
SslKeyStorePath        ${ENV:CONFIG_BASE}/overrides/LiberatorRESTAdapter/DataSource/etc/clientcert.pfx


Password to the client-certificate KeyStore (SslKeyStorePath).

SslKeyStorePassword    password
SslKeyStorePassword    changeit


Path to a CA certificate TrustStore, containing CA certificates trusted by the REST Adapter.

By default, the REST Adapter uses the default Java TrustStore.

SslTrustStorePath      absolute_path
SslTrustStorePath      ${ENV:JAVA_HOME}/lib/security/cacerts


Password to the CA certificate TrustStore (SslTrustStorePath).

SslTrustStorePassword  password
SslTrustStorePassword  changeit

See also: