How mikroHUB protects your network infrastructure
Document version: 2026-03-22 · Questions: [email protected]
INTERNET
┌────────────────────┬──────────────────────┐
│ HTTPS/443 │ WSS/443 │ WG/UDP 51820
│ (TLS 1.2+) │ (WebSocket) │ (WireGuard)
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ NGINX REVERSE PROXY (mikrohub.io) │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────────────┐ │
│ │ Let's Encrypt │ │ HSTS Preload │ │ CSP + Security Headers │ │
│ │ ECDSA cert │ │ max-age=2yr │ │ X-Frame, X-Content │ │
│ └──────────────┘ └──────────────┘ └────────────────────────┘ │
│ Ports open : 80 (→301), 443, 51820/UDP │
│ Ports BLOCKED: 3001 (API), 6379 (Redis) │
└──────────┬──────────────────────┬───────────────────┬───────────┘
│ :3001 │ :3001/ws │ :51820
▼ ▼ ▼
┌──────────────────┐ ┌──────────────┐ ┌──────────────────────────┐
│ EXPRESS API │ │ WebSocket │ │ WireGuard (wg0) │
│ (Node.js) │ │ Server │ │ 10.99.0.1/16 │
│ │ │ One-time │ │ Per-device /32 peer │
│ JWT validation │ │ ticket auth │ │ No split tunnel │
│ 60s session cache│ │ (no JWT │ │ │
│ 1h max token age │ │ in URL) │ │ Devices: 10.99.x.y │
└────────┬─────────┘ └──────────────┘ └──────────────────────────┘
│
┌─────┴──────┐
▼ ▼
┌────────┐ ┌────────┐
│Supabase│ │ Redis │
│Postgres│ │ TLS │
│(cloud) │ │(local) │
│RLS on │ │ Auth │
│all tbl │ │ reqd │
└────────┘ └────────┘All external traffic terminates at Nginx with TLS 1.2+. Internal services (API port 3001, Redis port 6379) are blocked at the firewall level and never exposed to the internet.
| Layer | Mechanism |
|---|---|
User AuthPKCE | Supabase Auth with PKCE flow (not implicit) |
Token StorageCOOKIE | Secure + SameSite=Lax cookies (not localStorage) |
Token LifetimeTTL | 1 hour max, 60s cache, forced refresh |
Session RevocationREVOKE | In-memory invalidation + token blacklist |
WebSocket AuthTICKET | One-time ticket exchange (JWT never in URL) |
API Key AuthSHA-256 | SHA-256 hashed, scoped per-resource, expiry enforced |
Device Agent AuthAGENT | SHA-256 hashed token, rate-limited (2 req/30s) |
MFAMFA | TOTP (authenticator app) + WebAuthn/FIDO2 (passkeys, YubiKey) |
AES-256-GCM with random IV per entry, auth tag validated
Stored as iv:tag:ciphertext in Supabase (never plaintext)
Decrypted only at poll time, in-memory, never logged
RouterOS API-SSL with TLS encrypted connection
Direct TLS connection via API-SSL (port 8729). Full management access.
Encrypted tunnel — zero open ports required on the router.
Read-only direct TLS connection. No write access to router.
Device pushes data outbound via HTTPS. Nothing inbound.
| Component | Protection |
|---|---|
| ✓TLS | TLSv1.2 + TLSv1.3, ECDHE ciphers, HSTS preload |
| ✓Firewall (UFW) | Only 80, 443, 51820/UDP exposed. API (3001) and Redis (6379) DENY |
| ✓Redis | TLS enabled, password required, localhost-only binding |
| ✓Nginx Headers | HSTS, X-Frame-Options, X-Content-Type-Options, CSP, Permissions-Policy |
| ✓Rate Limiting | Global 300/15min, Auth 5/min, Admin 30/15min, Agent 2/30s |
| ✓DH Parameters | 2048-bit dhparam for forward secrecy |
| Standard | Status |
|---|---|
| HTTPS everywhere | ✅Enforced |
| Encryption at rest | ✅AES-256-GCM for credentials |
| Encryption in transit | ✅TLS + WireGuard |
| Authentication | ✅JWT + MFA + PKCE |
| Authorization | ✅RBAC + RLS |
| Audit trail | ✅Full audit log with IP tracking |
| Data deletion (GDPR) | ✅Account erasure endpoint |
| Session management | ✅Token blacklist + forced refresh |
We are happy to answer any questions from prospective customers and auditors.