Configuration

The EPMX loads configuration data from a file (typically backed by a Kubernetes config map). If the service is unable to retrieve the configuration data, it will not start. Refer to the configuration for details.

Service configuration structure

The recommended configuration format is YAML. The below sections describe the officially supported configuration options that influence various aspects of the service functionality. The service may support options other than the ones listed below, but those are not a part of the public API and may be changed or deleted at any time.

Kaa applications

Many Kaa services can be configured for different behavior depending on the application version of the endpoint the processed data relates to. This is called appversion-specific behavior and is handled in service configurations under kaa.applications.

kaa:
  applications:
    <application 1 name>:
      versions:
        <application 1 version 1 name>:
          # List of metadata keys that are allowed for client to read. Optional. When not specified, all metadata keys
          # are allowed for both reading and writing.
          metadata-keys:
            <metadata-key-name-1>:      # Name of the metadata key
              write-enabled: <boolean>  # Indicates whether writing is allowed. Defaults to true.
            <metadata-key-name-2>:
            ...

For example:

kaa:
  applications:
    smart_kettle:
      versions:
        kettle_v1:                  # "kettle_v1" application version is configured with no key filtering
        kettle_v2:                  # "kettle_v2" allows only "location" and "owner" metadata fields
          metadata-keys:
            location:               # "location" field is write-enabled
            owner:
              write-enabled: false  # "owner" field is read-only
        kettle_v3:                  # "kettle_v3" explicitly specifies no filtering
          metadata-keys: null

Endpoint register interface

Use the below parameters to configure the REST-based endpoint register interface EPMX uses to retrieve and manage endpoint metadata.

kaa:
  epmx:
    ep-register:
      base-url: <URL>  # Base URL of the endpoint register REST API

NATS

The below parameters configure EPMX’s connection to NATS. Note that for security reasons NATS username and password are sourced from the environment variables.

nats:
  urls: <comma separated list of URL>  # NATS connection URLs

Management

EPMX monitoring and management implementation is based on the Spring Boot Actuator. Refer to the corresponding documentation for the list of supported configuration options.

Authentication

EPMX use auth-kaa-client-starter for make authenticated REST API calls. Authentication implemented according to the oAuth protocol.

security:
  oauth2:
    client:
      enabled: <boolean>             # Is authentication enable for EPMX REST calls. False by default
      base-url: <URL>                # Base host url to oAuth provider (e.g. Keycloak)
      realm: <realm name>            # Realm in oAuth provider
      clientId: <client ID>          # Client ID on whose behalf the requests will be made
      clientSecret: <client secret>  # Client secret on whose behalf the requests will be made

Logging

By default, EPMX uses Spring Boot logging configuration with logback for logging. Refer to the corresponding documentation for the list of supported configuration options.

Built-in configuration profiles

For your convenience, EPMX comes with a default built-in configuration profile.

Built-in profiles are optimized for a Kubernetes-based production deployment. They do not define any Kaa applications—you have to configure them for a specific Kaa-based solution.

Default

kaa:
  epmx:
    ep-register:
      base-url: http://epr

nats:
  urls: nats://nats:4222

management:
  port: 8080
  security:
    enabled: false

endpoints:
  enabled: false
  health:
    enabled: true
    mapping.UNKNOWN: SERVICE_UNAVAILABLE
  info.enabled: true
  metrics.enabled: true