COLLEGE PROJECT ยท 2024

SDN controller

Zero-trust, intent-based network security for Kubernetes workloads. Eight services run in Docker Compose.

  • Plain code
  • A model
  • A check
  • An outside part
  • One request
  1. One source of truth

    A FastAPI policy API is the source of truth. Pydantic validates policies and PostgreSQL stores them.

  2. Two controllers, one master

    Two Ryu OpenFlow controllers run as a high-availability pair. ZooKeeper leader election picks one master.

  3. Watch, then reconcile

    Watchers follow Kubernetes pod events and database policy changes. The controller reconciles flows.

  4. Block rules, marked by a cookie

    DROP rules go between source and destination sets. A cookie purges them without touching baseline flows.

  5. A closed loop

    An IsolationForest model flags anomalies on synthetic traffic and posts a block policy to the API.

SETTING
College project, 2024
STACK
Python, FastAPI, PostgreSQL, Ryu, ZooKeeper, scikit-learn
OBSERVABILITY
Prometheus, Grafana, an sFlow packet counter

KEY

  • Plain code
  • A model
  • A check
  • An outside part
  • One request

Only one tower is filled in, because only one controller is master at a time.