Elchi API Security: WAF and API protection at the edge.

Shield is an ext_proc sidecar next to each Envoy: authentication, rate limiting, bot defense, data-loss prevention and a WAF built on Coraza and the OWASP Core Rule Set, composed per route and rolled out from detect to block.

ELCHI API SECURITY · SHIELD

Add-on · Requires Elchi CoreAdd-on to Elchi Core. Deployed and configured centrally, enforced locally on every edge host — traffic never leaves the box.

  • 12 Security Engines
  • Built-in DLP
  • OWASP CRS WAF
  • Detect → Shadow → Block

What is Elchi API Security?

Elchi API Security is a web application firewall and API security layer for Envoy. Its engine, Shield (elchi-shield), runs as a sidecar process on every edge host and plugs into Envoy through the External Processing (ext_proc) HTTP filter. Envoy streams each request’s headers, and the body when a policy asks for it, to Shield over a local Unix domain socket, and Shield answers allow, block (403) or record-only before the request reaches your backend. A policy can combine 12 engines: JWT, JWKS, API keys, HMAC signing, RFC 9421 HTTP signatures, mTLS identity, IP reputation, rate limiting, bot detection, GraphQL limits, OpenAPI validation and Coraza with the OWASP Core Rule Set embedded in the binary. DLP runs alongside them as a built-in body check. Policies are written per host and route in the UI, delivered to the edges as files and hot-reloaded. Inspection happens on the edge host.

What Shield enforces

  • Authentication engines

    JWT and JWKS (remote keys refreshed in the background), API keys with SHA-256 hashing and scopes, HMAC request signing including RFC 9421, and mTLS client-certificate checks.

  • Rate limiting

    Token-bucket limits keyed by IP, host, or any header — requests per second plus burst, per route.

  • Bot & scanner defense

    Layered scoring over User-Agent heuristics, verified-crawler feeds, JA3/JA4 TLS fingerprints, and header-anomaly detection.

  • IP reputation & GeoIP

    Threat-intel feeds with severity, static CIDR allow/deny lists, and country or ASN blocking backed by GeoIP databases.

  • DLP & redaction

    Detects credit cards (Luhn-validated), SSNs, JWTs, cloud keys, and tokens in requests and responses — block the call or mask the data in place.

  • Built-in WAF

    Coraza with the OWASP Core Rule Set embedded in the Shield binary: paranoia levels 1–4, anomaly thresholds, and per-policy rule exclusions.

  • GraphQL & OpenAPI guard

    Depth, complexity, and introspection limits for GraphQL; positive-security validation against your OpenAPI spec.

  • Safe rollout

    Per-policy block / detect / shadow modes with fail-open or fail-close behavior, path excludes, and sampling.

  • Forensics & telemetry

    Redacted-by-construction audit events streamed to the platform's event store or to OpenTelemetry, a live event feed in the UI, and Prometheus metrics.

IN THE PRODUCT

Shield policies and security events in the UI

Every screen ships in light and dark — Elchi follows your system theme.
elchi.example.com / Shield Overview
Shield Overview — DarkShield Overview — Light

How does Shield sit in the request path?

Turning on API Security for a listener’s HTTP connection manager adds an ext_proc filter at the head of the HTTP filter chain, ahead of the router. One ext_proc stream carries one HTTP transaction. Shield resolves the most specific policy for the host and route, runs the cheap header checks and the header-phase engines (JWT, API key, rate limit, IP reputation, bot) first, and buffers the body only when an engine or check needs it: the WAF, DLP, GraphQL or OpenAPI body validation.

Verdicts combine as “most severe wins”. A block returns 403 to the client at once (429 for rate limits); everything else continues to the router.

What does Shield need to run?

A Linux edge host with Envoy. The elchi-client installer installs Shield in the same run as a hardened systemd service listening on /run/elchi-shield/extproc.sock; hosts that run Envoy without elchi-client can use the standalone Shield installer. Shield’s management endpoint is loopback-only, and non-loopback TCP binds are refused by default.

Security events go to the platform’s event store (ClickHouse) or to OpenTelemetry. Shield’s cost is set mostly by the ext_proc round trip and by body buffering, not by the engines, so the sizing guide recommends enabling body inspection only on the routes that need it.

What happens when the sidecar is down or an engine fails?

Two settings decide this. On the Envoy side, the ext_proc filter Elchi sets up for Shield has failure_mode_allow: true, so if the Shield process is down or the gRPC call fails, requests continue uninspected instead of failing. Set it to false only if you prefer an outage to unprotected traffic.

Inside Shield, each policy declares fail_open or fail_close for engine errors and timeouts, and the default when no policy matches is fail-open. A missing or invalid credential is a normal block in either posture. A panic inside an engine is recovered at the stream boundary, and an invalid configuration file is rejected while the last valid one stays active.

How do we tune the WAF without blocking real users?

Every policy has a mode: block, detect, shadow or off. Detect and shadow evaluate everything and record what would have been blocked without changing traffic, so a new policy can run against live requests first. The CRS paranoia level is set per policy from 1 to 4, and detection_paranoia_level runs stricter rules in record-only mode while blocking at the lower level. Noisy rules go into exclude_rule_ids.

The CRS version is compiled into the Shield binary. WAF Studio shows, for the version your edges run, which common legitimate requests each paranoia level blocks, measured with Shield’s own engine.

What are the limits of Shield?

Shield inspects HTTP traffic that passes through Envoy’s HTTP connection manager; listeners that only run a TCP proxy are not inspected. Body inspection is opt-in per policy and capped: a body over the cap, or one that cannot be decoded (Brotli or stacked encodings), is blocked rather than passed on uninspected. The CRS version changes only with a Shield binary upgrade. Elchi publishes no general latency figure for Shield; the sizing guide reports relative throughput measured on one machine and asks you to measure on your own hardware.

Elchi API Security video tutorials

Protect a running service with Elchi Shield: create a WAF policy with the OWASP Core Rule Set in block mode, switch API Security on for the service, and watch an attack get blocked with 403 while normal traffic keeps flowing — then inspect the event and the rules it matched.

Protect a running service with API keys in Elchi Shield: create a policy for the service, add the API Key protection, register a key for a partner app (only its SHA-256 hash is stored), and requests without a valid key get 403. Then bind a scope to a path, so only keys with the admin scope may call /admin/ — every refusal is in Security Events and the access log.

Verify JSON Web Tokens at the edge with Elchi Shield: upload the public key, require the issuer and RS256, and requests without a valid token get 403. A valid token can still read another user's data — fix that with object ownership, binding the token's subject to the user id in the path. Finally verify against a JWK Set file, so tokens signed by unknown keys are refused.

Control traffic with Elchi Shield on a live service: a per-client rate limit answers 429 with Retry-After, an IP deny list and a threat feed file block known bad addresses, and bot detection stops scanner user agents, bare scripts that lack browser headers and fake Googlebots — while real browsers pass. Every block is in Security Events and the access log.

Positive security with Elchi Shield: export the OpenAPI spec API Discovery learned from real traffic, upload it to the policy, and every request to a path the spec does not declare is refused at the edge. Then put GraphQL Guard on the /graphql route: introspection is blocked and queries deeper than the limit are refused before they reach the service.

Accept only signed requests at the edge with Elchi Shield: with HMAC signing the client signs method, path, a timestamp and a nonce with a shared secret — unsigned requests, replays of a captured request and old timestamps are all refused. Then the same idea with the standard RFC 9421 HTTP Message Signatures (Signature-Input and Signature headers).

All video tutorials

From discovery to enforcement

  1. Discover

    Import endpoints and risks straight from API Discovery.

  2. Compose

    Build policies per domain and route in the visual builder.

  3. Roll out

    Start in detect, verify in shadow, then switch to block.

  4. Watch

    Follow verdicts live in the security event feed.

Questions about Elchi API Security

Does traffic leave the host to be inspected?

No. Envoy and Shield talk over a local socket on the same host. Only redacted audit events and metrics leave the box.

Which CRS version does Shield run?

The one embedded in the Shield binary on each edge. Shield reports it in /configz and in the build_info metric, and WAF Studio pins its rule library to the version your edges run.

Can different routes have different rules?

Yes. Policies match by host (exact, wildcard, default) and by route (exact path, regex, longest prefix), so a payments API can run a stricter paranoia level than the rest and a health check can skip inspection.

Talk to us about a demo.

Tell us how many Envoy hosts you run, which Envoy versions, and which add-ons you are evaluating. We reply with a demo or a proof-of-concept plan for your setup. To try it yourself first, the quickstart installs the free tier.