Beelzebub
Reference

Service Configuration

Reference for core and per-service YAML fields in API version v1.

Beelzebub reads one core YAML file and either a directory of service YAML files or the BEELZEBUB_SERVICES_CONFIG JSON array. Unknown service keys are rejected. Environment variables override non-empty core values after YAML parsing.

Core Configuration

All core settings are nested below core.

YAML pathTypeRepository defaultPurpose
logging.debugbooleanfalseEnable debug-level runtime logging
logging.debugReportCallerbooleanfalseAdd the source caller to log records
logging.logDisableTimestampbooleantrueRemove timestamps from log output
logging.logsPathstring./logsDirectory for log files
tracings.rabbit-mq.enabledbooleanfalsePublish tracing events to RabbitMQ
tracings.rabbit-mq.uristringemptyAMQP connection URI
prometheus.pathstring/metricsHTTP path for metrics
prometheus.portstring:2112Metrics listen address
beelzebub-cloud.enabledbooleanfalseEnable Beelzebub Cloud reporting
beelzebub-cloud.uristringemptyCloud endpoint
beelzebub-cloud.auth-tokenstringemptyCloud credential; prefer an environment secret

Service Fields

FieldTypeRequiredNotes
apiVersionstringyesMust be v1
protocolstringyeshttp, ssh, tcp, telnet, or mcp
addressstringyeshost:port, :port, bracketed IPv6, or a Unix socket path
descriptionstringnoHuman-readable service label
commandscommand arrayby protocolOrdered match rules; maximum 1,000
fallbackCommandcommandnoResponse for unmatched input
toolstool arrayMCP onlyMCP tool definitions; maximum 1,000
serverNamestringnoHostname or product name exposed to clients
serverVersionstringnoProtocol banner/version string
bannerstringnoInitial TCP data or HTTP greeting content
deadlineTimeoutSecondsintegernoConnection deadline for SSH, TCP, and Telnet; zero semantics differ by protocol
maxHistoryintegernoTCP history entries retained per service and source; 0 uses 20; maximum 1,000
wireEncodingstringTCP onlyutf8 or latin1; Latin-1 maps one code point to one byte and requires framing
framingframing objectbinary TCPInitial application-message boundary for the TCP stream
wirePluginsstring arrayTCP onlyUp to 32 registered wire-plugin names, run in declaration order
passwordRegexstringSSH/TelnetGo regular expression used to accept credentials
trustedProxiesstring arraynoHTTP proxy IPs or CIDRs allowed to supply forwarded addresses
tlsCertPathstringpairedCertificate path; requires tlsKeyPath
tlsKeyPathstringpairedPrivate-key path; requires tlsCertPath
pluginobjectplugin-dependentShared LLM, validation, and rate-limit settings

Commands and Fallbacks

Commands use regex to match input and may return a static handler or invoke a named plugin. The first matching command wins.

FieldTypePurpose
regexstringGo regular expression; required for entries in commands
handlerstringStatic response body
pluginstringBuilt-in or compiled plugin name
namestringOptional display name
methodsstring arrayHTTP methods; duplicates and empty values are rejected
headersstring arrayHTTP Name: value response headers
statusCodeintegerHTTP status from 100 through 599
closeAfterbooleanTCP: close the connection after writing this response
tlsUpgradebooleanTCP: perform a server-side TLS upgrade after writing this response
tlsFramingframing objectTCP: framing to use after a successful TLS upgrade; requires tlsUpgrade
nextFramingframing objectTCP: replace framing after this exchange while retaining pipelined bytes
binaryOutputbooleanTCP command-plugin output is mapped to raw bytes through Latin-1
patchespatch arrayTCP response transformations applied before wire plugins

fallbackCommand has the same shape, but its regex is optional because it is selected when no earlier command matches. A command with neither a handler nor a plugin is accepted with a quality warning.

Binary TCP Fields

Framing operates on the TCP byte stream before regex matching. A single frame is limited to 1 MiB.

Framing FieldTypeUsed ByMeaning
modestringalllength-prefix (also the empty default), varint-length-prefix, ber, or fixed
lengthOffsetintegerlength modesZero-based byte offset of the length field
lengthSizeintegerlength-prefixFixed length-field width from 1 through 8 bytes
headerSizeintegerlength-prefixBytes added when the encoded length excludes the header
bigEndianbooleanlength-prefixRead the fixed-width length in big-endian rather than little-endian order
lengthIncludesHeaderbooleanlength-prefixTreat the encoded value as total frame size
fixedSizeintegerfixedExact frame size from 1 byte through 1 MiB
maxLengthBytesintegervarint-length-prefixMaximum base-128 length-field width from 1 through 8 bytes

ber reads one definite-length, top-level TLV and rejects indefinite lengths. varint-length-prefix treats bytes before lengthOffset and the complete varint as the header; the decoded value is the payload length that follows.

Generic patches support random, which requires offset and a positive length, and filetime, which writes an 8-byte little-endian Windows FILETIME at offset. Unknown patch types may be interpreted by a configured WirePlugin.

See the binary TCP framework for execution order, transitions, TLS behavior, and complete examples.

MCP Tools

MCP tools require a non-empty name. They may include description, a static handler, and params, where every parameter requires a non-empty name and may include a description. Optional annotations support title, readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. MCP requires tools and disallows commands; other protocols disallow tools.

Plugin Settings

FieldTypeNotes
llmProviderstringopenai or ollama; required with an LLM command
llmModelstringNon-empty model name required with an LLM command
hoststringProvider endpoint, commonly used for Ollama
promptstringSystem behavior for generated responses
openAISecretKeystringCompatibility field; use OPEN_AI_SECRET_KEY instead
inputValidationEnabled / outputValidationEnabledbooleanEnable the corresponding LLM safety check
inputValidationPrompt / outputValidationPromptstringPrompt used by the corresponding safety check
rateLimitEnabledbooleanEnable per-client request limiting
rateLimitRequestsintegerMust be greater than zero when limiting is enabled
rateLimitWindowSecondsintegerMust be greater than zero when limiting is enabled

LLMHoneypot requires the LLM provider and model. MazeHoneypot is restricted to HTTP.

The authoritative structural contracts are available as runtime schemas, and the cross-field rules are described in configuration validation.