Proxy, as the ingress controllerT1190

Protect Kubernetes services at the ingress

When your services already sit behind Ingress objects, make Synapse the ingress controller. The operator turns Ingress and Gateway API resources into Synapse's routes and hot-reloads them; the smart firewall, WAF and IDS then run on the same path as every route, with no sidecar and no second hop.

Overview

An ingress controller is already the one place every external request passes. Making it Synapse means the protection runs where the routing does, instead of in a second proxy behind it.

In ingress mode the operator reconciles Ingress and Gateway API resources into Synapse's upstream configuration and triggers a hot reload, with no proxy restart and no dropped connections. Security policy stays in Synapse's own configuration, so it applies to every route at once.

When you see this

  1. Your services are exposed through Ingress objects today.
  2. You run a WAF as a second hop behind the ingress controller.
  3. You want one policy across every route rather than per-service settings.

Steps

  1. 01

    Deploy the controller

    The stack chart stands up a separate operator in ingress mode. Setting proxy.synapse.upstreams to empty is not optional: it stops Helm's merge from overwriting the operator's routes on the next upgrade. This needs synapse-stack 0.6.0 or newer.

    synapse-stack values
    operator:
      ingress:
        enabled: true
        ingressClass: synapse
        upstreamsOutConfigMap: "synapse-os/synapse-proxy"
    
    proxy:
      synapse:
        upstreams: ""
  2. 02

    Create the IngressClass

    Annotate it as the default class if class-less Ingresses should use Synapse too.

    IngressClass
    apiVersion: networking.k8s.io/v1
    kind: IngressClass
    metadata:
      name: synapse
    spec:
      controller: gen0sec.com/synapse
  3. 03

    Route with Ingress

    Synapse routes on host and longest-prefix path. Exact path types and HTTPRoute header, method and query matches are approximated or ignored, and the controller says so with a warning and a Kubernetes event.

    Ingress
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: app
    spec:
      ingressClassName: synapse
      rules:
        - host: app.example.com
          http:
            paths:
              - path: /
                pathType: Prefix
                backend:
                  service:
                    name: app
                    port:
                      number: 80
  4. 04

    Turn on the IDS for every route

    Firewall, WAF, IDS and rate limits are Synapse configuration, not Ingress annotations. The IDS inspects decrypted HTTP on the ingress path, so it sees real requests even for HTTPS that Synapse terminates.

    Synapse config
    ids:
      enabled: true
      rule_paths:
        - /etc/synapse/rules/emerging-all.rules
      address_vars: { HOME_NET: "10.0.0.0/8" }
      enforce_block: false
      post_tls:
        mode: offload
        socket: /run/synapse/ids.sock
    DecisionDoes the proxy run more than one replica?

    Yes Use post_tls.mode offload: the ruleset then costs one copy per node, not one per replica.

    No inline is the simplest.

  5. 05

    Check the version caveat

    On Synapse 0.8.9 with the published charts' operator 0.1.x, an Ingress with sticky-sessions makes the routes file refuse to load, and HTTPS back-ends must present a certificate the system trust store accepts. If you rely on either, keep proxy.image.tag at 0.8.8 for now.

Common mistakes

  1. Leaving proxy.synapse.upstreams set, so the next helm upgrade overwrites the operator's routes.
  2. Looking for WAF or IDS settings in Ingress annotations. They are Synapse configuration.
  3. Running inline IDS across many proxy replicas, each holding the whole ruleset.

Escalate when

  • The controller warns that a route's match was approximated: check that route does what you meant.

Where this stops working

  • Routing is first-writer-wins on a host and path conflict.
  • Only traffic through the ingress is protected. Services reached another way bypass it.
Run it here

Send the request. Watch where it stops.

Edit the request or any rule and the pipeline runs again. The rules are real wirefilter expressions, evaluated the way the agent evaluates them; the traffic and model scores are samples. It all runs in your browser.

Try this Every route the controller programs runs through this pipeline. Set ip.src to 192.0.2.10 and move the allow above the block: the WAF rules apply to all routes at once.

The request

ingress · proxy mode

Every value is a rule field. Change one and the pipeline re-runs.

Connection
Source, resolved by the platform
Fingerprints, from Dendrite
HTTP, readable in proxy mode
Model scores, sample output from Cortex
Flow behaviour, per source
Payload, what Thalamus inspects
Result Refused with 403
ResultRefused with 403Proxy · WAF
  1. 01Capture and fingerprintDendrite · On the wireObserved

    Computed JA4, JA4T, JA4H for this connection. Capture only: Dendrite never blocks.

  2. 02Access rulesHillock · XDP hook, before routingPassed

    198.51.100.200 (NL, AS64503) is on no access list.

    From the threat feed: known-bad sourcesNo match
    Country, resolved to IP ranges on the platform sideNo match
  3. 03Firewall rulesHillock · TC hook, in the kernelNot used

    No firewall rules in this policy.

  4. 04Intrusion detectionThalamus · On the hostNot used

    No signatures loaded for this scenario.

  5. 05Behavioural modelsCortex · On the host CPUObserved

    Sample scores, 0 to 100: C2 2, scan 3, malicious flow 4. Nothing leaves the machine to be scored.

  6. 06Service graphHippocampus · On the hostNot used

    No workload identity on this flow.

  7. 07Smart firewall rulesAmygdala · Decided on the host, enforced in nftablesNot used

    No smart firewall rules in this policy.

  8. 08WAF rulesProxy · In the proxy, after decryptionRefused

    Refused with 403. The application never sees the request.

    Matched
    Not reached
  9. 09Content scanningProxy · ClamAV, before forwardingNot reached

    No WAF rule selected this request for scanning, so nothing was scanned.

Field names and operators follow the docs: WAF and Smart Firewall. A rule that names an unknown field does not load; a field the request does not carry never matches.

What lands in the event log
{
  "ts": "2026-11-17T09:41:07.212Z",
  "layer": "waf",
  "action": "block",
  "source": "waf",
  "rule_id": "w7",
  "src_ip": "198.51.100.200",
  "src_port": 54321,
  "dst_ip": "198.51.100.10",
  "dst_port": 443,
  "src_country": "NL",
  "fingerprints": {
    "ja4t": "64240_2-4-8-1-3_1460_10",
    "ja4": "t13d1516h2_8daaf6152771_02713d6af862"
  }
}

Shaped like the documented event schema; the timestamp, ports, rule ids and ban duration are illustrative.

Now on your own traffic.

A demo runs the same pipeline against real packets, with the engineers who built it.