Skip to content

Routewarden CLI (rwarden) ​

rwarden is the official developer CLI, policy compiler, configuration validator, and real-time observability dashboard for the Routewarden security suite.

It enables security and platform teams to evaluate path rules offline, validate configurations against official JSON schemas, compile universal policies for Traefik, Caddy, NGINX, and TCP Warden, and spin up an embedded web dashboard with zero runtime dependencies.


Key Features ​

  • Offline Path & Anti-Evasion Simulator (test): Simulate full multi-layer URL decoding, query parameter inspection, backslash normalization, semicolon parameter stripping, and IP allowlist evaluation without running any reverse proxy.
  • Strict Schema & Syntax Validation (validate): Validate routewarden.json (HTTP gateways) and tcp-warden.yaml (L4 daemon) against their formal JSON schemas with clear diagnostics for syntax errors, regex mistakes, and invalid CIDR notations.
  • Multi-Target Policy Generator (generate): Compile a single, universal routewarden.json security policy into target-specific configurations:
    • Traefik Dynamic Configuration (YAML and TOML)
    • Traefik Docker Compose Labels
    • Caddyfile directive blocks
    • NGINX / OpenResty Lua initialization tables
    • TCP Warden YAML configuration
  • Ephemeral Gateway Sandbox (sandbox): Launch isolated, pre-configured Traefik, Caddy, or NGINX containers in Docker to verify your rules and response modes live against automated attack test suites.
  • Real-Time Security Dashboard (dashboard): Turnkey, ultra-lightweight real-time security dashboard powered by Routewarden's embedded SOC engine and SQLite persistence (~8MB RAM). Auto-discovers containers labeled routewarden=true, multiplexes logs live, and serves a streaming web UI at http://localhost:7890.
  • Distributed Remote Log Shipping (push, keys, register): CrowdSec-style distributed log shipping with end-to-end asymmetric encryption (X25519 ECDH + AES-256-GCM), 2,000-event in-memory ring buffers, zero edge disk writes, and central dashboard ingestion.
  • Official JSON Schema Export (schema): Export official JSON Schemas for instant IDE autocomplete (VS Code, JetBrains, Neovim) and CI/CD automated linting.

Quick Start ​

1. Install rwarden ​

Install the official pre-compiled CLI binary for macOS or Linux, or run without installation via Docker:

# Homebrew (macOS)brew install routewarden/tap/rwarden# Or automated installer:curl -fsSL https://routewarden.github.io/install.sh | bash# Verify installationrwarden version

📖 Complete Installation Guide: Need .deb, .rpm, .apk package managers, standalone binary downloads for Linux/macOS/Windows, or source builds? See the CLI Installation Guide.

2. Test a Sensitive Path ​

Simulate candidate path extraction and anti-evasion matching on an encoded exploit string:

rwarden test "/static/%252e%252e/.env"

Output:

Simulation Outputplaintext
🔍 Testing: GET /static/%252e%252e/.env  Candidate paths extracted (2):    - /static/%252e%252e/.env    - /.envResult: 🛑 BLOCKED (HTTP Status 403)  Reason:  block_pattern_match  Target:  /.env  Pattern: (?i)\.env

3. Validate Policy Offline ​

Verify your policy before committing or deploying:

rwarden validate routewarden.json

4. Launch the Security Dashboard ​

Start the live security dashboard with automated gateway container log discovery:

# Launch real-time SOC security dashboard (opens http://localhost:7890)rwarden dashboard# Or export standalone compose filesrwarden dashboard export ./dashboard

Open http://localhost:7890 to observe live blocked probes, attack analytics, and threat intelligence.

5. Stream Logs from Remote Edge Nodes ​

Connect distributed reverse proxies and servers to your central dashboard with asymmetric end-to-end encryption:

Remote Streamingbash
# 1. On Central Server: Create an enrollment keyrwarden keys create edge-gateway-01# 2. On Remote Server: Register once with the central dashboardrwarden register --url http://198.51.100.10:7890 --key rw_sec_8f9a2b4c1e0d...# 3. On Remote Server: Stream encrypted logs (reads ~/.routewarden/agent.json)rwarden push

The central dashboard will automatically display remote agents in its live status ribbon with real-time event counters and health pings.


Documentation Sections ​

SectionDescription
InstallationInstall script, pre-built binary archives, Docker container, and source build
Commands ReferenceComplete CLI syntax and options for test, validate, schema, generate, sandbox, dashboard, keys, register, and push
Security DashboardLive event streaming, Docker discovery, analytics, IP threat scoring, and REST API
Distributed Remote StreamingMulti-node log shipping with X25519 asymmetric encryption and in-memory ring buffer
JSON Schema & CI/CDIDE integration (VS Code, JetBrains, Neovim), routewarden.json workflows, and CI/CD pipelines
Changelog & ReleasesRelease notes and version history for rwarden

Released under the MIT License.