Files
fips/examples/docker-network/configs/topologies/mesh-public.yaml
T
Johnathan Corgan a50473fe9f Improve Docker mesh setup: data-driven topologies, identity derivation, services
Config system overhaul:
- Add mesh-public topology (5 Docker nodes + external pub node at 217.77.8.91)
- Refactor generate-configs.sh to read topology YAML files directly,
  replacing hardcoded lookup functions, with multi-char node ID support
- Generate npubs.env with all node npubs; sourced by test scripts and
  injected into containers via docker-compose env_file directive
- Add .env with COMPOSE_PROFILES=mesh so docker compose defaults to
  mesh topology without requiring --profile

Deterministic mesh identity derivation:
- Add derive-keys.py: pure Python tool (no deps) deriving nsec/npub
  from sha256(mesh-name|node-id) via secp256k1 and BIP-173 bech32
- generate-configs.sh and build.sh accept optional mesh-name argument;
  Docker node identities are derived while external nodes keep
  hardcoded keys from topology YAML

Docker compose improvements:
- Add mesh-public profile service definitions
- build.sh now runs docker compose build automatically, providing a
  single command for the full binary+configs+images pipeline
- Ping test script supports mesh-public topology

Container services:
- Add HTTP server on port 8000 (IPv6-bound) serving static page,
  accessible over FIPS overlay via npub.fips hostnames
- Add rsync to container packages

Documentation:
- Comprehensive README update covering topology system, identity
  derivation, npubs.env, and container background services (SSH,
  iperf3, HTTP) with usage examples
2026-02-18 13:20:03 +00:00

53 lines
1.8 KiB
YAML

# Mesh Topology Definition
#
# Five nodes with 6 bidirectional UDP links forming a sparse, fully connected
# graph. Not all nodes are direct peers — non-adjacent pairs require
# discovery-driven multi-hop routing to establish end-to-end sessions.
nodes:
a:
nsec: "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"
npub: "npub1sjlh2c3x9w7kjsqg2ay080n2lff2uvt325vpan33ke34rn8l5jcqawh57m"
docker_ip: "172.20.0.10"
peers: [d, e, pub]
b:
nsec: "b102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fb0"
npub: "npub1tdwa4vjrjl33pcjdpf2t4p027nl86xrx24g4d3avg4vwvayr3g8qhd84le"
docker_ip: "172.20.0.11"
peers: [c, pub]
c:
nsec: "c102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fc0"
npub: "npub1cld9yay0u24davpu6c35l4vldrhzvaq66pcqtg9a0j2cnjrn9rtsxx2pe6"
docker_ip: "172.20.0.12"
peers: [b, d, e, pub]
d:
nsec: "d102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fd0"
npub: "npub1n9lpnv0592cc2ps6nm0ca3qls642vx7yjsv35rkxqzj2vgds52sqgpverl"
docker_ip: "172.20.0.13"
peers: [a, c, e]
e:
nsec: "e102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fe0"
npub: "npub1wf8akf8lu2zdkjkmwhl75pqvven654mpv4sz2x2tprl5265mgrzq8nhak4"
docker_ip: "172.20.0.14"
peers: [a, c, d]
# External/public node (not a Docker container)
pub:
nsec: "f102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1ff0"
npub: "npub13fhtmrk6f556acrjfkwrt37ppyhr5wcy89nhkcav9vcy27z5uygsd27sc3"
external_ip: "217.77.8.91"
peers: [a, b, c]
# Spanning Tree Structure (rooted at node A):
# - A — D (tree edge, D's parent is A)
# - A — E (tree edge, E's parent is A)
# - C — D (tree edge, C's parent is D)
# - B — C (tree edge, B's parent is C)
# - D — E (non-tree link)
# - C — E (non-tree link)