Configuration File
Edge uses a JSON configuration file. Pass the path as the first argument:Full Example
config.json
Configuration Reference
The edge is configured to work with a maximum of 8k policies. Please open an
issue on GitHub if more are
needed.
Server Settings
| Field | Type | Default | Description |
|---|---|---|---|
listen_address | string | "127.0.0.1" | IP address to bind to |
listen_port | number | 8080 | Port to listen on |
max_body_size | number | 1048576 | Maximum request body size in bytes (1MB default) |
log_level | string | "info" | Logging level: trace, debug, info, warn, err |
Upstream Settings
| Field | Type | Required | Description |
|---|---|---|---|
upstream_url | string | Yes | Default upstream destination (fallback when specific URLs not set) |
logs_url | string | No | Upstream destination for log endpoints (falls back to upstream_url) |
metrics_url | string | No | Upstream destination for metrics endpoints (falls back to upstream_url) |
Workspace Settings
| Field | Type | Required | Description |
|---|---|---|---|
workspace_id | string | No | Workspace identifier for policy sync |
Policy Providers
Thepolicy_providers array configures where Edge loads policies from.
File Provider
Loads policies from a local file and watches for changes.| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for this provider |
type | string | Yes | Must be "file" |
path | string | Yes | Path to the policy file |
HTTP Provider
Loads policies from an HTTP endpoint with periodic polling.| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for this provider |
type | string | Yes | Must be "http" |
url | string | Yes | URL to fetch policies from |
headers | array | No | HTTP headers to include in requests |
Policy File Format
Policies are defined in a JSON file:policies.json
Environment Variables
| Variable | Description |
|---|---|
TERO_LOG_LEVEL | Override the configured log level |