# Modality Configuration

A modality configuration file is a toml file with the name Modality.toml. It contains default information about the modalityd API location to be used by the modality CLI SDK, and for establishing connections between the modalityd daemon and the system under test for data recording sessions and control-plane operations like propagating scopes or introducing mutations.

A diagram of Modality's system under test (SUT) model, where components of any sort can integrate with Modality for observation and troubleshooting

# 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 of strings - Connection strings for modalityd’s collectors. The SUT should treat these as destinations to which they can send their log-reports or mutator-announcements.
    • Default: [“udp://127.0.0.1:2718”, “http://127.0.0.1:2719”]
    • Collector connection string variants:
      • UDP socket address with port: e.g. “udp://192.168.122.76:34355” (report messages should be sent here as UDP datagrams)
      • HTTP socket address with port: e.g. “http://192.168.122.76:34355” (report messages should be POST’d here as raw bytes)
  • control_connections - optional - array of strings - Connection strings for sending control messages (e.g. mutations) to the SUT from a locally-running modalityd.
    • Control connection string variants:
      • 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 POST’d as raw bytes)
      • HTTPS POST: e.g. “https://secure-http-address.com/maybe/with/a/path” (control messages POST’d as raw bytes)
  • user - optional - table - User identity information which will be associated with created entities, e.g. SUT, session, objective.
    • email - optional - string - User email address.

# Example Modality Configuration

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 = "auden@auxon.io" }

# Configuration File Locations

The modality CLI checks the following locations for modality configuration files, and any found files are read, with the last value found for any field taking precedence over values read earlier.