You can customize the behavior of new Decision Server components through configmaps
that reference context-param, init-param or
MultipartConfig parameters.
About this task
The behavior of the Decision Server components can be customized by providing configuration maps (configmaps) that
reference the property files. For the Decision Server Runtime, the property file
can define the context and init parameters of the
response-headers filter. For the Decision Server Console, the property file
can define the context and init parameters of the
response-headers filter, and the parameters of the
FrontendUploadServletservlet.
The customization can be applied, for example, to enable asynchronous ruleset parsing in the
runtime. For more information, see Ruleset parsing and the ruleset cache.
Procedure
Follow these steps to customize a context-param,
init-param or MultipartConfig parameter before the
installation of an Operational Decision Manager
instance. For a list of properties, see Decision Server parameter properties.
-
Create a web-configuration.properties file.
- The configuration file must be named
web-configuration.properties.
- Add configuration lines according to the syntax below to add, update, or remove
<context-param> or <init-param> elements of a
particular filter in the web.xml:
# Backward compatibility support
# Update or add a context-param named "CheckEmptyJsonRequests"
CheckEmptyJsonRequests=false
# ==================================================================
# Context parameters
# Applicable to Decision Server Console and Decision Server Runtime
# ==================================================================
[context-param]
# Update or add a context-param named "AsynchronousRulesetParsing"
AsynchronousRulesetParsing=true
# ==================================================================
# Init parameters of response-headers filter
# Applicable to Decision Server Console and Decision Server Runtime
# ==================================================================
[filter:response-headers]
# Update the init-param named "Access-Control-Allow-Origin"
Access-Control-Allow-Origin=https://example.com
# Remove an init-param if <param-name> matches "X-XSS-Protection"
-X-XSS-Protection
# ==================================================================
# FrontendUploadServlet headers
# Applicable to Decision Server Console Only
# ==================================================================
[servlet:FrontendUploadServlet]
# Update the value of "max-file-size" to 200 Mb
max-file-size=209715200
Note:
Be aware of the following information:
- If no section header is specified, updates apply to context-param by
default.
- The section headers [context-param],
[filter:response-headers] and [servlet:FrontendUploadServlet]
determine which XML block type to modify.
- Values must be written in a single line. Multiline values are not supported.
- Lines with paramName=paramValue: Update existing parameter or add a new one
if missing.
- Lines with -paramName: Remove the entire block
(<context-param>...</context-param> or
<init-param>...</init-param>).
- For FrontendUploadServlet, you can only update the values of the
parameters. You cannot add or remove existing parameters.
- Do not alter or remove these settings unless you fully understand the security
implications.
- Create a configmap that references this property file.
kubectl create configmap my-odm-web-configmap --from-file web-configuration.properties
- Specify this configmap in the Operational Decision Manager helm chart.
- For Decision Server Runtime,
include the parameter decisionServerRuntime.webConfigRef in the helm install
command. If you use a values.yaml file, you can set the
decisionServerRuntime.webConfigRef parameter in the file, for
example:
decisionServerRuntime:
webConfigRef: my-odm-web-configmap
- For Decision Server Console,
include the parameter decisionServerConsole.webConfigRef in the helm install
command. If you use a values.yaml file, you can set the
decisionServerConsole.webConfigRef parameter in the file, for
example:
decisionServerConsole:
webConfigRef: my-odm-web-configmap