Technical Documentation

Bootstrap

Studio

Higson Studio is a Java application and can be run at JVM machine equipped with:

  • at least Java 17 JRE,
  • 4 GB of RAM,
  • 2 CPU,
  • Linux, Windows or macOS machine.

Docker#

Higson Studio distribution only contains H2 and PostgreSQL drivers, the others have to be added manually. Every image contains description how to configure JDBC driver.

Full docker repository is available here.

Runtime

Prerequisites:

  • Java 17
  • Maven 3.x
  • Higson Studio

The complete Higson Runtime API reference — covering the public classes and interfaces used to embed Higson in your application, such as HigsonEngineFactory and HigsonEngine — is published as JavaDocs.

We will show how to configure Higson Engine using Spring Boot configuration

Maven configuration#

Apart from standard spring boot dependencies, you need to include higson-runtime dependency, available in Maven Central.

1
2
3
4
5
  <dependency>
    <groupId>io.higson</groupId>
    <artifactId>higson-runtime</artifactId>
    <version>${higson-runtime.version}</version>
  </dependency>

Another needed dependency is the JDBC driver to the database of choice, e.g., H2, Oracle, Postgres, MsSQL or MySQL and database connection pool managing library:

1
2
3
4
5
  <dependency>
     <groupId>com.h2database</groupId>
     <artifactId>h2</artifactId>
     <version>${h2-database.version}</version>
  </dependency>

Properties#

Add Higson Runtime data source properties to application.properties file.

1
2
3
higson.database.url=<jdbc_url>
higson.database.username=<username>
higson.database.password=<password>

Properties are available here

Spring configuration#

Add required beans to your java class annotated with @Configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  @Autowired
  private Environment env;
  
  private static final Logger log = LoggerFactory.getLogger(TestConfiguration.class);
  
  @Bean
  public DialectRegistry getDialectRegistry() {
      DialectRegistry registry = new DialectRegistry();
      registry.setDialect(env.getProperty("higson.database.dialect"));
      return registry;
  }

  @Bean
  public DialectTemplate getDialectTemplate(DialectRegistry dialectRegistry) {
      return dialectRegistry.create();
  }
  
  @Bean(destroyMethod = "close")
  public DataSource getDataSource(DialectTemplate dialectTemplate) {
      BasicDataSource dataSource = new BasicDataSource();
      dataSource.setUsername(env.getProperty("higson.database.username"));
      dataSource.setPassword(env.getProperty("higson.database.password"));
      dataSource.setUrl(env.getProperty("higson.database.url"));
      dataSource.setInitialSize(4);
      dataSource.setDriverClassName(dialectTemplate.getJdbcDriverClassName());
      return dataSource;
  }
  
  @Bean(destroyMethod = "destroy")
  public HigsonEngineFactory getHigsonEngineFactory(DataSource dataSource) {
      log.info("Engine factory begin creation...");
      HigsonEngineFactory higsonEngineFactory = new HigsonEngineFactory();
      higsonEngineFactory.setDataSource(dataSource);
      return higsonEngineFactory;
  }
  
  @Bean
  public HigsonEngine getHigsonEngine(HigsonEngineFactory higsonEngineFactory) {
      log.info("Engine begin creation...");
      return higsonEngineFactory.create();
  }

The application is ready to start. After successfully starting the application, you can see similar log output:

Run Higson Runtime REST in Test Mode Using Snapshot-Based Configuration#

It is possible to run the Higson Runtime in test mode using a configuration loaded directly from a snapshot. In this mode:

  • The runtime does not require a database connection, as the entire configuration is sourced locally from the snapshot.
  • The environment operates in read-only mode.
  • Watchers are disabled, as no changes to the configuration are expected.
  • Test mode is mutually exclusive with development mode and cannot be used simultaneously.
  • This setup does not support tables from external data sources.

To use runtime in test mode, you need the following configuration:


private String pathToSnapshot = "C:\Users\UserName\Downloads\snapshot.zip"

@Bean(destroyMethod = "destroy")
public HigsonEngineFactory getHigsonEngineFactory() {
    log.info("Engine factory begin creation...");
    HigsonEngineFactory higsonEngineFactory = new HigsonEngineFactory();
    higsonEngineFactory.setDataSource(new HigsonSnapshotDataSource(new File(pathToSnapshot)));
    return higsonEngineFactory;
}

@Bean
public HigsonEngine getHigsonEngine(HigsonEngineFactory higsonEngineFactory) {
    log.info("Engine begin creation...");
    return higsonEngineFactory.create();
}

Higson Runtime Spring Boot Starter

Prerequisites#

  • Java 17
  • Maven 3.x
  • Spring Boot 3

Maven configuration#

Apart from standard Spring Boot dependencies, you need to include spring-boot-starter-higson-runtime dependency, available in Maven Central. Add spring-boot-starter-higson-runtime dependency to pom.xml file:

1
2
3
4
5
6

<dependency>
	<groupId>io.higson</groupId>
	<artifactId>spring-boot-starter-higson-runtime</artifactId>
	<version>${higson-runtime.version}</version>
</dependency>

Another needed dependency is the JDBC driver to the database of choice, e.g., h2, oracle, mssql, postgresql:

1
2
3
4
5
6

<dependency>
	<groupId>com.h2database</groupId>
	<artifactId>h2</artifactId>
	<version>${h2-database.version}</version>
</dependency>

Properties#

With the above setup, all the configuration that is needed is application.yml file with database properties:

1
2
3
4
5
higson:
  database:
    username: <username>
    password: <password>
    url: <jdbc_url>

If required properties are not available, spring-boot-starter-higson-runtime will return an adequate message.

To configure external sources, you have to set comma separated list of external sources names and connection properties for each of them. You can do it by using the properties below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
higson:
  runtime:
    external-datasource:
      sql:
        names: postgres,h2
        postgres:
          url: <postgres_jdbc_url>
          password: <postgres_password>
          username: <postgres_username>
        h2:
          url: <h2_jdbc_url>
          username: <h2_username>
          password: <h2_password>

Using auto-configured HigsonEngine#

After successfully configuring properties while starting the application, spring will create HigsonEngine bean available in the spring application context, then which can be injected anywhere:

1
2
3
4
5
6
7
@Component
public class HigsonClient {

	@Autowired
	private HigsonEngine engine;

}

Overriding default configuration#

To override default auto-configuration, you need to define HigsonEngine bean in the @Configuration class:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
@Configuration
class CustomHigsonConfiguration {

	@Bean
	public HigsonEngine higsonEngine() {
		var factory = new HigsonEngineFactory();
		return factory.create();
	}

}

Existing auto-configured DataSource and HigsonRuntimeProperties can be used simply by injecting them:

1
2
3
4
5
public class HigsonEngine(
	HigsonRuntimeProperties properties,
	@Qualifier("higsonDataSource") DataSource dataSource
) {
}

Disabling Higson#

If you want to disable higson temporarily for some reason, you can do it with property higson.runtime.enabled set to false.

1
2
3
higson:
  runtime:
    enabled: false

Runtime Rest

Higson Runtime REST is a web application that provides REST API for decision table/function/domain access. It is a REST implementation of Java’s Higson Runtime jar. It is available in two forms:

Environment#

Higson Runtime REST is a Java application and can run with any Java 8 or higher on Windows, MacOS X and Linux/Unix.

CLI#

To run Runtime-Rest from cli you must pass four properties:

  • loader.path - path to jdbc driver
  • higson.database.url
  • higson.database.username
  • higson.database.password

Download latest version of higson runtime rest and database driver (postgresql for example)

1
2
3
4
5
6
7
wget  https://repo1.maven.org/maven2/pl/decerto/higson-runtime-rest/4.1.0/higson-runtime-rest-4.1.0.jar -O higson-runtime-rest.jar
wget  https://repo1.maven.org/maven2/org/postgresql/postgresql-42.6.0/postgresql-42.6.0.jar -O postgresql.jar

java -Dloader.path=./postgresql.jar -jar ./higson-runtime-rest.jar \
        -Dhigson.database.url=”jdbc:postgresql://your_postgresql_database:5432/higson?currentSchema=public” \
        -Dhigson.database.username=”admin” \
        -Dhigson.database.password=”admin”

Docker#

To run Higson Runtime REST as a docker image, there is need to build a separate docker image based on decerto/higson-runtime-rest image, add your database driver jar and run Higson Runtime REST jar with additional path.

Example:

1
2
3
4
FROM decerto/higson-runtime-rest:4.1.0
ARG DRIVER=postgresql.jar
COPY ${DRIVER} driver.jar
ENTRYPOINT [`java`,`-Dloader.path=driver.jar`, `-jar`,`/runtime-rest.jar`]

Additionally, you need to pass 3 properties:

  • higson.database.url
  • higson.database.username
  • higson.database.password

An invocation example:

1
2
3
4
docker run -p 8080:8081 -e higson.database.url=jdbc:postgresql://your_postgresql_database:5432/higson?currentSchema=public
-e higson.database.username=admin
-e higson.database.pasword=password
-t my-container

Using Higson Runtime REST#

This short tutorial will guide you through the process of running Higson Runtime REST as a docker image and invoking decision table/function/domain element.

Prerequisites#

In order to run examples from this article you will need:

Setting up a docker images#

The tutorial will be based on our motor insurance. It consists of the insurance web application, Higson Studio, and Higson Runtime REST modules. There is a docker-compose.yml file that makes the whole application easy to run. Just download a project from GitHub, open terminal in that directory, and run the following command:

1
2
3
4
5
docker-compose up

//or depending which docker version is installed

docker compose up

If you look closely inside the docker-compose.yml file, you will see that Higson Runtime REST docker image needs three additional properties to be passed to run properly:

  • higson.database.url : JDBC url to Higson’s database
  • higson.database.username : Higson’s database username
  • higson.database.password : Higson’s database password

If you want to connect to other database types such as Oracle, Postgres, MsSQL or MySQL, then you must build your own docker image and provide your database driver. Here’s a Docker file example that copies custom database driver and runs Runtime REST application:

1
2
3
4
FROM decerto/higson-runtime-rest:latest
ARG DRIVER\_JAR=dbDriver.jar
COPY ${DRIVER\_JAR} driver.jar
ENTRYPOINT\["java","-Dloader.path=driver.jar","-jar","/runtime-rest.jar"\]
  • Demo app should be available at localhost:48080/demo
  • Higson Studio should be available at localhost:38080/higson/app
  • Higson Runtime REST should be available at localhost:8081

To access higson services use followed credentials: User: admin Password: admin

Getting decision table value#

In this example we will use the demo.motor.coverage.position decision table. It maps an insurance coverage code (input coverage.code, type string) to its ordinal position (output, type integer). With matchRequired set to true, a coverage code that is not defined in the table raises an error.

The table matrix is as follows:

┌───────────┬────────────────┐
│ code (IN) │ position (OUT) │
├───────────┼────────────────┤
│ BI        │       1        │
│ PD        │       2        │
│ MED       │       3        │
│ PIP       │       4        │
│ UMBI      │       5        │
│ UMPD      │       6        │
│ COMP      │       7        │
│ COLL      │       8        │
│ ERS       │       9        │
└───────────┴────────────────┘

Let’s get the value of a demo.motor.coverage.position decision table for the BI coverage code. Here’s the request we’re going to use:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
  "ctx": {
    "properties": [
      {
        "key":"coverage.code",
        "value":"BI"
      }
    ]
  },
  "elements": [
    {
      "code":"demo.motor.coverage.position",
      "type":"PARAMETER"
    }
  ]
}

It consists of 2 main parts: ctx and elements. The former represents the input values we want to pass to Higson. We can pass there simple as well as complex objects. The latter is a list of Higson elements to invoke.

When we send this request to the localhost:8081/api/execution/invoke url, we should receive the following response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
[
  {
    "element": {
      "code":"demo.motor.coverage.position", 
      "type":"PARAMETER", 
      "attributeCode":null, 
      "profileCode":null
    }, 
    "resultValue": [
      {
        "fields": [
          {
            "key": "position", 
            "value": 1
          }
        ]
      }
    ]
  }
]

We receive a list of executed Higson elements with corresponding values.

Let’s see how the response will look like if more than one row will be returned from the decision table. In this example, we are going to use the demo.motor.dict.vehicle.available decision table. Here’s the request:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{  
 "ctx": {
   "properties": [
     {
       "key":"quote.vehicle.productionYear", 
       "value":1972
     }, 
     {
       "key":"coverage.code", 
       "value": "BI"
     }
   ]
 }, 
  "elements": [
    {
      "code":"demo.motor.dict.vehicle.availableMakes", 
      "type":"PARAMETER"
    }, 
    {
      "code": "demo.motor.coverage.position", 
      "type":"PARAMETER"
    }
  ]
}

Besides a new decision table code and context property, you can see how to invoke more than one Higson element in a single JSON request. Let’s see the response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[
  {
    "element": {
      "code": "demo.motor.coverage.position",
      "type": "PARAMETER",
      "attributeCode": null,
      "profileCode": null
    },
    "resultValue": [
      {
        "fields": [
          {
            "key": "position",
            "value": 1
          }
        ]
      }
    ]
  },
  {
    "element": {
      "code": "demo.motor.dict.vehicle.availableMakes",
      "type": "PARAMETER",
      "attributeCode": null,
      "profileCode": null
    },
    "resultValue": [
      {
        "fields": [
          {
            "key": "make",
            "value": "STAR"
          },
          {
            "key": "make_id",
            "value": 722
          }
        ]
      },
      {
        "fields": [
          {
            "key": "make",
            "value": "TRABANT"
          },
          {
            "key": "make_id",
            "value": 221
          }
        ]
      },
      {
        "fields": [
          {
            "key": "make",
            "value": "UAZ"
          },
          {
            "key": "make_id",
            "value": 315
          }
        ]
      },
      {
        "fields": [
          {
            "key": "make",
            "value": "WARTBURG"
          },
          {
            "key": "make_id",
            "value": 230
          }
        ]
      }
    ]
  }
]

As we see, each element has its own JSON section in returned array. What’s more, each row in the decision table’s matrix corresponds to one complex element in the resultValue array.

Calling function#

Let’s get the computed value of the demo.insurance.calc.premium function. Here’s the request we’re going to use:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{  
 "ctx": {
   "properties": [
     {
       "key":"policy.premiumPerDay", 
       "value":200
     },{
       "key":"policy.startDate", 
       "value": "2017-01-01"
     },{
       "key":"policy.endDate", 
       "value":"2017-01-03"
     }
   ]
 },
  "elements": [
    {
      "code":"demo.insurance.calcpremium", 
      "type":"FUNCTION"
    }
  ]
}

It’s basically the same request as the one used in the decision table section. However, we pass here three context key-value pairs instead of one. Here’s the response we should get by calling the localhost:8081/api/execution/invoke endpoint:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[  
 {
   "element": {
     "code":"demo.insurance.calcpremium", 
     "type":"FUNCTION", 
     "attributeCode":null, 
     "profileCode":null
   }, 
   "resultValue": 600.0
 }
]

Again, the same response format as in the decision table’s.

Accessing domain attributes#

Last but not least, let’s see how to access domain attributes through invoke API. We’ll be using examples from this article. Let’s see how to evaluate a position attribute of a coverage BI domain element:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "ctx": {
    "properties": [
      {
        "key":"coverage.code", 
        "value":"BI"
      }
    ]
  }, 
  "elements": [
    {
      "profileCode":"DEMO", 
      "code":"/PLANS[FULL]/COVERAGES[BI]/", 
      "attributeCode":"POSITION", 
      "type":"DOMAIN_OBJECT"
    }
  ]
}

The main difference between domain element and decision table/function is the presence of 2 additional attributes: profileCode and attributeCode, which names are self-describing. Let’s look at the response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
[
  {
    "element": {
      "code":"/PLANS[FULL]/COVERAGES[BI]/", 
      "type":"DOMAIN_OBJECT", 
      "attributeCode":"POSITION", 
      "profileCode":"DEMO"
    }, 
    "resultValue": [
      {
        "fields": [
          {
            "key": "position", 
            "value": 1
          }
        ]
      }
    ]
  }
]

As we see, the response format is the same as in the decision table/function section.

If you want to learn more or discover other available endpoints, there is a Runtime REST swagger online documentation available at: http://localhost:8081/swagger-ui/index.html.

Accessing Swagger UI#

The Swagger UI link is generated automatically based on the installation type (Docker or Bundle). The Swagger UI is accessible at the following address format:

http://[host]:[port]/[appname]/[apiname]/swagger-ui/index.html

For Docker-based Deployments#

When the application is running in a Docker environment, the URL components are determined as follows:

  • host: localhost (or the container’s IP address if accessed externally)
  • port: retrieved from the server.port property (e.g., 8080)
  • apiname: the value of server.servlet.context-path from the application’s configuration (e.g., /api)

Example: http://localhost:8080/api/swagger-ui/index.html

For Bundle Installations#

In the case of a bundle installation:

  • host: localhost

  • port: retrieved from the conf/server.xml configuration file by locating a line such as:

    <Connector port="38080" protocol="HTTP/1.1" ... />
    

    In this example, the port is 38080.

  • appname and apiname: determined based on the directory structure within the webapps folder. For version 4.1, the typical folder name is higson#api, which translates to:

    • appname = higson
    • apiname = api

Example: http://localhost:38080/higson/api/swagger-ui/index.html

By following these rules, you can easily determine the correct Swagger UI URL regardless of the deployment method.

Generating Runtime Rest JSON from Tester#

To generate a request to Runtime Rest, navigate to Tools -> Tester. Click “Add Test”, then add the elements for which you want to generate an example request. In the example below, the following elements have been selected:

  • Decision Table,
  • Function,
  • Domain Element,
  1. Click “Add element” on the left side.
  2. Select the elements for which you want to generate an example request.
  3. Add the selected elements to the test.

Now you can click the “Generate Runtime Rest JSON” button, which will generate an example request without context values.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "ctx": {
    "properties": []
  },
  "elements": [
    {
      "code": "demo.motor.coverage.availability",
      "type": "PARAMETER",
      "profileCode": "DEMO"
    },
    {
      "code": "demo.insurance.calcpremium",
      "type": "FUNCTION",
      "profileCode": "DEMO"
    },
    {
      "code": "/PLANS[FULL]/OPTIONS[SILVER]",
      "type": "DOMAIN_OBJECT",
      "attributeCode": "ORDER",
      "profileCode": "DEMO"
    }
  ],
  "arguments": []
}

If you need to generate an example request with context values, you must first run the test by clicking “Run Test” button. This will populate the Context table with all available context values. Next, fill in the desired context values and click “Run Test” again. Then click “Generate Runtime Rest JSON”.

Now the generated example request will include the values from the context.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
  "ctx": {
    "properties": [
      {
        "key": "coverage",
        "complexValue": [
          {
            "key": "code",
            "value": "BI"
          }
        ]
      },
      {
        "key": "option",
        "complexValue": [
          {
            "key": "code",
            "value": "BRONZE"
          }
        ]
      },
      {
        "key": "policy",
        "complexValue": [
          {
            "key": "premiumPerDay",
            "value": "3"
          },
          {
            "key": "startDate",
            "value": "2025-10-10"
          },
          {
            "key": "endDate",
            "value": "2026-10-10"
          }
        ]
      }
    ]
  },
  "elements": [
    {
      "code": "demo.motor.coverage.availability",
      "type": "PARAMETER",
      "profileCode": "DEMO"
    },
    {
      "code": "demo.insurance.calcpremium",
      "type": "FUNCTION",
      "profileCode": "DEMO"
    },
    {
      "code": "/PLANS[FULL]/OPTIONS[SILVER]",
      "type": "DOMAIN_OBJECT",
      "attributeCode": "ORDER",
      "profileCode": "DEMO"
    }
  ],
  "arguments": []
}

AWS

Run Higson using AMI#

Launch the AMI#

The latest Higson versions are available as AMI (Amazon Machine Images) at Amazon Marketplace.

Higson Studio#

Visit the Higson Studio Amazon Marketplace. You can read basic information about Higson Studio. Click Continue to subscribe and read Terms and Conditions. After getting yourself familiar with the license, click Continue to configuration. On the next screen, you can choose the Higson Studio version and region you want to launch your instance in. Next, click Continue to launch. Select Launch through EC2 in the Choose Action section.

Higson Runtime#

Visit the Higson Runtime Amazon Marketplace. You can read basic information about Higson Runtime. Click Continue to subscribe and read Terms and Conditions. After getting yourself familiar with the license, click Continue to configuration. On the next screen, you can choose the Higson Runtime version and region you want to launch your instance in. Next, click Continue to launch. Select Launch through EC2 in the Choose Action section.

Configure#

This step is required to be able to specify the user-data script, which allows passing environment variables to the application without the need to log in to the instance.

AWS Systems Manager Parameter Store#

By default, Higson Studio uses AWS Systems Manager Parameter Store to fetch properties at the start of the application. You need to specify AWS_ACCESS_KEY_ID and AWS_SECRET_KEY in the user-data script to connect to the AWS Systems Manager Parameter Store. If you do not define those properties, Studio will not launch.

Default configuration:#
  • key: /config/higson-studio/higson.database.url
    description: JDBC address of dedicated postgresql database
    value: jdbc:postgresql://address_to_your_postgressql_server:port/postgres?currentSchema=public
  • key: /config/higson-studio/higson.database.username
    description: username for application’s connection to the dedicated database
    value: admin
  • key: /config/higson-studio/higson.database.password
    description: password for application’s connection to the dedicated database
    value: admin

If you prefer to connect to H2 database in order not to setting up a standalone database - you can set up following properties:

  • key: /config/higson-studio/higson.database.url
    description: JDBC address of dedicated postgresql database
    value: jdbc:h2:/home/ec2-user/higson.test.db;AUTO_SERVER=TRUE;NON_KEYWORDS=VALUE

  • key: /config/higson-studio/higson.database.username
    description: username for application’s connection to the dedicated database
    value: sa

  • key: /config/higson-studio/higson.database.password
    description: password for application’s connection to the dedicated database
    value: sa

Environment properties#

To set up environment variables for containers you can manually create a /home/ec2-user/environment.conf file or prepare user-data-script like in the example below. Both are available and its main aim is to configure instance system environments.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
Content-Type: multipart/mixed; boundary="//" 
MIME-Version: 1.0 

--// Content-Type: text/cloud-config;charset="us-ascii" 
MIME-Version: 1.0 
Content-Transfer-Encoding: 7bit 
Content-Disposition: attachment;filename="cloud-config.txt"
 
#cloud-config 
cloud final modules: 
- [scripts-user, always] 

--// Content-Type: text/x-shellscript;charset="us-ascii" 
MIME-Version: 1.0 
Content-Transfer-Encoding: 7bit 
Content-Disposition: attachment;filename="userdata.txt" 

#!/bin/bash 
/bin/echo AWS_ACCESS_KEY_ID="YOUR AWS KEY ID" > /home/ec2-user/environment.conf 
/bin/echo AWS_SECRET_KEY="YOUR SECRET" >> /home/ec2-user/environment.conf 
--//-- 

AWS_ACCESS_KEY_ID and AWS_SECRET_KEY you will be able to generate from your IAM page. Both are needed if you want to use your AWS Parameter Store to pass your configuration. You can inject this script directly into your container in EC2 console using: Actions -> Instance settings -> Edit user data button. Following script add 2 environment variables to your container.

You can learn more about bootstrapping AWS EC2 instance here.

Configure without AWS Parameter Store#

If you don’t want to use AWS Parameter Store simply turn this off with AWS_PARAMSTORE_ENABLED=FALSE Now you have to pass HIGSON_DATABASE_URL, HIGSON_DATABASE_USERNAME, HIGSON_DATABASE_PASSWORD properties in your user-data script

Properties customization precedence#

Higson Studio allows you to define properties in several locations. The properties are processed in the order as defined below. This implies that the last one overwrites other overlapping properties if you define the same property in two different locations.

  • /home/ec2-user/conf/application.properties
  • /home/ec2-user/higson-studio/conf/mpp-sensitive.properties
  • /home/ec2-user/higson-studio/conf/application.properties
  • /home/ec2-user/application.properties
  • /home/ec2-user/higson-studio/conf/higson.properties
  • “HIGSON_CONFIG_PATH” environment variable (can be defined in user-data script)
  • environment variables (from/home/ec2-user/environment.conf)
  • AWS Systems Manager Parameter Store

Instance Launch Options#

Below, you can find a few instance launch options:

  • version - by default you should launch the latest version available on Amazon Marketplace.
  • region - select the region you would like to launch your instance in. The image is available in all of Amazon’s publicly available regions.
  • EC2 Instance Type - select the instance type you would like to use for your launched Higson Studio.
  • Security Groups - Expose ports to access EC2 instances and Higson Studio:
    • TCP/22 – SSH - used to administrate your instance remotely.
    • TCP/38080 – default port for Higson Studio, this is the port on which you can access Higson Studio
  • Key Value pair settings - generate or use an existing one key and secret pair that will be needed later to access the EC2 instance.

Connect the instance#

In order to log in, you can use the following command: ssh-i PATH_TO_PEM_FILE ec2-user@IP_HERE You need to use a PEM file with a public key downloaded while creating the EC2 Instance. Type the ssh command in a terminal. Application is deployed at /home/ec2-user/higson-studio-X.X.X where X.X.X is the version of deployed Studio.

Systemd service is configured to manage the Higson Tomcat instance. You can use standard systemctl commands to disable or check status such as sudo systemctl status higson-studio

All logs can be found under the following path /home/ec2-user/higson-studio-x.x.x/logs/

Log in to running Higson Studio#

Studio stores temporary password at higson.log file. Login to your EC2 instance and grep a string ‘Copy password’ in the log file using:

1
grep “Copy password” /home/ec2-user/higson-studio-X.X.X/logs/higson.log

as a result, you will find a string similar to: Copy password from file 'gifzWEZl' in home directory, where the filename is different every time higson is bootstrapped. This file contains an admin user password. Copy the password. Now go to a browser and open a page: http://IP_HERE:38080/higson/app . At login page please fill form with credentials: pass username: admin and password: copied string here. You will be asked to change your temporary password. After that, you can login to higson as an admin with a new set password

Supported Databases#

Higson supports various SQL databases, including PostgreSQL, Oracle, MySQL, Microsoft SQL and H2. By default, we have built the AMI with PostgreSQL and H2 support. This means that the PostgreSQL and H2 JDBC drivers are present in the Tomcat lib directory, and we only need you to provide the URL and credentials for the database. If you want to connect to another database, then add a proper JDBC driver to the Tomcat lib directory, which is located under the path: /home/ec2-user/higson-studio/lib

Run Higson using ECS#

It is possible to run the Higson application in Amazon Elastic Container Service (ECS). The following steps will allow you to quickly and easily run Higson Studio or Higson Runtime REST:

  • Log in to AWS Management Console
  • Go to Elastic Container Service
  • Create a Cluster:
    • Define the cluster name (this is the only required field), e.g.: higson-cluster
    • Verify the remaining optional settings
    • Finish the process by creating a cluster
  • Create a Task definition (using the configuration form):
    • Define the task definition family name, e.g.: higson-studio or higson-runtime-rest
    • Define the container name and the application image URI - an official DockerHub images for decerto/higson-studio or decerto/higson-runtime-rest are available at https://hub.docker.com/r/decerto/ (e.g.: decerto/higson-studio:4.1.0 or decerto/higson-runtime-rest:4.1.0)
    • Define environment variables (check the list of required properties). Remember of correct environment variables notation!
    • Configure log collection, e.g.: select Amazon CloudWatch
    • Verify the remaining optional settings
    • Finish the process by creating a task definition
  • Go to cluster and create a service:
    • Select task definition family, e.g.: previously created higson-studio or higson-runtime-rest
    • Define service name, e.g.: higson-studio-service or higson-runtime-rest-service
    • Finish the process by creating a service
  • Verify the status of deployment and start using application!

If you would like to use Higson Studio and Higson Runtime REST both must have configured environment variable: HIGSON_SECURITY_JWT_SECRET_KEY with the same key value!

See an example of minimal required environment variables for Higson Studio:

See an example of minimal required environment variables for Higson Runtime REST:

Properties

Properties in Higson

Higson gives user a possibility to configure and overwrite internal application properties. They are stored in dedicated file, named application.yml . File should be placed in container or may be pass using environment properties

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  studio-api:
    image: decerto/higson:4.1.0
    container_name: higson-studio-api
    ports:
      - "48282:8282"
    volumes:
      - ./application.yml:/application.yml  # << here properties are passed from host in yaml file
    environment:
      - "HIGSON_DATABASE_URL=jdbc:postgresql..." # << this section let us define environment properties which has precedence over the yaml file.
      - "HIGSON_DATABASE_USERNAME=higson"
      - "HIGSON_DATABASE_PASSWORD=higson"
      - "HIGSON_DATABASE_DIALECT=postgresql" 

Configurable properties#

Property Description Default value
Database
higson.database.dialect Database dialect to use. Predefined dialects available in Higson: oracle,hsqldb, h2, mssql2012, postgresql, mysql oracle
higson.database.hbm2ddl-mode proxy for hibernate property hibernate.hbm2ddl.auto validate
higson.database.autoddl-action Action to be taken during Higson Studio startup with respect to database schema update:check - verify whether schema is correctupdate - chcek database schema and update, if neededskip - do nothing update
higson.database.url JDBC connection url THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.database.username Username that Higson will use to connect to database defined in mpp.database.url THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.database.password Password that Higson will use to connect to database defined in mpp.database.url THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.database.schema Database schema wherein Higson tables exist
Environment
higson.studio.instance-name Id identifying specific Higson Studio Instance. It is visible in Higson Studio below menu toolbar
higson.studio.url Higson Studio url used in few places, for example to create url for authentication token reset, CAS authentication etc. http://localhost:8080/higson/app
higson.studio.region.updater.task-cron CRON expression used to schedule job updating system region versions in Higson Studio 0 1 0 * * *
Security
higson.security.basic.password-encode Name of using password encoder bcrypt
higson.security.basic.bcrypt.complexity Password encoder complexity 5
higson.security.jwt.secret-key Secret to decode JWT token (up to 256-bytes chars). To communicate with Runtime Rest client.
higson.studio.security.token.verification.secret-key Secret to verify JWT token (up to 256-bytes chars). To communicate with UI. THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.studio.security.token.verification.algorithm Determines JWT token verification algorithm (only HMAC256 supported) HMAC256
higson.studio.security.token.generation.enabled Determines if studio server works as authentication provider true
higson.studio.security.token.generation.secret-key Secret to sign JWT token (up to 256-bytes chars). To communicate with UI. ${higson.studio.security.token.verification.secret-key}
higson.studio.security.token.generation.algorithm Determines JWT token sign algorithm (only HMAC256 supported) ${higson.studio.security.token.verification.algorithm}
higson.studio.security.token.generation.access-token-lifetime.value Access token lifetime value 5
higson.studio.security.token.generation.access-token-lifetime.unit Access token lifetime unit Minutes
higson.studio.security.token.generation.refresh-token-lifetime.value Refresh token lifetime value 7
higson.studio.security.token.generation.refresh-token-lifetime.unit Refresh token lifetime unit Days
higson.studio.security.token.generation.persist-refresh-token Should persist refresh token to database (session idempotent) true
higson.studio.security.login.attempts-limit Limit of failed login attempts 3
higson.studio.security.login.attempts-cooldown Time (in seconds) to freeze the ability to log in after reaching the limit of failed attempts 20
Features
higson.studio.mail.host Mailer server host. If host and port are not set - mailer is not loaded ""
higson.studio.mail.port Mailer server port. If host and port are not set - mailer is not loaded ""
higson.studio.mail.username Mailer server username ""
higson.studio.mail.password Mailer server username’s password ""
higson.studio.mail.from Mailer from metadata ""
higson.studio.snapshot.param.matrix.writer.order-by-all-level Should sort by all levels during export decision table to file. Available: true/false true
higson.studio.groovy.secured Groovy function verification. Available: true/false. If set to true it is not possible to use a class of type System or Exception. If set to false the function body is not validated and possible security problems will not be caught. true
higson.studio.function.validate-arguments Flag determining whether function arguments data types should be validated before test execution false
higson.studio.max-file-size Specifies the size of the snapshot that can be uploaded 100MB
higson.persistence.ui.enabled Enables GMO in Higson Studio UI false
higson.studio.global-search.matrix-scan.enabled Determines whether Global Search scans decision table matrices (cell values). When false, matrix cell values are not searched (decision table definitions, domain, functions, flows and context are still searched) and the Matrix option is removed from the Decision tables dropdown in Global Search on the Dashboard. The same applies to find-usages in AI features (chat / AI decision table): results from matrices are not returned. true

RUNTIME#

Available for Higson Runtime Spring Boot Starter or Higson Runtime REST apps

Property name Description Default Value
Database
higson.database.dialect Database dialect to use. Available values: oracle, hsqldb, h2, mssql2012, postgresql, mysql oracle
higson.database.url JDBC connection url THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.database.username Username that Higson will use to connect to database defined in mpp.database.url THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.database.password Password that Higson will use to connect to database defined in mpp.database.url THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.database.schema Database schema wherein Higson tables exist
Environement
higson.runtime-rest.url URL of Higson Runtime Rest
Authentication
higson.runtime-rest.security.type Defines security type for runtime rest. Possible values: jwt, active-directory. When not set basic authentication is enabled
higson.security.jwt.secret-key Secret key to decrypt runtime rest token THIS PROPERTY MUST BE SET AT SYSTEM START BY THE USER
higson.security.active-directory.domain Active Directory main root
higson.security.active-directory.url Active Directory server url
higson.security.active-directory.root-dn AD root domain
Other
higson.runtime.function.validate-arguments flag determining whether function arguments data types should be validated before execution false
higson.runtime.normalization.throw-on-exception flag determining whether an exception should be thrown when matrix value can’t be normalized false
higson.runtime.external-datasource.sql.names Names of data sources list.
higson.runtime.external-datasource.sql.%s.url Url to data source. %s is name of datasource from property above.
higson.runtime.external-datasource.sql.%s.username Username to data source. %s is name of datasource from property above.
higson.runtime.external-datasource.sql.%s.password Password to data source. %s is name of datasource from property above.
higson.runtime.external-datasource.sql.%s.min-pool-size Minimum size of connection thread pool. %s is name of datasource from property above. 1
higson.runtime.external-datasource.sql.%s.max-pool-size Maximum size of connection thread pool. %s is name of datasource from property above. 8
higson.runtime.parameter.value-never-null Flag responsible for managing global support of nullable decision table’s results in Higson Engine. If true, decision tables will return instance of pl.decerto.higson.runtime.core.EmptyParamValue when no match found. If set to false, decision tables return null. true
higson.runtime.watchers.enabled Flag determining whether runtime watchers should start automatically true
higson.runtime-rest.openapi.servers Comma separated list of servers URLs used in try it function in OpenAPI GUI. If not filled, URL will be generated automatically.
higson.runtime.groovy.secured Groovy function verification. Available: true/false. If set to true it is not possible to use a class of type System or Exception. If set to false the function body is not validated and possible security problems will not be caught. true
higson.runtime.dev-mode-enabled Enables developer mode. false
higson.runtime.username Username for developer mode.
higson.runtime.max-concurrent-loads Sets limited access to concurrent loads of decision tables. This helps to control usage of resources, since fetching decision tables might be very stressful for the application. 3
higson.runtime.watcher.pause-seconds Setup pause of watchers in seconds. (works for: param-watcher, function-watcher, domain-watcher, version-watcher, profile-runtime-watcher, userRegionVersion-runtime-watcher) 3
higson.runtime.watcher.force-sync-seconds Set the time after which the watcher will force a full cache synchronization. (works for: param-watcher) 60

Properties names since version 4.1

SECURITY:#

Version 4.0 Version 4.1
higson.security.jwt.access-token-lifetime.unit higson.studio.security.token.generation.access-token-lifetime.unit
higson.security.jwt.access-token-lifetime.value higson.studio.security.token.generation.access-token-lifetime.value
higson.security.jwt.authentication-server higson.studio.security.token.generation.enabled
higson.security.jwt.algorithm higson.studio.security.token.generation.algorithm
higson.security.password-encoder.name higson.security.basic.password-encoder
higson.security.password-encoder.complexity higson.security.basic.bcrypt.complexity
higson.security.jwt.refresh-token-lifetime.unit higson.studio.security.token.generation.refresh-token-lifetime.unit
higson.security.jwt.refresh-token-lifetime.value higson.studio.security.token.generation.refresh-token-lifetime.value
higson.security.jwt.secret-key higson.security.jwt.secret-key
higson.security.jwt.persist-refresh-token higson.studio.security.token.generation.persist-refresh-token
higson.security.password-encoder.name higson.security.basic.password-encoder
higson.security.password-encoder.complexity higson.security.basic.bcrypt.complexity

Authentication

Authentication in Studio

Standard / Username and password#

No extra actions needed to use it, it is available by default.

SAML#

Configuration steps:

  • Configure Tomcat to use HTTPS (if needed).
  • Fill properties:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#Required properties:
  
higson.studio.security.token.generation.authentication.type=saml
#Specifies the URL of the Studio backend application, e.g.: http://yourdomain.com:38080/higson/api
higson.studio.security.token.generation.authentication.saml.base-url=
#Specifies entity identifier, e.g.: higson
higson.studio.security.token.generation.authentication.saml.entity-id=
#Specifies the path to the IDP metadata file, e.g.: file:/home/user/metadata.xml
higson.studio.security.token.generation.authentication.saml.idp-metadata-file-path=
#Specifies maximum difference between clocks of the identity provider and Studio machines, e.g.: 60
higson.studio.security.token.generation.authentication.saml.response-skew=
#Specifies the source of the roles, possible values: saml / internal
higson.studio.security.token.generation.authentication.saml.roles-origin=
#Specifies the path to the keystore with certificate and private key used to sign and decrypt data, e.g.: file:/home/user/higson.jks
higson.studio.security.token.generation.authentication.saml.key-store.path=
#Specifies the keystore password
higson.studio.security.token.generation.authentication.saml.key-store.pass=
#Specifies an alias for the certificate in the keystore
higson.studio.security.token.generation.authentication.saml.key-store.alias=
#Specifies the private key password
higson.studio.security.token.generation.authentication.saml.key-store.key-pass=
#Specifies the URL of the Studio frontend application, e.g.: http://yourdomain.com:38080/higson/app
higson.studio.security.token.generation.authentication.saml.token-destination-url=

#Optional properties:
  
#Specifies the attribute names
higson.studio.security.token.generation.authentication.saml.attributes.firstname=firstname
higson.studio.security.token.generation.authentication.saml.attributes.lastname=lastname
higson.studio.security.token.generation.authentication.saml.attributes.mail=mail
higson.studio.security.token.generation.authentication.saml.attributes.roles=roles
#Specifies the endpoint that returns SP metadata 
higson.studio.security.token.generation.authentication.saml.sp-metadata-endpoint=/saml2/metadata
#Specifies the endpoint that accepts login response from the IDP
higson.studio.security.token.generation.authentication.saml.assertion-consumer-service-endpoint=/login/saml2/sso/higson
#Specifies the endpoint that accepts logout request
higson.studio.security.token.generation.authentication.saml.single-logout-service-endpoint=/saml2/logout
  • Generate Studio metadata and import in your Identity Provider

On your IDP:

  • Configure Identity Provider to send attributes with assertion response.
  • Check that Identity Provider configuration for Assertion Consumer Service URL and Logout Service URL is correct.

Important! SAML Response signature must include message and assertions!

Attributes mapping#

SAML Response must contain following attributes:

  • Name ID (this is used as user login)
  • firstname
  • lastname
  • mail
  • roles

When a user logs into Higson Studio, their account is automatically created in the system with an external status.

Roles#
  • if higson.studio.security.token.generation.authentication.saml.roles-origin=saml is specified roles are taken from assertion response therefore Identity Provider must be configured to send it with response. internal means Studio will take roles from database instead of SAML assertion response to authorize user.

Active Directory#

  • Fill properties:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#Required properties:

higson.studio.security.token.generation.authentication.type=active-directory
#Specifies Active Directory main root, e.g.: domain.local
higson.studio.security.token.generation.authentication.active-directory.domain=
#Specifies Active Directory server url, e.g.: ldap://10.111.22.156:389/
higson.studio.security.token.generation.authentication.active-directory.url=
#Specifies Active Directory root domain, e.g.: DC=domain,DC=local
higson.studio.security.token.generation.authentication.active-directory.root-dn=

#Optional properties:

#Specifies user search filter in Active Directory ({0} are replaced with the username@domain, {1} are replaced with the username only)
higson.studio.security.token.generation.authentication.active-directory.search-filter=(&(objectClass=user)(userPrincipalName={0}))
Requirements for Access Directory user:#

Login - not empty, min size: 1, max size: 200
First name - not empty, min size: 1
Last name - not empty, min size: 1
E-mail address - if empty Higson generates default e-mail consistent with schema: ’login@local.com’
Roles - min one role consistent with Higson role.

Roles defined in Active Directory must be compatible with roles in Higson structure.

Hierarchy of roles in Higson:#

MPP_ADMIN - Higson Administrator
MPP_USER - Higson User
MPP_USER_READONLY - Readonly Higson User \

It is possible to create own roles in AD but remember to create same roles in Higson structure. It’s necessary to proper authentication process. When a user logs into Higson Studio, their account is automatically created in the system with an external status.

CAS#

Configuration steps:

  • Configure Tomcat to use HTTPS.
  • Fill properties:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Required properties:

higson.studio.security.token.generation.authentication.type=cas
#Specifies the URL of the Studio backend application, e.g.: https://yourdomain.com:38080/higson/api
higson.studio.security.token.generation.authentication.cas.base-url=
#Specifies CAS server url, e.g.: https://cas_server_adress:9443/cas/p3
higson.studio.security.token.generation.authentication.cas.server-url=
#Specifies CAS login endpoint, e.g.: https://cas_server_adress:9443/cas/login
higson.studio.security.token.generation.authentication.cas.login-url=
#Specifies CAS logout endpoint, e.g.: https://cas_server_adress:9443/cas/logout
higson.studio.security.token.generation.authentication.cas.logout-url=
#Specifies the URL of the Studio frontend application, e.g.: http://yourdomain.com:38080/higson/app
higson.studio.security.token.generation.authentication.cas.token-destination-url=

When logging in using CAS, you must configure the corresponding users on the Higson Studio side. Roles are defined and managed on the Higson Studio side.

Studio Refresh and Access Token

A refresh token is a special type of access key used to automatically renew a user session without the need to log in again. It is used together with an access token. It is used to ensure user convenience, as it means that users do not have to constantly log in to the application.

The following properties define the lifetime of tokens:

higson.studio.security.token.generation.access-token-lifetime.unit=Minutes
higson.studio.security.token.generation.access-token-lifetime.value=5
higson.studio.security.token.generation.refresh-token-lifetime.unit=Minutes
higson.studio.security.token.generation.refresh-token-lifetime.value=7

The refresh token has a longer lifespan and is used to obtain a new access token. The access token is included in requests and enables authorized access to the API. Once the access token expires, the browser automatically uses the refresh token to retrieve a new access token. If the refresh token also expires, the user will be logged out of the system. Modifying the access token lifetime affects how often it needs to be refreshed — in other words, how frequently the system must generate a new access token. Meanwhile, the refresh token lifetime determines how long a user can remain logged in, that is, how long they can obtain new access tokens without having to log in again.

It’s important to remember that when an automatic logout occurs, any unsaved changes will be lost.

Authentication in Runtime REST

JWT Based Authentication (Runtime Token)#

It is set by default.

The property higson.security.jwt.secret-key must be set in both Studio’s and client’s side Runtime Rest application with same string sequence:

1
2
higson.runtime-rest.security.type=jwt
higson.security.jwt.secret-key=your_secret_key

You can generate a new token in Studio. A view to see all existing tokens and to generate a new one can be found in Menu’s Tools tab. When creating a new token, you can specify the expiry date. Admin users may also specify a user that a newly generated token will be assigned to. To use generated token in REST API calls, you need to add an Authorization Header with the standard bearer format, such as Authorization: Bearer your_jwt_token

Basic Authentication#

1
higson.runtime-rest.security.type=basic

You can choose from the following password encoder security algorithms: bCrypt (default) or Pbkdf2

To select a Pbkdf2 algorithm, you must set higson.security.basic.password-encoder=Pbkdf2 property in the application.properties You can choose the complexity of BCrypt algorithm by setting a property higson.security.basic.bcrypt.complexity with values between 4 and 31 are accepted, 5 is used by default. Be careful, since the bigger the value the safer algorithm is, but the performance impact is also increasing.

Active Directory#

1
2
3
4
    higson.runtime-rest.security.type=active-directory
    higson.security.active-directory.domain=domain.local #Active Directory main root
    higson.security.active-directory.url=ldap://server-url/ #Active Directory server url
    higson.security.active-directory.root-dn=DC=domain,DC=local #AD root domain

Upgrade

Higson applications upgrade

This is wise to upgrade Higson applications (the Studio and Runtime) for a newer version as we are repairing bugs and adding new features, so let’s check how to do it in a few short steps. This article refers to patch installation.

IMPORTANT:

  • As far higson-studio and higson-runtime are separate applications we truly recommend running them the same version.
  • Higson Studio MUST BE STARTED FIRST! Higson Studio is managing the Database Schema!

Supported components#

The table below lists the core components and versions used by the supported Higson LTS lines. Use it to confirm the target stack before upgrading.

Component 4.1 LTS 4.2 LTS 4.3 LTS
Java (JRE) 17 17 17
Apache Tomcat 10.1 10.1 11.0.25
Spring Boot 3.3 3.3 4.1.1

Bump the Studio application first#

Download Studio#

Firstly, download application from here. After filling the form, you will get mail with a link to your download page. Depending on your needs, download the file/files (probably you use a war file with your tomcat).

Shut down old Studio.#

Turn off the Studio App. You probably want to stop all running applications which are using higson-runtime, because we need to modify its database schema.

Remember to create a database backup!#

Due to the fact, there might occur database updates, it would be very helpful if you prepare a Higson’s database backup. Use a database client to create the backup. Do not use a snapshot (Higson Studio functionality), as snapshots do not store history.

Check out properties

Make sure that application properties are up to date.

Take a look at your property source (by default: {your_tomcat_dir}/conf/application.properties) and change them regarding the table followed the link Pay special attention to database connection properties.

Adjust ports

If necessary, modify the server.xml file (adjust ports as in previous version).

Start the Studio Application#

You should be able to see a standard login page (by default: https://{serverUrl}/higson/app)

Bump the Runtime in your applications#

Since Runtime is available at Maven Central repositories, you should only bump its version at your building script, ie: build.gradle, pom.xml etc.

Migrate between versions

Bump the Studio application#

Understanding dependencies between applications:

  • Higson Studio and Higson Runtime are separate applications but should run on the same version.
  • Higson Studio must be started first, as it manages the database schema.

Download new Studio

The first step you should do is to head for new applications here. Search for version of 4.1

Shut down the Studio

Turn off the Studio App. You probably want to stop all running applications which are using higson-runtime, because we need to modify its database schema.

Remember to create a database backup!

Due to the fact, there might occur database updates, it would be very helpful if you prepare a Higson’s database backup. Use a database client to create the backup. Do not use a snapshot (Higson Studio functionality), as snapshots do not store history.

Check out new properties

In a Higson Studio 4.1 there were a lot of changes with properties.

Take a look at your property source (by default: {your_tomcat_dir}/conf/application.properties) and change them regarding the table followed the link Pay special attention to database connection properties and security properties.

Adjust ports

If necessary, modify the server.xml file (adjust ports as in version 4.0).

Start the Studio App

You should be able to see a standard login page (by default: https://{serverUrl}/higson/app)

Bump the Runtime in your applications#

Since Runtime is available at Maven Central repositories, you should only bump its version at your building script, ie: build.gradle, pom.xml etc. Check out the new properties for Runtime App since there were a lot of changes.

Security Advisories

This page lists vulnerabilities in third-party components that security scanners may report against Higson 4.1 and that cannot be removed by upgrading the component. Each entry states whether Higson is affected. Vulnerabilities fixed by a component upgrade are listed in the changelog.

CVE-2026-59313 – Spring Framework (spring-webmvc)#

Component org.springframework:spring-webmvc 6.2.19
Severity Low, CVSS 3.1 base score 2.6 according to the vendor (Spring advisory); reported as Critical by some scanners
Status Not affected
Justification vulnerable_code_not_in_execute_path
Action required None
Last reviewed 2026-10-09

Justification. The vulnerability can be exploited only when an application uses the Spring MVC functional web framework (RouterFunction) to send Server-Sent Events with ServerResponse.sse(). Higson Studio 4.1 and Higson Runtime REST 4.1 define no RouterFunction routes and expose no Server-Sent Events endpoints. The vulnerable code is shipped with the library but is never executed.

CVE-2026-47884 – Spring Framework (spring-webmvc)#

Component org.springframework:spring-webmvc 6.2.19
Severity Critical according to the vendor (Spring advisory)
Status Not affected
Justification vulnerable_code_not_in_execute_path
Action required None
Last reviewed 2026-10-27

Justification. The vulnerability (improper path limitation in XsltView) can be exploited only when an application renders views with XsltView and has a catch-all /** mapping that results in view rendering without an explicitly specified view name. Higson Studio 4.1 and Higson Runtime REST 4.1 do not use XsltView or XsltViewResolver, define no view resolvers, and expose their HTTP endpoints exclusively through @RestController classes that return data and not view names. The vulnerable code is shipped with the library but is never executed.

CVE-2026-47890 – Spring Framework (spring-webmvc)#

Component org.springframework:spring-webmvc 6.2.19
Severity Critical according to the vendor (Spring advisory)
Status Not affected
Justification vulnerable_code_not_in_execute_path
Action required None
Last reviewed 2026-10-27

Justification. The vulnerability (Server-Sent Event stream corruption while rendering fragments) can be exploited only when an application sends Server-Sent Events together with view fragments (FragmentsRendering). Higson Studio 4.1 and Higson Runtime REST 4.1 do not use FragmentsRendering, SseEmitter or any other Server-Sent Events mechanism, and expose no text/event-stream endpoints. The vulnerable code is shipped with the library but is never executed.

CVE-2026-119078 – Apache Commons Codec (commons-codec)#

Component commons-codec:commons-codec 1.18.0
Severity Reported as Critical (CVSS 3.1 base score 9.1) by some vulnerability databases and scanners; the vendor fix in 1.23.0 changes documentation only (Debian security tracker)
Status Not affected
Justification vulnerable_code_not_in_execute_path
Action required None
Last reviewed 2026-11-23

Justification. The vulnerability concerns only the org.apache.commons.codec.digest.Blake3 class: its documentation stated that repeated calls to doFinalize produce different output, while they return the same bytes, so an application that derives several keys this way gets identical keys. Higson Studio 4.1 does not use Blake3, and no class shipped in Higson Studio 4.1 outside commons-codec references it. Higson Runtime REST 4.1 does not include commons-codec. The vulnerable code is shipped with the library but is never executed.

Enabling developer mode (devmode)

Enabling a developer mode feature allows seeing all unpublished changes of a defined user by the Runtime application, which leads to faster development. Developer mode is disabled by default.

Enabling devmode programmatically#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
@Bean
public HigsonEngine higsonEngine() {

	HigsonEngineFactory factory = new HigsonEngineFactory();
	...
	factory.setDeveloperMode(true);
	factory.setUsername("username"); //login of user which changes you want to see at devmode
	...
	return factory.create();
}

Enabling devmode using property file#

Configuration that is needed in application.yml to enable developer mode:

1
2
3
4
higson:
  runtime:
    dev-mode-enabled: true
    username: <username> #login of user which changes you want to see at devmode

Using HigsonEngineFactory excludes a possibility to use application.yml.

Disabling cache for a bundle

Caching bundle saved or read by Higson Persistence may be configured in three different ways.

1. Automatically generated EhCache#

If cache is not configured on sight then Higson Persistence creates its own EhCache with the name : gmo and idleTime=10 minutes

2. Use selected EhCache region#

You may configure it to use selected EhCache region

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
@Profile("!nocache") //turn off nocache profile
@Bean(destroyMethod = "destroy")
public HigsonPersistenceFactory cacheableHigsonPersistenceFactory() {
	
	HigsonPersistenceFactory factory = new HigsonPersistenceFactory();
	factory.setDataSource(gmoDataSource);
	factory.setHigsonDataSource(runtimeDataSource);
	factory.setDefaultProfile(env.getProperty("higson.profile"));
	factory.setAutoStartWatchers(true);
	factory.setHiloSequenceName("hp_seq");
	factory.setHiloAllocationSize(100);
	factory.setBundleTable("hp_bundle");
	factory.setBundleColumn("bundle_id");
	factory.setOwnerColumn("owner_id");
	factory.setOwnerPropertyColumn("owner_prop");

	factory.setCacheName("abc"); // execute it during Higson Persistence configuration

	return factory;
}
  • if it is defined ehcache “abc” then it uses that
  • if it is not defined ehcache, then it will create ehcache with name “abc” in default configuration

3. Add your own implementation#

On HigsonPersistanceFactory may add your own implementation of cache (based on map or other cache) using HigsonPersistanceFactory.setCache(BundleCache) method

If you want to turn the cache off (for example for testing purposes) you need to give your cache implementation like follow:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
public class NoBundleCache implements BundleCache {
	
	@Override
	public Bundle get(long id) {
            return null;
	}

	@Override
	public void put(Bundle bundle) {}

	@Override
	public void remove(long id) {}

	@Override
	public void clear() {}
}

@Profile("nocache") //turn on nocache profile
@Bean(destroyMethod = "destroy")
public HigsonPersistenceFactory noCacheHigsonPersistenceFactory() {
	
	HigsonPersistenceFactory factory = new HigsonPersistenceFactory();
	factory.setDataSource(gmoDataSource);
	factory.setHigsonDataSource(runtimeDataSource);
	factory.setDefaultProfile(env.getProperty("higson.profile"));
	factory.setAutoStartWatchers(true);
	factory.setHiloSequenceName("hp_seq");
	factory.setHiloAllocationSize(100);
	factory.setBundleTable("hp_bundle");
	factory.setBundleColumn("bundle_id");
	factory.setOwnerColumn("owner_id");
	factory.setOwnerPropertyColumn("owner_prop");

	factory.setCacheName("abc");
	factory.setCache(new NoBundleCache()); //setting custom cache implementation

	return factory;
}

Higson CLI Maven Plugin

The Higson CLI Maven Plugin (higson-cli-maven-plugin) allows you to synchronize the business logic configuration stored in your project repository with a running Higson Studio instance directly from the command line or CI/CD pipeline. The plugin uses the Studio snapshot API to perform pull (download) and push (upload) operations.

This eliminates the need to use the Higson Studio GUI for environment migrations and enables version-controlled, automated deployments of business rules configuration.

Prerequisites:

  • Java 17
  • Maven 3.x
  • Running Higson Studio instance (4.1.x)

Quick Start#

Add the plugin to your pom.xml:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<plugin>
    <groupId>io.higson</groupId>
    <artifactId>higson-cli-maven-plugin</artifactId>
    <version>4.1.0</version>
    <configuration>
        <higsonSnapshotDir>${basedir}/src/main/higson</higsonSnapshotDir>
        <higsonUrl>http://localhost:8282/higson</higsonUrl>
        <higsonToken>${higsonToken}</higsonToken>
    </configuration>
</plugin>

Pull the snapshot from Studio into your local directory:

mvn higson-cli:pull

Push local changes back to Studio:

mvn higson-cli:push

Authentication#

The plugin supports two mutually exclusive authentication methods.

Provide a pre-obtained Bearer token directly. No login request is made. Recommended for CI/CD pipelines and automated environments.

1
2
3
4
5
<configuration>
    <higsonUrl>http://localhost:8282/higson</higsonUrl>
    <higsonSnapshotDir>${basedir}/src/main/higson</higsonSnapshotDir>
    <higsonToken>${higsonToken}</higsonToken>
</configuration>

Pass the token at build time:

mvn higson-cli:pull -DhigsonToken=eyJhbGciOiJIUzI1NiJ9...

The token must have the SNAPSHOT_DOWNLOAD permission for pull operations and SNAPSHOT_UPLOAD for push operations. Studio Integration Tokens can be managed in Tools → Licences and tokens.

Username and password#

The plugin will call the Studio login endpoint (/api/login) and obtain a Bearer token automatically. Suitable for development environments. Do not hardcode credentials in pom.xml — use Maven property references (${higsonPassword}) resolved from ~/.m2/settings.xml or CI/CD secret injection.

1
2
3
4
5
6
<configuration>
    <higsonUrl>http://localhost:8282/higson</higsonUrl>
    <higsonSnapshotDir>${basedir}/src/main/higson</higsonSnapshotDir>
    <higsonUser>${higsonUser}</higsonUser>
    <higsonPassword>${higsonPassword}</higsonPassword>
</configuration>

Pull#

The pull goal downloads a snapshot from Studio and writes the files into higsonSnapshotDir. After extraction, the plugin prints a per-file status to the console: new (file did not exist locally), modified (content changed), or skipped (file is unchanged). If higsonSnapshotDir does not exist, the plugin creates it automatically.

mvn higson-cli:pull

Full goal reference:

mvn io.higson:higson-cli-maven-plugin:pull

Pull options#

All pull options are optional. When omitted, their default values apply.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<pullOptions>
    <tags>true</tags>
    <domains>true</domains>
    <profileWithContext>true</profileWithContext>
    <sourceProfileCodes>
        <param>PROFILE_CODE</param>
    </sourceProfileCodes>
    <functions>
        <nameStartsWith>
            <param>myapp.</param>
        </nameStartsWith>
        <filterByTags>
            <param>production</param>
        </filterByTags>
        <onlyFromActiveSession>false</onlyFromActiveSession>
    </functions>
    <decisionTables>
        <nameStartsWith>
            <param>myapp.</param>
        </nameStartsWith>
        <filterByTags>
            <param>production</param>
        </filterByTags>
        <onlyFromActiveSession>false</onlyFromActiveSession>
    </decisionTables>
    <eol>CRLF</eol>
    <excludes>
        <exclude>config.json</exclude>
        <exclude>@tags/@basic/TEMP.tag</exclude>
    </excludes>
</pullOptions>

Top-level pull options#

Parameter Type Default Description
tags boolean true Include tags in the downloaded snapshot.
domains boolean true Include domain configuration in the downloaded snapshot.
profileWithContext boolean true Include profile context data.
sourceProfileCodes list of strings empty Limit the export to the listed profile codes. When empty, all profiles are included.
eol string none Line ending conversion applied to all text files after download. Available values: LF, CR, CRLF. When not set, files are copied as-is.
excludes list of glob patterns empty Files matching any of the patterns are not written to higsonSnapshotDir.

Functions filtering#

Parameter Type Default Description
nameStartsWith list of strings empty Include only functions whose names start with any of the provided prefixes. When empty, all functions are included.
filterByTags list of strings empty Include only functions that have at least one of the listed tags assigned. When empty, tag filtering is not applied.
onlyFromActiveSession boolean false When true, includes only functions that have been modified in the currently active session.

Decision tables filtering#

Parameter Type Default Description
nameStartsWith list of strings empty Include only decision tables whose names start with any of the provided prefixes. When empty, all decision tables are included.
filterByTags list of strings empty Include only decision tables that have at least one of the listed tags assigned. When empty, tag filtering is not applied.
onlyFromActiveSession boolean false When true, includes only decision tables that have been modified in the currently active session.

Line ending conversion (EOL)#

By default, no line ending conversion is applied (files are copied as-is from the Studio response).

If you work on Windows with git config core.autocrlf=true, every pulled file may appear as modified because of line ending differences. Setting <eol>CRLF</eol> normalises all pulled text files to Windows line endings before writing them to disk, preventing false diffs.

Value Line ending Platform
LF \n Unix / Linux / macOS
CR \r Classic macOS
CRLF \r\n Windows

File exclusions#

Use excludes to prevent specific files from being overwritten on pull. Each entry is a glob pattern evaluated against the relative path of the file inside the snapshot.

1
2
3
4
5
<excludes>
    <exclude>config.json</exclude>
    <exclude>@profiles/MOTO/profile.json</exclude>
    <exclude>@tags/@basic/AGRO.tag</exclude>
</excludes>

Push#

The push goal zips the contents of higsonSnapshotDir and uploads it to Studio via the snapshot import endpoint. Imported changes land in a new session — a set of pending changes that must be explicitly published before they affect the live environment. See Sessions for how to review and publish sessions in Studio. higsonSnapshotDir must exist and must not be empty.

mvn higson-cli:push

Publish the session immediately after a successful import:

mvn higson-cli:push -DautoCommit=true

Full goal reference:

mvn io.higson:higson-cli-maven-plugin:push
mvn io.higson:higson-cli-maven-plugin:push -DautoCommit=true

autoCommit#

Parameter Type Default Description
autoCommit boolean false When true, the imported snapshot is automatically published without requiring manual session approval in Studio.

Push options#

The pushOptions block controls how Studio handles elements during import. All parameters are optional and default to false.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<pushOptions>
    <decisionTableConfig>
        <removeNotIncludedInSnapshot>false</removeNotIncludedInSnapshot>
        <forceDelete>false</forceDelete>
        <searchWithinMatrix>false</searchWithinMatrix>
    </decisionTableConfig>
    <functionConfig>
        <removeNotIncludedInSnapshot>false</removeNotIncludedInSnapshot>
        <forceDelete>false</forceDelete>
        <searchWithinMatrix>false</searchWithinMatrix>
    </functionConfig>
    <domainConfig>
        <removeNotIncludedInSnapshot>false</removeNotIncludedInSnapshot>
    </domainConfig>
</pushOptions>

These options mirror the Remove not in snapshot, Force Delete, and Search Within Parameter Matrix options available in the Studio snapshot upload UI. Refer to the Snapshot article for a detailed explanation of each behaviour.

Decision table configuration#

Parameter Type Default Description
removeNotIncludedInSnapshot boolean false Delete decision tables present in Studio but absent from the snapshot. Deletion respects the same name/tag filters that were used during export.
forceDelete boolean false Force delete decision tables even when they are referenced by other elements. May cause errors in dependent elements.
searchWithinMatrix boolean false When checking for references before deletion, also search inside decision table matrices (not only domain elements and IN-level value sources).

Function configuration#

Parameter Type Default Description
removeNotIncludedInSnapshot boolean false Delete functions present in Studio but absent from the snapshot. Deletion respects the same name/tag filters that were used during export.
forceDelete boolean false Force delete functions even when they are referenced by other elements. May cause errors in dependent elements.
searchWithinMatrix boolean false When checking for references before deletion, also search inside decision table matrices.

Domain configuration#

Parameter Type Default Description
removeNotIncludedInSnapshot boolean false Delete domain elements present in Studio but absent from the snapshot.

Import result#

After a successful push, the plugin prints an import summary to the console grouped by element type (Decision Tables, Functions, Domain, Profiles, Tags, Tests, Test Packages). A detailed log is also written to the log file (see Log files).

The build fails if Studio reports any import error. A build with warnings completes successfully.


Log files#

The plugin writes operation logs to disk after each pull or push. logFilePath sets the base path; the plugin automatically appends an operation suffix before writing:

  • Pull: higson-cli-pull.log
  • Push: higson-cli-push.log

The default base is ${basedir}/higson-cli, which results in ${basedir}/higson-cli-pull.log and ${basedir}/higson-cli-push.log.

To use a custom base path, set logFilePath in the plugin configuration:

1
2
<!-- Results in logs/higson-pull.log and logs/higson-push.log -->
<logFilePath>${basedir}/logs/higson.log</logFilePath>

Or override at build time:

mvn higson-cli:push -DlogFilePath=/path/to/custom/higson.log

The pull log contains the full export request parameters and a per-file change summary (new, modified, skipped). The push log contains per-element-type import statistics and the status (imported, skipped, error, warning, deleted) for every individual element.


Full configuration reference#

The example below includes all available parameters with their default values.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<plugin>
    <groupId>io.higson</groupId>
    <artifactId>higson-cli-maven-plugin</artifactId>
    <version>4.1.0</version>
    <configuration>

        <!-- Required -->
        <higsonUrl>http://localhost:8282/higson</higsonUrl>
        <higsonSnapshotDir>${basedir}/src/main/higson</higsonSnapshotDir>

        <!-- Authentication: token (recommended) -->
        <higsonToken>${higsonToken}</higsonToken>

        <!-- Authentication: username and password (alternative) -->
        <!-- <higsonUser>${higsonUser}</higsonUser> -->
        <!-- <higsonPassword>${higsonPassword}</higsonPassword> -->

        <!-- Optional: base path for log files (default: ${basedir}/higson-cli) -->
        <!-- Resulting files: higson-cli-pull.log, higson-cli-push.log -->
        <logFilePath>${basedir}/higson-cli.log</logFilePath>

        <!-- Optional: auto-publish session after successful push (default: false) -->
        <autoCommit>false</autoCommit>

        <pullOptions>
            <tags>true</tags>
            <domains>true</domains>
            <profileWithContext>true</profileWithContext>
            <sourceProfileCodes>
                <param>PROFILE_CODE</param>
            </sourceProfileCodes>
            <functions>
                <nameStartsWith>
                    <param>myapp.</param>
                </nameStartsWith>
                <filterByTags>
                </filterByTags>
                <onlyFromActiveSession>false</onlyFromActiveSession>
            </functions>
            <decisionTables>
                <nameStartsWith>
                    <param>myapp.</param>
                </nameStartsWith>
                <filterByTags>
                </filterByTags>
                <onlyFromActiveSession>false</onlyFromActiveSession>
            </decisionTables>
            <!-- Optional: LF | CR | CRLF. Default: no conversion -->
            <eol>CRLF</eol>
            <excludes>
                <exclude>config.json</exclude>
            </excludes>
        </pullOptions>

        <pushOptions>
            <decisionTableConfig>
                <removeNotIncludedInSnapshot>false</removeNotIncludedInSnapshot>
                <forceDelete>false</forceDelete>
                <searchWithinMatrix>false</searchWithinMatrix>
            </decisionTableConfig>
            <functionConfig>
                <removeNotIncludedInSnapshot>false</removeNotIncludedInSnapshot>
                <forceDelete>false</forceDelete>
                <searchWithinMatrix>false</searchWithinMatrix>
            </functionConfig>
            <domainConfig>
                <removeNotIncludedInSnapshot>false</removeNotIncludedInSnapshot>
            </domainConfig>
        </pushOptions>

    </configuration>
</plugin>

Monitoring

Higson Studio and Higson Runtime REST expose Spring Boot Actuator endpoints for health checks and metrics. Starting with version 4.1.32, metrics are available in the Prometheus format and every actuator endpoint other than health requires authentication.

Endpoints#

Endpoint Higson Studio Higson Runtime REST Authentication
Health /higson/api/actuator/health /actuator/health none
Prometheus metrics /higson/api/actuator/prometheus /actuator/prometheus required
Other actuator endpoints info not exposed required

Paths are relative to the application address. Higson Studio in the official Docker image listens on port 38080, Higson Runtime REST on port 8081. When Runtime REST runs with a context path (SERVER_SERVLET_CONTEXT_PATH), add it in front of /actuator.

Authentication:

  • Higson Studio accepts any valid token, sent as Authorization: Bearer <token>.
  • Higson Runtime REST uses its configured security type (see Authentication in Runtime REST): a Runtime REST token in JWT mode, user credentials in basic and Active Directory mode.

Requests without valid credentials get 401 Unauthorized.

Health checks#

The health endpoint is available without authentication and returns only the overall status, for example {"status":"UP"}. Component details (database, disk space) are not shown to anonymous callers.

Use /actuator/health for Docker HEALTHCHECK, load balancers and Kubernetes probes:

1
2
3
4
livenessProbe:
  httpGet:
    path: /higson/api/actuator/health   # Runtime REST: /actuator/health
    port: 38080                         # Runtime REST: 8081

Prometheus metrics#

The prometheus endpoint returns the metrics collected by Micrometer, among others:

Metric Description
http_server_requests_seconds_count, _sum, _max number and duration of HTTP requests, tagged with uri, method, status and outcome; in Runtime REST this includes /api/execution/invoke
hikaricp_connections_active, _idle, _pending, _max, hikaricp_connections_timeout_total database connection pool
jvm_memory_used_bytes, jvm_memory_max_bytes, jvm_gc_pause_seconds_*, jvm_threads_* JVM memory, garbage collection and threads
process_cpu_usage, system_cpu_usage, process_uptime_seconds CPU and uptime
tomcat_sessions_*, executor_* web server sessions (Runtime REST only) and thread pools
logback_events_total number of log events per level (for example level="error")

These are technical metrics of the application. Higson does not publish business metrics (for example the number of evaluated decision tables) through this endpoint.

Creating a token for the scraper#

Higson Runtime REST (JWT mode). In Higson Studio go to Tools → Licences and tokens and add a token of type Runtime REST Token with a long expiry date. In basic or Active Directory mode use the credentials of a dedicated technical user instead.

Higson Studio.

  1. Create a technical user dedicated to monitoring. It does not need administrative rights.
  2. In Higson Studio go to Tools → Licences and tokens, add a token of type Studio Integration Token for that user and set its expiry date.
  3. Store the token in a file that Prometheus can read (for example a Kubernetes Secret).

Studio integration tokens are accepted on actuator endpoints because /actuator/** is included in the default value of higson.studio.security.token.verification.studio-token-secured-paths. If you override this property, keep /actuator/** in the list, otherwise the scraper gets 401 Unauthorized.

Plan the token rotation before the expiry date: when a token expires, scraping fails with 401 Unauthorized.

Prometheus configuration#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
scrape_configs:
  - job_name: higson-runtime-rest
    metrics_path: /actuator/prometheus
    authorization:
      type: Bearer
      credentials_file: /etc/prometheus/secrets/higson-runtime-rest.token
    static_configs:
      - targets: ['runtime-rest.example.com:8081']

  - job_name: higson-studio
    metrics_path: /higson/api/actuator/prometheus
    authorization:
      type: Bearer
      credentials_file: /etc/prometheus/secrets/higson-studio.token
    static_configs:
      - targets: ['studio.example.com:38080']

For Runtime REST in basic or Active Directory mode replace the authorization section with:

1
2
3
    basic_auth:
      username: monitoring
      password_file: /etc/prometheus/secrets/higson-runtime-rest.password

With the Prometheus Operator use a ServiceMonitor and keep the token in a Secret:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: higson-runtime-rest
spec:
  selector:
    matchLabels:
      app: higson-runtime-rest
  endpoints:
    - port: http
      path: /actuator/prometheus
      interval: 30s
      authorization:
        type: Bearer
        credentials:
          name: higson-monitoring
          key: runtime-rest-token

Checking the configuration#

1
2
3
4
5
6
# without a token: 401
curl -i http://runtime-rest.example.com:8081/actuator/prometheus

# with a token: 200 and metrics in the text format
curl -s -H "Authorization: Bearer $(cat higson-runtime-rest.token)" \
     http://runtime-rest.example.com:8081/actuator/prometheus | grep jvm_memory_used_bytes

In Prometheus the target should be reported as UP on the Status → Targets page.

Example queries#

Purpose PromQL
Requests per second to Runtime REST sum(rate(http_server_requests_seconds_count{job="higson-runtime-rest", uri="/api/execution/invoke"}[5m]))
Average request time sum(rate(http_server_requests_seconds_sum{job="higson-runtime-rest", uri="/api/execution/invoke"}[5m])) / sum(rate(http_server_requests_seconds_count{job="higson-runtime-rest", uri="/api/execution/invoke"}[5m]))
Server errors sum(rate(http_server_requests_seconds_count{status=~"5.."}[5m])) by (job)
Database pool usage hikaricp_connections_active / hikaricp_connections_max
Heap usage sum(jvm_memory_used_bytes{area="heap"}) by (job, instance)
Errors in logs increase(logback_events_total{level="error"}[15m])

Ready-made Grafana dashboards for Micrometer metrics, such as JVM (Micrometer), can be used as a starting point.

Changing the exposed endpoints#

The list of endpoints is controlled by the standard Spring Boot property. The default value in Higson Studio is:

management.endpoints.web.exposure.include=health, info, prometheus

and in Higson Runtime REST:

management.endpoints.web.exposure.include=health, prometheus

To disable metrics, remove prometheus from the list. Every endpoint added to the list requires authentication (only health is public). Endpoints such as logfile, env or loggers give access to logs and configuration and allow changing the logging level, so enable them only when needed.

Security#

  • Keep the actuator endpoints reachable only from the internal network: on an Ingress or load balancer publish only the application paths and /actuator/health if it is needed outside.
  • Use a dedicated technical user for monitoring and do not share its token with other integrations.
  • Before version 4.1.32 all actuator endpoints of Higson Studio were available without authentication. After the upgrade, monitoring tools that read endpoints other than health need a token.