Modality Configuration File

# Summary

A Modality configuration file is a TOML file with the name Modality.toml that specifies:

  • The Modality daemon's API location to be used by the Modality Command Line Client.

  • Connections between the modalityd daemon and the system under test for data recording sessions and control-plane operations like propagating scopes or introducing mutations.

  • User-specific details like email address and license key.

# Creating and Editing Modality Configuration Files

Modality configuration files can be created and updated in two ways:

  1. Using the modality config command.

  2. Directly, by creating and editing a text file named Modality.toml in one of the Modality configuration file locations.

# Modality Configuration File Fields

modalityd
Optional
string
URL for modalityd’s user-facing HTTP API.
Default: “http://localhost:14181/v1/”
Resolved by first checking the MODALITY_URL environment variable, then the Modality.toml configuration files.
collector_connections
Optional
array
Optional array of strings. Connection strings for modalityd’s collectors. The SUT should treat these as destinations to which it can send reports and mutator announcements.
Default: [“udp://127.0.0.1:2718”, “http://127.0.0.1:2719”]
For UDP socket addresses with port (e.g. “udp://192.168.122.76:34355”) report messages should be sent as UDP datagrams.
For HTTP socket addresses with port (e.g. “http://192.168.122.76:34355”) report messages should be POSTed as raw bytes.
control_connections
Optional
array
Optional array of strings. Connection strings for sending control messages (for mutations and scopes) to the SUT from modalityd.
UDP socket address with port: e.g. “udp://192.168.122.76:34355” (control messages sent here as UDP datagrams)
HTTP POST: e.g. “http://regular-http-address.com/maybe/with/a/path” (control messages POSTed as raw bytes)
HTTPS POST: e.g. “https://secure-http-address.com/maybe/with/a/path” (control messages POSTed as raw bytes)
user
Optional
table
User identity information which will be used for license verification and associated with created entities, such as SUTs, sessions, and objectives. Includes email and license_key.
  • email
    Optional
    string
    User email address. Optional but necessary in conjunction with license_key for access to the full suite of Modality functionality.
  • license_key
    Optional
    string
    License key for access to Modality's functionality. A license key is required to be found somewhere in the hierarchy of Modality.toml files for any Modality functionality to be enabled.

Example Modality Configuration File

# Modality.toml

modalityd = "http://localhost:14181/v1/"

collector_connections = [
    "udp://192.168.122.76:34333",
    "http://192.168.122.76:34444"
]

control_connections = [
    "udp://192.168.122.76:34555",
    "http://regular-http-address.com/path"
]

[user] 
email = 'example@auxon.io'
license_key = '000000-000000-000000-000000-000000-V3'

# Modality Configuration File Locations

The Modality Command Line Client checks the following locations in order for Modality configuration files. The Command Line Client will read any configuration files it finds, with the last value found for any field taking precedence over values read earlier.

  1. <config-dir>/Modality.toml

  2. The current working directory.

  3. At a file path contained in the environment variable MODALITY_CONFIG.