Configuration

AegisGate is configured via a single YAML file. You can generate one automatically with the setup wizard, use a deploy profile preset, or write one manually.

Configuration Precedence

Settings are applied in this order (highest to lowest):

  1. CLI flags (e.g., --proxy-port 9090)
  2. Environment variables (e.g., AEGISGATE_PROXY_BIND_ADDRESS)
  3. Config file (YAML, specified with --config)
  4. Deploy profile (preset, specified with --profile)
  5. Built-in defaults (DefaultConfig())

Quick Start: Generate a Config

# Auto-detect environment and generate config
./aegisgate-platform setup --non-interactive

# Or use a specific profile
./aegisgate-platform setup --profile production --output /etc/aegisgate/config.yaml

# Validate before deploying
./aegisgate-platform config validate aegisgate-platform.yaml

YAML Config Structure

The config file has these top-level sections:

platform:       # Platform mode and shutdown timeout
proxy:          # Proxy server (bind address, upstream URL, rate limits)
agent:          # MCP/agent server settings
dashboard:      # Web dashboard
tls:            # TLS certificates, mTLS, FIPS
security:       # Security middleware (headers, CSRF, XSS, ML detection)
logging:        # Log level and format
a2a:            # Agent-to-Agent guardrails
acp:            # Agent Communication Protocol
trust:          # Trust Framework (Professional+)
persistence:    # Audit log storage
siem:           # SIEM integration (Professional+)
soar:           # SOAR integration (Professional+)

Full Example (Production Profile)

platform:
  mode: standalone          # "standalone" (embedded MCP) or "connected"
  shutdown_timeout: 30s

proxy:
  bind_address: "0.0.0.0:8080"
  upstream: "https://api.openai.com"
  rate_limit: 1000          # requests per minute (0 = unlimited)

agent:
  server:
    port: 8081
  rate_limit:
    enabled: true
    requests_per_minute: 500

dashboard:
  enabled: true
  bind_addr: "0.0.0.0"
  port: 8443
  ui_dir: "ui/frontend"

tls:
  enabled: true
  cert_file: "/data/certs/cert.pem"
  key_file: "/data/certs/key.pem"
  auto_generate: false       # Set true for self-signed certs
  min_version: "1.3"         # "1.2" or "1.3"
  mutual_tls:
    enabled: false
    mode: "optional"         # "optional" or "required"
    client_ca_file: ""
  fips:
    enabled: false
    level: "140-2"           # "140-2" or "140-3"

security:
  enable_security_headers: true
  enable_csrf: true
  enable_xss: true
  enable_panic_recovery: true
  enable_audit_middleware: true
  allowed_origins: ["https://yourdomain.com"]
  allowed_methods: ["GET", "POST", "PUT", "DELETE"]
  allowed_headers: ["Content-Type", "Authorization"]
  ml_threat_detection_enabled: false  # Enable after 7-day shadow validation
  ml_shadow_mode: true                # Log only, don't block

logging:
  level: "info"              # debug, info, warn, error
  format: "json"            # json or text

a2a:
  enabled: false
  config_file: "configs/a2a.yaml"

acp:
  enabled: false
  config_file: "configs/acp.yaml"

trust:
  enabled: false
  require_license: true      # Professional+ tier required

persistence:
  enabled: true
  data_dir: "/data"
  audit_dir: "/data/audit"
  prune_interval: 24h
  max_file_size: 52428800    # 50 MB per audit file

siem:
  enabled: false
  poll_interval: 5s
  batch_size: 100
  source: "aegisgate"
  buffer_max_size: 10000
  platforms:
    - platform: "splunk"
      enabled: true
      format: "cef"
      endpoint: "https://splunk.yourorg.com:8088/services/collector"
      auth:
        type: "api_key"
        api_key: "your-hec-token"

soar:
  enabled: false
  source: "aegisgate"
  max_retries: 3
  retry_interval: 30s
  platforms:
    - platform: "pagerduty"
      enabled: true
      endpoint: "https://events.pagerduty.com/v2/enqueue"

Section Reference

Platform

FieldTypeDefaultDescription
modestringstandalonestandalone (embedded MCP) or connected (external scanner)
shutdown_timeoutduration30sGrace period for in-flight requests during shutdown

Proxy

FieldTypeDefaultDescription
bind_addressstring0.0.0.0:8080Address the proxy listens on
upstreamstring(required)Target AI service URL (e.g., https://api.openai.com)
rate_limitint1000Requests per minute (0 = unlimited, negative = error)

Dashboard

FieldTypeDefaultDescription
enabledbooltrueEnable the web dashboard
bind_addrstring0.0.0.0Dashboard bind address
portint8443Dashboard port (must differ from proxy and MCP)
ui_dirstringui/frontendPath to frontend assets

TLS

FieldTypeDefaultDescription
enabledboolfalseEnable TLS for all listeners
cert_filestring(empty)Path to TLS certificate (required if auto_generate: false)
key_filestring(empty)Path to TLS private key (required if auto_generate: false)
auto_generateboolfalseAuto-generate self-signed certs on first start
min_versionstring1.3Minimum TLS version: 1.2 or 1.3
mutual_tls.enabledboolfalseEnable mutual TLS
mutual_tls.modestringoptionaloptional or required
fips.enabledboolfalseEnable FIPS mode
fips.levelstring140-2140-2 or 140-3

Security

FieldTypeDefaultDescription
enable_security_headersbooltrueCSP, HSTS, CORP, COEP, COOP headers
enable_csrfboolfalseCSRF token validation
enable_xssbooltrueXSS content scanning
enable_panic_recoverybooltrueRecover from panics without crashing
enable_audit_middlewarebooltrueLog all requests/responses to audit trail
ml_threat_detection_enabledboolfalseEnable ML threat detector (shadow mode first!)
ml_shadow_modebooltrueLog ML predictions without blocking

Logging

FieldTypeDefaultDescription
levelstringinfodebug, info, warn, error
formatstringjsonjson or text

Persistence

FieldTypeDefaultDescription
enabledbooltrueEnable persistent audit log storage
data_dirstring/dataRoot data directory
audit_dirstring/data/auditAudit log directory
prune_intervalduration24hHow often to prune old audit files
max_file_sizeint6452428800Max audit file size (50 MB)

SIEM (Professional+)

FieldTypeDefaultDescription
enabledboolfalseEnable SIEM event forwarding
poll_intervalduration5sHow often to poll the audit ring buffer
batch_sizeint100Max events per poll cycle
sourcestringaegisgateSource field on SIEM events
buffer_max_sizeint10000Internal SIEM buffer size

Supported SIEM platforms: Splunk, Elasticsearch, QRadar, Sentinel, Sumo Logic, LogRhythm, CloudWatch, Security Hub, ArcSight, syslog, custom.

SOAR (Professional+)

FieldTypeDefaultDescription
enabledboolfalseEnable SOAR incident forwarding
max_retriesint3Retry attempts for failed deliveries
retry_intervalduration30sDelay between retries

Supported SOAR platforms: PagerDuty, Jira, ServiceNow, custom webhook.


Environment Variable Overrides

Key settings can be overridden via environment variables without editing the config file:

VariableOverridesExample
AEGISGATE_PLATFORM_MODEplatform.modeconnected
AEGISGATE_PROXY_BIND_ADDRESSproxy.bind_address0.0.0.0:9090
AEGISGATE_RATE_LIMITproxy.rate_limit2000
AEGISGATE_LICENSE_KEYLicense key (CLI flag)your-license-key

Environment variables take precedence over the config file but not over CLI flags.


Deploy Profiles

Instead of writing a config file from scratch, use a deploy profile preset:

ProfileTLSRate LimitPersistenceUse Case
quickstartOff60 RPMIn-memoryEvaluation, demos
small-teamAuto-gen300 RPMFile-backed5-50 users
production1.3 (bring certs)1,000 RPMFile-backedProduction
high-securitymTLS required5,000 RPMFile-backed + FIPSRegulated industries
air-gapped1.3 (bring certs)1,000 RPMFile-backedIsolated networks

See Deploy Profiles for detailed comparison.


Config Validation

Validate a config file before deploying:

./aegisgate-platform config validate aegisgate-platform.yaml

Checks performed:

  • Port conflicts (proxy, MCP, dashboard must be distinct)
  • Required fields (bind address, upstream URL, data directory)
  • TLS cert file paths exist (when auto_generate: false)
  • Valid TLS version (1.2 or 1.3)
  • Valid mTLS mode (optional or required)
  • Valid FIPS level (140-2 or 140-3)
  • Valid log level and format
  • Positive rate limits
  • SIEM platforms have endpoints
  • ML detection with shadow mode warning
  • A2A/ACP config file existence
  • Trust framework license requirement warning

Show Effective Config

# Show as YAML
./aegisgate-platform config show aegisgate-platform.yaml

# Show as JSON
./aegisgate-platform config show --format json

Next Steps