config.json
KEEP reads all config.json from KEEP core and deployed extensions. Here is a sample JSON representation of the resource:
{
"PORT": 8880,
"MANAGMENTPORT": 8889,
"METRICSPORT": 8890,
"HEALTHCHECKPORT": 8886,
"FIREHOSEPORT": 42424,
"CalendarTemplateFileName": "mail12.ntf",
"AllowJwtMail": true,
"AllowLocalMailFile": true,
"ServerDirectDBAccess": false,
"createKeepDBfromTemplate": true,
"useJnxDesigns": false,
"singleDbMode": {
"active": false
},
"oauth": {
"active": true,
"database": "oauth.nsf",
"url": "http://localhost:8880",
"authCodeExpiresIn": 120,
"accessTokenExpiresIn": 3600,
"refreshTokenExpiresIn": 525600
},
"keepVersion": 1,
"dropMethodsWithMissingVersions": true,
"versions": {
"core": {
"path": "/schema/openapi.core.json",
"active": true
},
"admin": {
"path": "/schema/openapi.admin.json",
"active": true
}
},
"bodyHandler": {
"uploadsDirectory": "keep-file-uploads.d",
"bodyLimit": 10000000
},
"verticles": {
"Design": {
"worker": true,
"className": "com.hcl.domino.keep.verticles.DominoDefaultVerticle",
"tags": {
"design": "com.hcl.domino.keep.dbrequests.designcode",
"code": "com.hcl.domino.keep.dbrequests.designcode",
"schema": "com.hcl.domino.keep.dbrequests.schema"
},
"threadPoolName": "codeThreads",
"active": true
},
"Data": {
"worker": true,
"className": "com.hcl.domino.keep.verticles.DominoDefaultVerticle",
"tags": {
"data": "com.hcl.domino.keep.dbrequests.data",
"scope": "com.hcl.domino.keep.dbrequests.scope"
},
"threadPoolName": "dataThreads",
"active": true
},
"OData": {
"worker": true,
"className": "com.hcl.domino.keep.verticles.DominoDefaultVerticle",
"tags": {
"odata": "com.hcl.domino.keep.dbrequests.odata"
},
"threadPoolName": "odataThreads",
"active": true
},
"Identity": {
"worker": false,
"className": "com.hcl.domino.keep.verticles.DominoDefaultVerticle",
"tags": {
"authentication": "com.hcl.domino.keep.dbrequests.identity"
},
"active": true
},
"KeepOAuth": {
"worker": false,
"className": "com.hcl.domino.keep.verticles.DominoOAuthVerticle",
"messages": {
"keep.oauth.getAccessToken": "com.hcl.domino.keep.dbrequests.oauth.GetAccessToken",
"keep.oauth.createAuthorization": "com.hcl.domino.keep.dbrequests.oauth.CreateAuthorization"
},
"active": true
},
"KeepAdmin": {
"worker": false,
"className": "com.hcl.domino.keep.verticles.DominoDefaultVerticle",
"tags": {
"admin": "com.hcl.domino.keep.dbrequests.keepadmin"
},
"active": true
},
"OhmAdmin": {
"worker": false,
"className": "com.hcl.domino.keep.verticles.DominoDefaultVerticle",
"tags": {
"admin-database": "com.hcl.domino.keep.dbrequests.admin",
"admin-user": "com.hcl.domino.keep.dbrequests.admin",
"directory-assistance": "com.hcl.domino.keep.dbrequests.admin",
"admin-tls": "com.hcl.domino.keep.dbrequests.admin",
"saml": "com.hcl.domino.keep.dbrequests.admin",
"smtp": "com.hcl.domino.keep.dbrequests.admin"
},
"active": true
},
"RestAPI": {
"className": "com.hcl.domino.keep.verticles.HttpListener",
"worker": false,
"instances": 1,
"versions": {
"core": {
"package": "com.hcl.domino.keep.handlers.core",
"route": "/api/v1",
"defaultClass": "com.hcl.domino.keep.handlers.core.DefaultJsonHandler",
"defaultDatabase": "keepconfig"
},
"admin": {
"package": "com.hcl.domino.keep.handlers.admin",
"route": "/api/admin-v1",
"defaultClass": "com.hcl.domino.keep.handlers.core.DefaultJsonHandler",
"defaultDatabase": "names"
}
},
"active": true
},
"AsyncAgentScheduler": {
"worker": true,
"className": "com.hcl.domino.keep.verticles.AgentSchedulerServiceVerticle",
"active": true,
"threadPoolName": "AgentScheduler",
"threads": 10,
"agentDefaultMaxDurationSeconds": 3600,
"logFrequencyMs": 30000
}
},
"cache": {
"KeepRequest": "off",
"NameLookup": "Java",
"JWTLogout": "Java"
},
"webapps": {
"active": true,
"appRoot": "/keepweb",
"appSource": "keepweb.d"
},
"vertx": {},
"prometheusMetrics": {
"endpoint": "/metrics",
"enabled": true,
"publishQuantiles": true
},
"metrics": {
"enabled": true,
"jvmMetricsEnabled": false
}
}
Properties
A current config.json
has the following top-level properties. These properties are case-sensitive.
Property | Type | Description |
---|---|---|
MANAGEMENTPORT | int (0 to 65353) | (default 8889) Commands regarding the runtime, e.g. config and shutdown, should only be exposed to an admin network workstation. |
METRICSPORT | int (0 to 65353) | (default 8890) Port for Prometheus metrics |
Firehoseport | int (0 to 65353) | (default 42424) Port for Firehose to successfully deliver data to custom HTTP endpoints |
PORT | int (0 to 65353) | (default 8880) The port for regular API access. |
prometheusMetrics | prometheusParameters | Parameters to hand over to the Prometheus task from vert.x. |
versions | versionParameters | List of the OpenAPI definition files to load. |
verticles | verticlesParameters | The verticles to load. |
vertx | vertxParameters | Parameters to hand to the start of vert.x, see the vert.x documentation for details. |
ServerDirectDBAccess | Boolean | True to allow Direct Database access for server |
createKeepDBfromTemplate | Boolean | True to allow create keep Database from template |
useJnxDesigns | Boolean | False to stop the use of Jnx Designs |
AllowJwtMail | Boolean | True to allow email to be sent via a JWT token. |
AllowLocalMailFile | Boolean | True to allow local mail file |
Prometheus Parameters
Property | Type | Description |
---|---|---|
Endpoint | String | Route path to metrics. |
enabled | Boolean | true to enable metrics collection. |
publishQuantiles | Boolean | true to publish Quantiles. |
Version parameters
Versions has a named list of entries with two parameters:
Property | Type | Description |
---|---|---|
path | String | Path used by getResourceAsStream to load an OpenAPI specification file |
active | Boolean | Whether the spec is loaded. |
The name of the entries must match the name used in versions of the RestAPI verticle (See below ).
Vert.x parameters
Property | Type | Description |
---|---|---|
metric | metricsParameters | Parameter for vert.x metrics |
Metrics parameters
Here is a JSON representation of the resource:
{
"enabled": true,
"jvmMetricsEnabled": true,
"metricuser": "metrics"
}
Property | Type | Description |
---|---|---|
disabledMetricsCategories | Array of Strings | Specified in the MetricsDomain Java class, e.g. “vertx.http.server.”. |
enabled | Boolean | Whether metrics are enabled on the Vert.x instance. |
jvmMetricsEnabled | Boolean | Whether JVM metrics are collected. |
labels | Array of Strings | List of labels to enable / disable. |
labelMatches | Array of Match | List of rules for label matching. |
registryName | String | Name for the metrics registry, so that a new registry is created and associated with this name. Leave blank for default. |
Verticle parameters
Verticles defines a separate unit of work for particular tags. For the RestAPI verticle, see below. The rest have a standard set of parameters:
Property | Type | Description |
---|---|---|
active | Boolean | Whether to load this verticle. |
className | String | Class to use for the verticle. Typically this is com.hcl.domino.keep.verticles.DominoDefaultVerticle , unless you need to extend that class. |
tags | Object | Tags from OpenAPI specs to allocate to this verticle and the package in which to find the NSFHandlers. |
instances | int | Relevant only for RestAPI verticle, loads multiple instances that each use a thread pool. You will need to be aware of the number of cores available and scalability, see the Vert.x documentation |
threadPoolName | String | If a worker verticle should use a dedicated pool, a required thread pool name. By default it is assigned 10 threads, but this can be overritten with threadPoolSize. If the same threadPoolName is used by multiple verticles, the thread pool is shared across those verticles. |
threads | int | This will only be used for worker threads with a specific threadPoolName. The default is 10, but this can be overritten. |
worker | Boolean | To make this a worker verticle. Worker verticles do not run on the event loop thread, but on worker threads from a preconfigured pool of 20 threads. Use for heavy-duty verticles. |
The following are types of verticles with additional parameters:
AsyncAgentScheduler verticle
This is the verticle for running async agents - calls to “/run/agent” with “async” set to true in the payload. In the Notes client you can look at KeepAgents.nsf for the asynchronous agents that are running or have run. This properties for this verticle include the above, plus these:
Property | Type | Description |
---|---|---|
agentDefaultMaxDurationSeconds | int | Timeout for asynchronous agents, in seconds. A value of -1 allows all agents to run to completion without timeout. |
logFrequencyMs | int | Frequency to log messages of running async agents to the console. |
RestAPI verticle
This is the verticle for managing WebHandlers. “worker”, “threadPoolName”, “threadPoolSize”, “className” and “active” parameters are as for the other verticles. This verticle also has a “versions” parameter. This maps to the top-level “versions” parameter and has the following properties:
Property | Type | Description |
---|---|---|
defaultClass | String | Class to use for the WebHandler if no class is defined. com.hcl.domino.keep.handlers.v1.DefaultJsonHandler handles any authenticated endpoint that receives either no body or a body with ContentType as “application/json” and responds with ContentType as “application/json”. |
defaultDatabase | String | KEEP Database to use if there is no query parameter for “db” passed. |
filesBodyLimit | int | Maximum size of the body if including files. |
jsonBodyLimit | int | Maximum size of the request body as JSON. |
package | String | Package in which to find the WebHandlers for this version. |
route | String | URL path for all OpenAPI endpoints for this spec. |
Remarks
Named elements vs. arrays
All configuration entries are named entries and not arrays, since named entries can be merged in the configuration while arrays can only be overwritten.
Deactivation of entries
The config.json
in the Jar has the entry:
"versions": {
"v1": {
"path": "/schema/openapi.v1.json",
"active": true
}
}
When you supply your own some.json
in the config.d
directory:
"versions": {
"v1": {
"active": false
}
}
the resulting configuration available to KEEP is:
"versions": {
"v1": {
"path": "/schema/openapi.v1.json",
"active": false
}
}
In summary, the v1
is not loaded This is the mechanism to disable default components without packing the Jar apart.
Overwriting the values
All values can be over written by entries in the keepconfig.d
directory. The structure needs to be the same as in the default file, but only needs the entries you want to change