RS Gateway Connection Properties

You must configure RS Gateway to connect to the Gateway Proxy. Define these properties in a properties file (for example, rsgateway-site.yaml).

RS Gateway Connection Properties lists all RS Gateway properties, including the required connection properties.

Table 1. RS Gateway Connection Properties
Property Description
apiEventSecurityInfo.mode Sets the security mode. The default is server_only. For more information, see the discussion about tracking client information.
engine.address Sets the IP address of the Gateway Proxy host. The default value is localhost.
engine.apiKey An arbitrary String that matches the key configured in the /opt/mtx/conf/gateway_proxy.yaml file. The default value is Mtx5000.
engine.login An ID that identifies the client. The RS Gateway default is rsGateway. This must match the user_name defined in the /opt/mtx/conf/gateway_proxy.yaml file.
engine.password A password that matches the password configured in the /opt/mtx/conf/gateway_proxy.yaml file. The default is rsGway. Customizee all passwords before deploying to a production environment.
engine.poolsize Controls the number of engine connections available to RS Gateway. The default is 16 concurrent connections.
engine.port Sets the port of the Gateway Proxy host.
Note: To communicate with the Gateway Proxy using authentication mode that requires a login ID and password, engine.port must be set to port 4080 (default). If the port is set to 4070, there is no authentication between the RS Gateway and the Gateway Proxy.
engine.timeout The number of milliseconds (ms) to wait before assuming an error occurred and closing the connection. The default is 60000.
engine.route This property is used to route requests to a specific sub-domain when routing terms are not specified in calls to the RS Gateway. The value can be any Traffic Routing Agent (TRA) routing term. Until all engines for a sub-domain have been upgraded and TRA has been upgraded to MATRIXX version 5240 or later, set this value to a sub-domain routing term for a sub-domain within the domain the specific RS Gateway instance serves. This term is used instead of engine.domainRoute if any components in the cluster have not been upgraded to release 5240 or later. The term must specify the route to a sub-domain identifier that handles all requests that cannot be routed. Because RS Gateway must retrieve pricing information when the system starts, this sub-domain must be highly available. Control routing by setting the route property:
engine:
  route: RTIDroute_id_number

Or set the property with the following JVM switch:

-Drsgateway.engine.route=RTIDroute_id_number

Where route_id_number is the number of the sub-domain (for example, RTID3).

engine.domainRoute Routes requests to the first available sub-domain within the domain. The domainRoute is used once for the entire cluster (all sub-domains and the TRA) if it has been upgraded to MATRIXX version 5240 or later. Control routing by setting the domainRoute property:
engine:
  domainRoute: DMIDdomain_id_number

Or set the property with the following JVM switch:

-Drsgateway.engine.domainRoute=DMIDdomain_id_number

Where domain_id_number is the number of the domain (for example, DMID11).

Many REST calls have search terms that route requests to the correct sub-domain (for example, any ExternalId, ObjectId, IMSI, AccessNumber, SessionId, and LoginId are used). Also, REST requests can have an HTTP parameter, TrafficRouteData, appended to the URL for routing. This property does not affect those requests. However, for requests that do not have any other routing terms, such as pricing queries and subscriber, device, group, and user create requests, the engine.domainRoute property can direct these requests to the first available sub-domain.
Note: If the deployment has not been fully upgraded to version 5240 or later, you cannot use a DMID route term for your domainRoute setting because Traffic Routing Agent (TRA-RT) does not support DMID based routing terms in versions earlier than 5240. If any component of the system has not been upgraded to 5240 or later, then engine.domainRoute (-Drsgateway.engine.domainRoute) must have an RTID routing term and not a DMID routing term.
eventstore.defaultResultSize Sets the default result size for event store queries. The default value is 0.
extensionVersion The MDC schema extension version of the Gateway Proxy for extension projects. Used for pinning.
memberBalances.maxUsersInGroup Sets the maximum number of balances supported by the following URL: /service/group/{SearchTerm:.+}/memberbalance/{ResourceId}
metrics.enabled Set to true to enable metric collection. Set to false (default) to disable. For example:
metrics:
  enabled: "true"
Override this value at the command line with:
-Drsgateway.metrics.enabled=true
mongodb.serverAddress The MongoDB server address and port for connecting to the Event Repository. For example:
serverAddress: localhost:27017
mongodb.userName The MongoDB user ID.
mongodb.password The MongoDB password.
mongodb.isDNSSeedList The default value of the isDNSSeedList key is no. When isDNSSeedList is no, the connection string has the mongodb:// prefix. When isDNSSeedList is yes, the connection string has the mongodb+srv:// prefix.
password.encoding.upgrade Indicates if the password should be upgraded to bcrypt by Spring Security. The default is false.
permissions The path to the RS Gateway permissions file. For example:
permissions: "classpath:./rsgateway_permissions.yaml"
Note: RS Gateway looks first for the permissions file in /opt/mtx/conf/. If there is no file there, it uses the rsgateway_permissions.yaml on the classpath.
pricingcache.expiration Sets the number of milliseconds for entries in the cache to live.
resource.enable Enables resource registration. For example:
resource:
   enable: true
schemaVersion The MDC schema version of the Gateway Proxy. Used for pinning.
updateInterval Sets the background interval to check if pricing has changed.

For example:

# Properties used by REST Gateway (rsgateway.jar)
# Update the property values as needed.
---
######
### default result size for event store query
### (default value of this property is zero)
######
eventstore:
  defaultResultSize: 1000


######
### Configuration of MongoDB information
###   serverAddress:  url to server
###   userName:       credential to access mongodb
###   password:       password for access to mongo
###   isDNSSeedList:  specify whether the value of the dbServerAddress key corresponds to a DNS SRV record
###                   isDNSSeedList = "yes", then the connection string will have the "mongodb+srv://" prefix.
######
mongodb:
  serverAddress:     localhost:27017
  userName:          MtxApp
  password:          xxxxxxxx
  isDNSSeedList:     "no"



######
### these are for pinning to past revisions during
### an upgrade.  You must sepcify a nonzero value
### for both:
######
#schemaVersion:       5211
#extensionVersion:    2



######
### this section specifies a connection to an engine
### or the gateway proxy
###     address:     is the hostname or ip address
###     port:        is the port number
###     poolsize:    is the number of socket connections to use
###     route:       this routing property is sent to the TRA when
###                  we are using a schema version <5240
###     domainRoute: this routing property is used by RSGW and sent
###                  to the TRA when when our schema version is
###                  >= 5240 since this is the earliest version that
###                  can support routing to subdomains within a DOMAIN
###                  using the DMID## route term
###
### If you are talking to the gateway proxy (gwp)on port 4080
### then these additional settings are configurable
###     password: for authenticating with gwp
###     salt:     to use for constructing a password for gwp
###     login:    id for authenticating on gwp
######
engine:
  address:           localhost
  port:              4080
  poolsize:          16
  #route:             RTID7
  #domainRoute:       DMID1
  #password:          xxx
  #login:             yyy
  #apiKey:            zzz

######
### max number of balances supported by the
###    /service/group/{SearchTerm:.+}/memberbalance/{ResourceId}
### url
######
#memberBalances:
  #maxUsersInGroup:   10


######
### used to enable or disable micrometer metrics
######
#metrics:
  #enabled:           false

######
### path to the rsgateway permissions file
######
#permissions:         "classpath:./rsgateway_permissions.yaml"

######
### background interval to check if pricing has changed
######
#updateInterval:      15000

######
### turn on or off usage of the resource registration service
######
#resource:
  #enable:            true

######
### number of MS for entries in the cache to live
######
#pricingcache:
  #expiration:        300000

# settings for tracking client information for MtxRequest.ApiEventSecurityInfo sent to Engine
# values for mode are as follows:
# disabled - setting the ApiEventSecuirtyInfo values is disabled at this layer.
#            If header http values exist they will be removed.
# server_only - Any existing ApiEventSecuirtyInfo http header values will be removed.
#               New ApiEventSecuirtyInfo header values will be filled with the values that can be
#               determined from the current layer.
# client_or_server - If ApiEventSecuirtyInfo http header values exist on the request they will be left
#                    alone and used.  If they do not exist ApiEventSecuirtyInfo http header values will
#                    be added based on what can be determined at the current layer.
# client_only - If ApiEventSecuirtyInfo http header values exist on the request they will be left alone
#               and used.  No ApiEventSecurityInfo http headers will be added at this layer.
apiEventSecurityInfo:
  mode: server_only

For information about configuring RS Gateway for tenant-specific Event Repositories, see the discussion about RS Gateway multi-tenant connection properties.